Generation: store views as Body
This commit is contained in:
parent
557ec14232
commit
1418d1333c
@ -2,7 +2,7 @@
|
|||||||
// ActionRow.swift
|
// ActionRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -38,7 +38,7 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
var activatableWidget: (() -> Body)?
|
var activatableWidget: Body?
|
||||||
/// The subtitle for this row.
|
/// The subtitle for this row.
|
||||||
///
|
///
|
||||||
/// The subtitle is interpreted as Pango markup unless
|
/// The subtitle is interpreted as Pango markup unless
|
||||||
@ -96,7 +96,7 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let activatableWidgetStorage = activatableWidget?().storage(data: data, type: type) {
|
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -131,7 +131,7 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["activatableWidget"]?.first {
|
if let widget = storage.content["activatableWidget"]?.first {
|
||||||
activatableWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
activatableWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let subtitleLines, updateProperties, (storage.previousState as? Self)?.subtitleLines != subtitleLines {
|
if let subtitleLines, updateProperties, (storage.previousState as? Self)?.subtitleLines != subtitleLines {
|
||||||
adw_action_row_set_subtitle_lines(widget?.cast(), subtitleLines.cInt)
|
adw_action_row_set_subtitle_lines(widget?.cast(), subtitleLines.cInt)
|
||||||
@ -202,10 +202,8 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
public func activatableWidget(@ViewBuilder _ activatableWidget: @escaping (() -> Body)) -> Self {
|
public func activatableWidget(@ViewBuilder _ activatableWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activatableWidget = activatableWidget() }
|
||||||
newSelf.activatableWidget = activatableWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The subtitle for this row.
|
/// The subtitle for this row.
|
||||||
@ -213,9 +211,7 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
/// The subtitle is interpreted as Pango markup unless
|
/// The subtitle is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func subtitle(_ subtitle: String?) -> Self {
|
public func subtitle(_ subtitle: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitle = subtitle }
|
||||||
newSelf.subtitle = subtitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the subtitle label will be
|
/// The number of lines at the end of which the subtitle label will be
|
||||||
@ -223,18 +219,14 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleLines = subtitleLines }
|
||||||
newSelf.subtitleLines = subtitleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the subtitle from the label.
|
/// Whether the user can copy the subtitle from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleSelectable = subtitleSelectable }
|
||||||
newSelf.subtitleSelectable = subtitleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title of the preference represented by this row.
|
/// The title of the preference represented by this row.
|
||||||
@ -242,27 +234,21 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the title label will be ellipsized.
|
/// The number of lines at the end of which the title label will be ellipsized.
|
||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func titleLines(_ titleLines: Int?) -> Self {
|
public func titleLines(_ titleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleLines = titleLines }
|
||||||
newSelf.titleLines = titleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -271,16 +257,12 @@ public struct ActionRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This signal is emitted after the row has been activated.
|
/// This signal is emitted after the row has been activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// AspectFrame.swift
|
// AspectFrame.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -26,7 +26,7 @@ public struct AspectFrame: AdwaitaWidget {
|
|||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
var accessibleRole: String?
|
var accessibleRole: String?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// Whether the `GtkAspectFrame` should use the aspect ratio of its child.
|
/// Whether the `GtkAspectFrame` should use the aspect ratio of its child.
|
||||||
var obeyChild: Bool?
|
var obeyChild: Bool?
|
||||||
/// The aspect ratio to be used by the `GtkAspectFrame`.
|
/// The aspect ratio to be used by the `GtkAspectFrame`.
|
||||||
@ -55,7 +55,7 @@ public struct AspectFrame: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_aspect_frame_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
gtk_aspect_frame_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ public struct AspectFrame: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let obeyChild, updateProperties, (storage.previousState as? Self)?.obeyChild != obeyChild {
|
if let obeyChild, updateProperties, (storage.previousState as? Self)?.obeyChild != obeyChild {
|
||||||
gtk_aspect_frame_set_obey_child(widget, obeyChild.cBool)
|
gtk_aspect_frame_set_obey_child(widget, obeyChild.cBool)
|
||||||
@ -103,23 +103,17 @@ public struct AspectFrame: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the `GtkAspectFrame` should use the aspect ratio of its child.
|
/// Whether the `GtkAspectFrame` should use the aspect ratio of its child.
|
||||||
public func obeyChild(_ obeyChild: Bool? = true) -> Self {
|
public func obeyChild(_ obeyChild: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.obeyChild = obeyChild }
|
||||||
newSelf.obeyChild = obeyChild
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The aspect ratio to be used by the `GtkAspectFrame`.
|
/// The aspect ratio to be used by the `GtkAspectFrame`.
|
||||||
@ -127,23 +121,17 @@ public struct AspectFrame: AdwaitaWidget {
|
|||||||
/// This property is only used if
|
/// This property is only used if
|
||||||
/// ``obeyChild(_:)`` is set to `false`.
|
/// ``obeyChild(_:)`` is set to `false`.
|
||||||
public func ratio(_ ratio: Float) -> Self {
|
public func ratio(_ ratio: Float) -> Self {
|
||||||
var newSelf = self
|
modify { $0.ratio = ratio }
|
||||||
newSelf.ratio = ratio
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The horizontal alignment of the child.
|
/// The horizontal alignment of the child.
|
||||||
public func xalign(_ xalign: Float?) -> Self {
|
public func xalign(_ xalign: Float?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.xalign = xalign }
|
||||||
newSelf.xalign = xalign
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The vertical alignment of the child.
|
/// The vertical alignment of the child.
|
||||||
public func yalign(_ yalign: Float?) -> Self {
|
public func yalign(_ yalign: Float?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.yalign = yalign }
|
||||||
newSelf.yalign = yalign
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Avatar.swift
|
// Avatar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -107,25 +107,19 @@ public struct Avatar: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// If no name is set, `avatar-default-symbolic` will be used.
|
/// If no name is set, `avatar-default-symbolic` will be used.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether initials are used instead of an icon on the fallback avatar.
|
/// Whether initials are used instead of an icon on the fallback avatar.
|
||||||
///
|
///
|
||||||
/// See ``iconName(_:)`` for how to change the fallback icon.
|
/// See ``iconName(_:)`` for how to change the fallback icon.
|
||||||
public func showInitials(_ showInitials: Bool) -> Self {
|
public func showInitials(_ showInitials: Bool) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showInitials = showInitials }
|
||||||
newSelf.showInitials = showInitials
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The size of the avatar.
|
/// The size of the avatar.
|
||||||
public func size(_ size: Int) -> Self {
|
public func size(_ size: Int) -> Self {
|
||||||
var newSelf = self
|
modify { $0.size = size }
|
||||||
newSelf.size = size
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the text used to generate the fallback initials and color.
|
/// Sets the text used to generate the fallback initials and color.
|
||||||
@ -133,9 +127,7 @@ public struct Avatar: AdwaitaWidget {
|
|||||||
/// It's only used to generate the color if ``showInitials(_:)`` is
|
/// It's only used to generate the color if ``showInitials(_:)`` is
|
||||||
/// `false`.
|
/// `false`.
|
||||||
public func text(_ text: String?) -> Self {
|
public func text(_ text: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.text = text }
|
||||||
newSelf.text = text
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Banner.swift
|
// Banner.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -122,34 +122,26 @@ public struct Banner: AdwaitaWidget {
|
|||||||
/// The button can be used with a `GAction`, or with the
|
/// The button can be used with a `GAction`, or with the
|
||||||
/// `Banner::button-clicked` signal.
|
/// `Banner::button-clicked` signal.
|
||||||
public func buttonLabel(_ buttonLabel: String?) -> Self {
|
public func buttonLabel(_ buttonLabel: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.buttonLabel = buttonLabel }
|
||||||
newSelf.buttonLabel = buttonLabel
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the banner is currently revealed.
|
/// Whether the banner is currently revealed.
|
||||||
public func revealed(_ revealed: Bool? = true) -> Self {
|
public func revealed(_ revealed: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.revealed = revealed }
|
||||||
newSelf.revealed = revealed
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title for this banner.
|
/// The title for this banner.
|
||||||
///
|
///
|
||||||
/// See also: ``useMarkup(_:)``.
|
/// See also: ``useMarkup(_:)``.
|
||||||
public func title(_ title: String) -> Self {
|
public func title(_ title: String) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the banner title.
|
/// Whether to use Pango markup for the banner title.
|
||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This signal is emitted after the action button has been clicked.
|
/// This signal is emitted after the action button has been clicked.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Bin.swift
|
// Bin.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -25,7 +25,7 @@ public struct Bin: AdwaitaWidget {
|
|||||||
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
||||||
|
|
||||||
/// The child widget of the `AdwBin`.
|
/// The child widget of the `AdwBin`.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
|
|
||||||
/// Initialize `Bin`.
|
/// Initialize `Bin`.
|
||||||
public init() {
|
public init() {
|
||||||
@ -42,7 +42,7 @@ public struct Bin: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
adw_bin_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
adw_bin_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ public struct Bin: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -75,10 +75,8 @@ public struct Bin: AdwaitaWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget of the `AdwBin`.
|
/// The child widget of the `AdwBin`.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Box.swift
|
// Box.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -148,32 +148,24 @@ public struct Box: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The position of the child that determines the baseline.
|
/// The position of the child that determines the baseline.
|
||||||
///
|
///
|
||||||
/// This is only relevant if the box is in vertical orientation.
|
/// This is only relevant if the box is in vertical orientation.
|
||||||
public func baselineChild(_ baselineChild: Int?) -> Self {
|
public func baselineChild(_ baselineChild: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.baselineChild = baselineChild }
|
||||||
newSelf.baselineChild = baselineChild
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the children should all be the same size.
|
/// Whether the children should all be the same size.
|
||||||
public func homogeneous(_ homogeneous: Bool? = true) -> Self {
|
public func homogeneous(_ homogeneous: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.homogeneous = homogeneous }
|
||||||
newSelf.homogeneous = homogeneous
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The amount of space between children.
|
/// The amount of space between children.
|
||||||
public func spacing(_ spacing: Int) -> Self {
|
public func spacing(_ spacing: Int) -> Self {
|
||||||
var newSelf = self
|
modify { $0.spacing = spacing }
|
||||||
newSelf.spacing = spacing
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the body for "append".
|
/// Set the body for "append".
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Button.swift
|
// Button.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -39,7 +39,7 @@ public struct Button: AdwaitaWidget {
|
|||||||
/// property has no effect.
|
/// property has no effect.
|
||||||
var canShrink: Bool?
|
var canShrink: Bool?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
var hasFrame: Bool?
|
var hasFrame: Bool?
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
@ -75,7 +75,7 @@ public struct Button: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ public struct Button: AdwaitaWidget {
|
|||||||
gtk_button_set_can_shrink(widget?.cast(), canShrink.cBool)
|
gtk_button_set_can_shrink(widget?.cast(), canShrink.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
||||||
gtk_button_set_has_frame(widget?.cast(), hasFrame.cBool)
|
gtk_button_set_has_frame(widget?.cast(), hasFrame.cBool)
|
||||||
@ -139,16 +139,12 @@ public struct Button: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the action with which this widget should be associated.
|
/// The name of the action with which this widget should be associated.
|
||||||
public func actionName(_ actionName: String?) -> Self {
|
public func actionName(_ actionName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.actionName = actionName }
|
||||||
newSelf.actionName = actionName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the size of the button can be made smaller than the natural
|
/// Whether the size of the button can be made smaller than the natural
|
||||||
@ -159,45 +155,33 @@ public struct Button: AdwaitaWidget {
|
|||||||
/// If the contents of a button are an icon or a custom widget, setting this
|
/// If the contents of a button are an icon or a custom widget, setting this
|
||||||
/// property has no effect.
|
/// property has no effect.
|
||||||
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.canShrink = canShrink }
|
||||||
newSelf.canShrink = canShrink
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hasFrame = hasFrame }
|
||||||
newSelf.hasFrame = hasFrame
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Text of the label inside the button, if the button contains a label widget.
|
/// Text of the label inside the button, if the button contains a label widget.
|
||||||
public func label(_ label: String?) -> Self {
|
public func label(_ label: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If set, an underline in the text indicates that the following character is
|
/// If set, an underline in the text indicates that the following character is
|
||||||
/// to be used as mnemonic.
|
/// to be used as mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to animate press then release.
|
/// Emitted to animate press then release.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ButtonContent.swift
|
// ButtonContent.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -110,25 +110,19 @@ public struct ButtonContent: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``canShrink(_:)``.
|
/// See ``canShrink(_:)``.
|
||||||
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.canShrink = canShrink }
|
||||||
newSelf.canShrink = canShrink
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the displayed icon.
|
/// The name of the displayed icon.
|
||||||
///
|
///
|
||||||
/// If empty, the icon is not shown.
|
/// If empty, the icon is not shown.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The displayed label.
|
/// The displayed label.
|
||||||
public func label(_ label: String?) -> Self {
|
public func label(_ label: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an underline in the text indicates a mnemonic.
|
/// Whether an underline in the text indicates a mnemonic.
|
||||||
@ -137,9 +131,7 @@ public struct ButtonContent: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``label(_:)``.
|
/// See ``label(_:)``.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Carousel.swift
|
// Carousel.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -150,27 +150,21 @@ public struct Carousel<Element>: AdwaitaWidget where Element: Identifiable {
|
|||||||
///
|
///
|
||||||
/// If the value is `false`, each swipe can only move to the adjacent pages.
|
/// If the value is `false`, each swipe can only move to the adjacent pages.
|
||||||
public func allowLongSwipes(_ allowLongSwipes: Bool? = true) -> Self {
|
public func allowLongSwipes(_ allowLongSwipes: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.allowLongSwipes = allowLongSwipes }
|
||||||
newSelf.allowLongSwipes = allowLongSwipes
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets whether the `AdwCarousel` can be dragged with mouse pointer.
|
/// Sets whether the `AdwCarousel` can be dragged with mouse pointer.
|
||||||
///
|
///
|
||||||
/// If the value is `false`, dragging is only available on touch.
|
/// If the value is `false`, dragging is only available on touch.
|
||||||
public func allowMouseDrag(_ allowMouseDrag: Bool? = true) -> Self {
|
public func allowMouseDrag(_ allowMouseDrag: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.allowMouseDrag = allowMouseDrag }
|
||||||
newSelf.allowMouseDrag = allowMouseDrag
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the widget will respond to scroll wheel events.
|
/// Whether the widget will respond to scroll wheel events.
|
||||||
///
|
///
|
||||||
/// If the value is `false`, wheel events will be ignored.
|
/// If the value is `false`, wheel events will be ignored.
|
||||||
public func allowScrollWheel(_ allowScrollWheel: Bool? = true) -> Self {
|
public func allowScrollWheel(_ allowScrollWheel: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.allowScrollWheel = allowScrollWheel }
|
||||||
newSelf.allowScrollWheel = allowScrollWheel
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the carousel can be navigated.
|
/// Whether the carousel can be navigated.
|
||||||
@ -178,32 +172,24 @@ public struct Carousel<Element>: AdwaitaWidget where Element: Identifiable {
|
|||||||
/// This can be used to temporarily disable the carousel to only allow
|
/// This can be used to temporarily disable the carousel to only allow
|
||||||
/// navigating it in a certain state.
|
/// navigating it in a certain state.
|
||||||
public func interactive(_ interactive: Bool? = true) -> Self {
|
public func interactive(_ interactive: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.interactive = interactive }
|
||||||
newSelf.interactive = interactive
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of pages in a `AdwCarousel`.
|
/// The number of pages in a `AdwCarousel`.
|
||||||
public func nPages(_ nPages: UInt?) -> Self {
|
public func nPages(_ nPages: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.nPages = nPages }
|
||||||
newSelf.nPages = nPages
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Page reveal duration, in milliseconds.
|
/// Page reveal duration, in milliseconds.
|
||||||
///
|
///
|
||||||
/// Reveal duration is used when animating adding or removing pages.
|
/// Reveal duration is used when animating adding or removing pages.
|
||||||
public func revealDuration(_ revealDuration: UInt?) -> Self {
|
public func revealDuration(_ revealDuration: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.revealDuration = revealDuration }
|
||||||
newSelf.revealDuration = revealDuration
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Spacing between pages in pixels.
|
/// Spacing between pages in pixels.
|
||||||
public func spacing(_ spacing: UInt?) -> Self {
|
public func spacing(_ spacing: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.spacing = spacing }
|
||||||
newSelf.spacing = spacing
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This signal is emitted after a page has been changed.
|
/// This signal is emitted after a page has been changed.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// CenterBox.swift
|
// CenterBox.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -33,13 +33,13 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
var accessibleRole: String?
|
var accessibleRole: String?
|
||||||
/// The widget that is placed at the center position.
|
/// The widget that is placed at the center position.
|
||||||
var centerWidget: (() -> Body)?
|
var centerWidget: Body?
|
||||||
/// The widget that is placed at the end position.
|
/// The widget that is placed at the end position.
|
||||||
///
|
///
|
||||||
/// In vertical orientation, the end position is at the bottom.
|
/// In vertical orientation, the end position is at the bottom.
|
||||||
/// In horizontal orientation, the end position is at the trailing
|
/// In horizontal orientation, the end position is at the trailing
|
||||||
/// edge with respect to the text direction.
|
/// edge with respect to the text direction.
|
||||||
var endWidget: (() -> Body)?
|
var endWidget: Body?
|
||||||
/// Whether to shrink the center widget after other children.
|
/// Whether to shrink the center widget after other children.
|
||||||
///
|
///
|
||||||
/// By default, when there's no space to give all three children their
|
/// By default, when there's no space to give all three children their
|
||||||
@ -54,7 +54,7 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
/// In vertical orientation, the start position is at the top.
|
/// In vertical orientation, the start position is at the top.
|
||||||
/// In horizontal orientation, the start position is at the leading
|
/// In horizontal orientation, the start position is at the leading
|
||||||
/// edge with respect to the text direction.
|
/// edge with respect to the text direction.
|
||||||
var startWidget: (() -> Body)?
|
var startWidget: Body?
|
||||||
|
|
||||||
/// Initialize `CenterBox`.
|
/// Initialize `CenterBox`.
|
||||||
public init() {
|
public init() {
|
||||||
@ -71,15 +71,15 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let centerWidgetStorage = centerWidget?().storage(data: data, type: type) {
|
if let centerWidgetStorage = centerWidget?.storage(data: data, type: type) {
|
||||||
storage.content["centerWidget"] = [centerWidgetStorage]
|
storage.content["centerWidget"] = [centerWidgetStorage]
|
||||||
gtk_center_box_set_center_widget(storage.opaquePointer, centerWidgetStorage.opaquePointer?.cast())
|
gtk_center_box_set_center_widget(storage.opaquePointer, centerWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
if let endWidgetStorage = endWidget?().storage(data: data, type: type) {
|
if let endWidgetStorage = endWidget?.storage(data: data, type: type) {
|
||||||
storage.content["endWidget"] = [endWidgetStorage]
|
storage.content["endWidget"] = [endWidgetStorage]
|
||||||
gtk_center_box_set_end_widget(storage.opaquePointer, endWidgetStorage.opaquePointer?.cast())
|
gtk_center_box_set_end_widget(storage.opaquePointer, endWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
if let startWidgetStorage = startWidget?().storage(data: data, type: type) {
|
if let startWidgetStorage = startWidget?.storage(data: data, type: type) {
|
||||||
storage.content["startWidget"] = [startWidgetStorage]
|
storage.content["startWidget"] = [startWidgetStorage]
|
||||||
gtk_center_box_set_start_widget(storage.opaquePointer, startWidgetStorage.opaquePointer?.cast())
|
gtk_center_box_set_start_widget(storage.opaquePointer, startWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -97,16 +97,16 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["centerWidget"]?.first {
|
if let widget = storage.content["centerWidget"]?.first {
|
||||||
centerWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
centerWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["endWidget"]?.first {
|
if let widget = storage.content["endWidget"]?.first {
|
||||||
endWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
endWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let shrinkCenterLast, updateProperties, (storage.previousState as? Self)?.shrinkCenterLast != shrinkCenterLast {
|
if let shrinkCenterLast, updateProperties, (storage.previousState as? Self)?.shrinkCenterLast != shrinkCenterLast {
|
||||||
gtk_center_box_set_shrink_center_last(widget, shrinkCenterLast.cBool)
|
gtk_center_box_set_shrink_center_last(widget, shrinkCenterLast.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["startWidget"]?.first {
|
if let widget = storage.content["startWidget"]?.first {
|
||||||
startWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
startWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -124,16 +124,12 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The widget that is placed at the center position.
|
/// The widget that is placed at the center position.
|
||||||
public func centerWidget(@ViewBuilder _ centerWidget: @escaping (() -> Body)) -> Self {
|
public func centerWidget(@ViewBuilder _ centerWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.centerWidget = centerWidget() }
|
||||||
newSelf.centerWidget = centerWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The widget that is placed at the end position.
|
/// The widget that is placed at the end position.
|
||||||
@ -141,10 +137,8 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
/// In vertical orientation, the end position is at the bottom.
|
/// In vertical orientation, the end position is at the bottom.
|
||||||
/// In horizontal orientation, the end position is at the trailing
|
/// In horizontal orientation, the end position is at the trailing
|
||||||
/// edge with respect to the text direction.
|
/// edge with respect to the text direction.
|
||||||
public func endWidget(@ViewBuilder _ endWidget: @escaping (() -> Body)) -> Self {
|
public func endWidget(@ViewBuilder _ endWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.endWidget = endWidget() }
|
||||||
newSelf.endWidget = endWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to shrink the center widget after other children.
|
/// Whether to shrink the center widget after other children.
|
||||||
@ -156,9 +150,7 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
/// If false, start and end widgets keep natural width and the
|
/// If false, start and end widgets keep natural width and the
|
||||||
/// center widget starts shrinking instead.
|
/// center widget starts shrinking instead.
|
||||||
public func shrinkCenterLast(_ shrinkCenterLast: Bool? = true) -> Self {
|
public func shrinkCenterLast(_ shrinkCenterLast: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.shrinkCenterLast = shrinkCenterLast }
|
||||||
newSelf.shrinkCenterLast = shrinkCenterLast
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The widget that is placed at the start position.
|
/// The widget that is placed at the start position.
|
||||||
@ -166,10 +158,8 @@ public struct CenterBox: AdwaitaWidget {
|
|||||||
/// In vertical orientation, the start position is at the top.
|
/// In vertical orientation, the start position is at the top.
|
||||||
/// In horizontal orientation, the start position is at the leading
|
/// In horizontal orientation, the start position is at the leading
|
||||||
/// edge with respect to the text direction.
|
/// edge with respect to the text direction.
|
||||||
public func startWidget(@ViewBuilder _ startWidget: @escaping (() -> Body)) -> Self {
|
public func startWidget(@ViewBuilder _ startWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.startWidget = startWidget() }
|
||||||
newSelf.startWidget = startWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// CheckButton.swift
|
// CheckButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -39,7 +39,7 @@ public struct CheckButton: AdwaitaWidget {
|
|||||||
/// the check button and the indicator CSS node.
|
/// the check button and the indicator CSS node.
|
||||||
var active: Binding<Bool>?
|
var active: Binding<Bool>?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// If the check button is in an “in between” state.
|
/// If the check button is in an “in between” state.
|
||||||
///
|
///
|
||||||
/// The inconsistent state only affects visual appearance,
|
/// The inconsistent state only affects visual appearance,
|
||||||
@ -80,7 +80,7 @@ public struct CheckButton: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_check_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
gtk_check_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ if let active, newValue != active.wrappedValue {
|
|||||||
gtk_check_button_set_active(storage.opaquePointer?.cast(), active.wrappedValue.cBool)
|
gtk_check_button_set_active(storage.opaquePointer?.cast(), active.wrappedValue.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let inconsistent, updateProperties, (storage.previousState as? Self)?.inconsistent != inconsistent {
|
if let inconsistent, updateProperties, (storage.previousState as? Self)?.inconsistent != inconsistent {
|
||||||
gtk_check_button_set_inconsistent(widget?.cast(), inconsistent.cBool)
|
gtk_check_button_set_inconsistent(widget?.cast(), inconsistent.cBool)
|
||||||
@ -147,16 +147,12 @@ if let active, newValue != active.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the action with which this widget should be associated.
|
/// The name of the action with which this widget should be associated.
|
||||||
public func actionName(_ actionName: String?) -> Self {
|
public func actionName(_ actionName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.actionName = actionName }
|
||||||
newSelf.actionName = actionName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If the check button is active.
|
/// If the check button is active.
|
||||||
@ -164,16 +160,12 @@ if let active, newValue != active.wrappedValue {
|
|||||||
/// Setting `active` to `true` will add the `:checked:` state to both
|
/// Setting `active` to `true` will add the `:checked:` state to both
|
||||||
/// the check button and the indicator CSS node.
|
/// the check button and the indicator CSS node.
|
||||||
public func active(_ active: Binding<Bool>?) -> Self {
|
public func active(_ active: Binding<Bool>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.active = active }
|
||||||
newSelf.active = active
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If the check button is in an “in between” state.
|
/// If the check button is in an “in between” state.
|
||||||
@ -181,24 +173,18 @@ if let active, newValue != active.wrappedValue {
|
|||||||
/// The inconsistent state only affects visual appearance,
|
/// The inconsistent state only affects visual appearance,
|
||||||
/// not the semantics of the button.
|
/// not the semantics of the button.
|
||||||
public func inconsistent(_ inconsistent: Bool? = true) -> Self {
|
public func inconsistent(_ inconsistent: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.inconsistent = inconsistent }
|
||||||
newSelf.inconsistent = inconsistent
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Text of the label inside the check button, if it contains a label widget.
|
/// Text of the label inside the check button, if it contains a label widget.
|
||||||
public func label(_ label: String?) -> Self {
|
public func label(_ label: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If set, an underline in the text indicates that the following
|
/// If set, an underline in the text indicates that the following
|
||||||
/// character is to be used as mnemonic.
|
/// character is to be used as mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to when the check button is activated.
|
/// Emitted to when the check button is activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Clamp.swift
|
// Clamp.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -34,7 +34,7 @@ public struct Clamp: AdwaitaWidget {
|
|||||||
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
||||||
|
|
||||||
/// The child widget of the `AdwClamp`.
|
/// The child widget of the `AdwClamp`.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// The maximum size allocated to the child.
|
/// The maximum size allocated to the child.
|
||||||
///
|
///
|
||||||
/// It is the width if the clamp is horizontal, or the height if it is vertical.
|
/// It is the width if the clamp is horizontal, or the height if it is vertical.
|
||||||
@ -70,7 +70,7 @@ public struct Clamp: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
adw_clamp_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
adw_clamp_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ public struct Clamp: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let maximumSize, updateProperties, (storage.previousState as? Self)?.maximumSize != maximumSize {
|
if let maximumSize, updateProperties, (storage.previousState as? Self)?.maximumSize != maximumSize {
|
||||||
adw_clamp_set_maximum_size(widget, maximumSize.cInt)
|
adw_clamp_set_maximum_size(widget, maximumSize.cInt)
|
||||||
@ -109,19 +109,15 @@ public struct Clamp: AdwaitaWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget of the `AdwClamp`.
|
/// The child widget of the `AdwClamp`.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The maximum size allocated to the child.
|
/// The maximum size allocated to the child.
|
||||||
///
|
///
|
||||||
/// It is the width if the clamp is horizontal, or the height if it is vertical.
|
/// It is the width if the clamp is horizontal, or the height if it is vertical.
|
||||||
public func maximumSize(_ maximumSize: Int?) -> Self {
|
public func maximumSize(_ maximumSize: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maximumSize = maximumSize }
|
||||||
newSelf.maximumSize = maximumSize
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The size above which the child is clamped.
|
/// The size above which the child is clamped.
|
||||||
@ -139,9 +135,7 @@ public struct Clamp: AdwaitaWidget {
|
|||||||
/// Effectively, tightening the grip on the child before it reaches its maximum
|
/// Effectively, tightening the grip on the child before it reaches its maximum
|
||||||
/// size makes transitions to and from the maximum size smoother when resizing.
|
/// size makes transitions to and from the maximum size smoother when resizing.
|
||||||
public func tighteningThreshold(_ tighteningThreshold: Int?) -> Self {
|
public func tighteningThreshold(_ tighteningThreshold: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.tighteningThreshold = tighteningThreshold }
|
||||||
newSelf.tighteningThreshold = tighteningThreshold
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ComboRow.swift
|
// ComboRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -46,7 +46,7 @@ public struct ComboRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
var activatableWidget: (() -> Body)?
|
var activatableWidget: Body?
|
||||||
/// Whether to show a search entry in the popup.
|
/// Whether to show a search entry in the popup.
|
||||||
///
|
///
|
||||||
/// If set to `true`, a search entry will be shown in the popup that
|
/// If set to `true`, a search entry will be shown in the popup that
|
||||||
@ -126,7 +126,7 @@ public struct ComboRow: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let activatableWidgetStorage = activatableWidget?().storage(data: data, type: type) {
|
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let widget = storage.content["activatableWidget"]?.first {
|
if let widget = storage.content["activatableWidget"]?.first {
|
||||||
activatableWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
activatableWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let enableSearch, updateProperties, (storage.previousState as? Self)?.enableSearch != enableSearch {
|
if let enableSearch, updateProperties, (storage.previousState as? Self)?.enableSearch != enableSearch {
|
||||||
adw_combo_row_set_enable_search(widget?.cast(), enableSearch.cBool)
|
adw_combo_row_set_enable_search(widget?.cast(), enableSearch.cBool)
|
||||||
@ -223,10 +223,8 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
public func activatableWidget(@ViewBuilder _ activatableWidget: @escaping (() -> Body)) -> Self {
|
public func activatableWidget(@ViewBuilder _ activatableWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activatableWidget = activatableWidget() }
|
||||||
newSelf.activatableWidget = activatableWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show a search entry in the popup.
|
/// Whether to show a search entry in the popup.
|
||||||
@ -236,9 +234,7 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// Search requires ``expression(_:)`` to be set.
|
/// Search requires ``expression(_:)`` to be set.
|
||||||
public func enableSearch(_ enableSearch: Bool? = true) -> Self {
|
public func enableSearch(_ enableSearch: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableSearch = enableSearch }
|
||||||
newSelf.enableSearch = enableSearch
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The position of the selected item.
|
/// The position of the selected item.
|
||||||
@ -246,9 +242,7 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
/// If no item is selected, the property has the value
|
/// If no item is selected, the property has the value
|
||||||
/// `Gtk.INVALID_LIST_POSITION`
|
/// `Gtk.INVALID_LIST_POSITION`
|
||||||
public func selected(_ selected: Binding<UInt>?) -> Self {
|
public func selected(_ selected: Binding<UInt>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.selected = selected }
|
||||||
newSelf.selected = selected
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The subtitle for this row.
|
/// The subtitle for this row.
|
||||||
@ -256,9 +250,7 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
/// The subtitle is interpreted as Pango markup unless
|
/// The subtitle is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func subtitle(_ subtitle: String?) -> Self {
|
public func subtitle(_ subtitle: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitle = subtitle }
|
||||||
newSelf.subtitle = subtitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the subtitle label will be
|
/// The number of lines at the end of which the subtitle label will be
|
||||||
@ -266,18 +258,14 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleLines = subtitleLines }
|
||||||
newSelf.subtitleLines = subtitleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the subtitle from the label.
|
/// Whether the user can copy the subtitle from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleSelectable = subtitleSelectable }
|
||||||
newSelf.subtitleSelectable = subtitleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title of the preference represented by this row.
|
/// The title of the preference represented by this row.
|
||||||
@ -285,27 +273,21 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the title label will be ellipsized.
|
/// The number of lines at the end of which the title label will be ellipsized.
|
||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func titleLines(_ titleLines: Int?) -> Self {
|
public func titleLines(_ titleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleLines = titleLines }
|
||||||
newSelf.titleLines = titleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -314,9 +296,7 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use the current value as the subtitle.
|
/// Whether to use the current value as the subtitle.
|
||||||
@ -329,16 +309,12 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
/// The subtitle is interpreted as Pango markup if
|
/// The subtitle is interpreted as Pango markup if
|
||||||
/// ``useMarkup(_:)`` is set to `true`.
|
/// ``useMarkup(_:)`` is set to `true`.
|
||||||
public func useSubtitle(_ useSubtitle: Bool? = true) -> Self {
|
public func useSubtitle(_ useSubtitle: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useSubtitle = useSubtitle }
|
||||||
newSelf.useSubtitle = useSubtitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This signal is emitted after the row has been activated.
|
/// This signal is emitted after the row has been activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// DropDown.swift
|
// DropDown.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -139,9 +139,7 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show a search entry in the popup.
|
/// Whether to show a search entry in the popup.
|
||||||
@ -149,9 +147,7 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
/// Note that search requires ``expression(_:)``
|
/// Note that search requires ``expression(_:)``
|
||||||
/// to be set.
|
/// to be set.
|
||||||
public func enableSearch(_ enableSearch: Bool? = true) -> Self {
|
public func enableSearch(_ enableSearch: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableSearch = enableSearch }
|
||||||
newSelf.enableSearch = enableSearch
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The position of the selected item.
|
/// The position of the selected item.
|
||||||
@ -159,16 +155,12 @@ if let selected, newValue != selected.wrappedValue {
|
|||||||
/// If no item is selected, the property has the value
|
/// If no item is selected, the property has the value
|
||||||
/// %GTK_INVALID_LIST_POSITION.
|
/// %GTK_INVALID_LIST_POSITION.
|
||||||
public func selected(_ selected: Binding<UInt>?) -> Self {
|
public func selected(_ selected: Binding<UInt>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.selected = selected }
|
||||||
newSelf.selected = selected
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show an arrow within the GtkDropDown widget.
|
/// Whether to show an arrow within the GtkDropDown widget.
|
||||||
public func showArrow(_ showArrow: Bool? = true) -> Self {
|
public func showArrow(_ showArrow: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showArrow = showArrow }
|
||||||
newSelf.showArrow = showArrow
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to when the drop down is activated.
|
/// Emitted to when the drop down is activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Entry.swift
|
// Entry.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -69,7 +69,7 @@ public struct Entry: AdwaitaWidget {
|
|||||||
/// If undo/redo should be enabled for the editable.
|
/// If undo/redo should be enabled for the editable.
|
||||||
var enableUndo: Bool?
|
var enableUndo: Bool?
|
||||||
/// A menu model whose contents will be appended to the context menu.
|
/// A menu model whose contents will be appended to the context menu.
|
||||||
var extraMenu: (() -> Body)?
|
var extraMenu: Body?
|
||||||
/// Whether the entry should draw a frame.
|
/// Whether the entry should draw a frame.
|
||||||
var hasFrame: Bool?
|
var hasFrame: Bool?
|
||||||
/// Which IM (input method) module should be used for this entry.
|
/// Which IM (input method) module should be used for this entry.
|
||||||
@ -280,8 +280,8 @@ public struct Entry: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let menu = extraMenu?() {
|
if let extraMenu {
|
||||||
let childStorage = MenuCollection { menu }.getMenu(data: data)
|
let childStorage = MenuCollection { extraMenu }.getMenu(data: data)
|
||||||
storage.content["extraMenu"] = [childStorage]
|
storage.content["extraMenu"] = [childStorage]
|
||||||
gtk_entry_set_extra_menu(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
gtk_entry_set_extra_menu(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -354,7 +354,7 @@ if let text, newValue != text.wrappedValue {
|
|||||||
gtk_editable_set_enable_undo(widget, enableUndo.cBool)
|
gtk_editable_set_enable_undo(widget, enableUndo.cBool)
|
||||||
}
|
}
|
||||||
if let menu = storage.content["extraMenu"]?.first {
|
if let menu = storage.content["extraMenu"]?.first {
|
||||||
MenuCollection { extraMenu?() ?? [] }
|
MenuCollection { extraMenu ?? [] }
|
||||||
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
||||||
}
|
}
|
||||||
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
||||||
@ -409,59 +409,43 @@ if let text, newValue != text.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The current position of the insertion cursor in chars.
|
/// The current position of the insertion cursor in chars.
|
||||||
public func cursorPosition(_ cursorPosition: Int?) -> Self {
|
public func cursorPosition(_ cursorPosition: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.cursorPosition = cursorPosition }
|
||||||
newSelf.cursorPosition = cursorPosition
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the entry contents can be edited.
|
/// Whether the entry contents can be edited.
|
||||||
public func editable(_ editable: Bool? = true) -> Self {
|
public func editable(_ editable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.editable = editable }
|
||||||
newSelf.editable = editable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Indicates whether editing on the cell has been canceled.
|
/// Indicates whether editing on the cell has been canceled.
|
||||||
public func editingCanceled(_ editingCanceled: Bool? = true) -> Self {
|
public func editingCanceled(_ editingCanceled: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.editingCanceled = editingCanceled }
|
||||||
newSelf.editingCanceled = editingCanceled
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to suggest Emoji replacements for :-delimited names
|
/// Whether to suggest Emoji replacements for :-delimited names
|
||||||
/// like `:heart:`.
|
/// like `:heart:`.
|
||||||
public func enableEmojiCompletion(_ enableEmojiCompletion: Bool? = true) -> Self {
|
public func enableEmojiCompletion(_ enableEmojiCompletion: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableEmojiCompletion = enableEmojiCompletion }
|
||||||
newSelf.enableEmojiCompletion = enableEmojiCompletion
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If undo/redo should be enabled for the editable.
|
/// If undo/redo should be enabled for the editable.
|
||||||
public func enableUndo(_ enableUndo: Bool? = true) -> Self {
|
public func enableUndo(_ enableUndo: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableUndo = enableUndo }
|
||||||
newSelf.enableUndo = enableUndo
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A menu model whose contents will be appended to the context menu.
|
/// A menu model whose contents will be appended to the context menu.
|
||||||
public func extraMenu(@ViewBuilder _ extraMenu: @escaping (() -> Body)) -> Self {
|
public func extraMenu(@ViewBuilder _ extraMenu: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.extraMenu = extraMenu() }
|
||||||
newSelf.extraMenu = extraMenu
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the entry should draw a frame.
|
/// Whether the entry should draw a frame.
|
||||||
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hasFrame = hasFrame }
|
||||||
newSelf.hasFrame = hasFrame
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Which IM (input method) module should be used for this entry.
|
/// Which IM (input method) module should be used for this entry.
|
||||||
@ -472,37 +456,27 @@ if let text, newValue != text.wrappedValue {
|
|||||||
/// module setting. See the GtkSettings ``gtkImModule(_:)``
|
/// module setting. See the GtkSettings ``gtkImModule(_:)``
|
||||||
/// property.
|
/// property.
|
||||||
public func imModule(_ imModule: String?) -> Self {
|
public func imModule(_ imModule: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.imModule = imModule }
|
||||||
newSelf.imModule = imModule
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The character to use when masking entry contents (“password mode”).
|
/// The character to use when masking entry contents (“password mode”).
|
||||||
public func invisibleCharacter(_ invisibleCharacter: UInt?) -> Self {
|
public func invisibleCharacter(_ invisibleCharacter: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.invisibleCharacter = invisibleCharacter }
|
||||||
newSelf.invisibleCharacter = invisibleCharacter
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the invisible char has been set for the `GtkEntry`.
|
/// Whether the invisible char has been set for the `GtkEntry`.
|
||||||
public func invisibleCharacterSet(_ invisibleCharacterSet: Bool? = true) -> Self {
|
public func invisibleCharacterSet(_ invisibleCharacterSet: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.invisibleCharacterSet = invisibleCharacterSet }
|
||||||
newSelf.invisibleCharacterSet = invisibleCharacterSet
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Maximum number of characters for this entry.
|
/// Maximum number of characters for this entry.
|
||||||
public func maxLength(_ maxLength: Int?) -> Self {
|
public func maxLength(_ maxLength: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxLength = maxLength }
|
||||||
newSelf.maxLength = maxLength
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The desired maximum width of the entry, in characters.
|
/// The desired maximum width of the entry, in characters.
|
||||||
public func maxWidthChars(_ maxWidthChars: Int?) -> Self {
|
public func maxWidthChars(_ maxWidthChars: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxWidthChars = maxWidthChars }
|
||||||
newSelf.maxWidthChars = maxWidthChars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Text for an item in the context menu to activate the primary icon action.
|
/// Text for an item in the context menu to activate the primary icon action.
|
||||||
@ -518,9 +492,7 @@ if let text, newValue != text.wrappedValue {
|
|||||||
/// menu. This set of methods greatly simplifies this, by adding a menu item that, when
|
/// menu. This set of methods greatly simplifies this, by adding a menu item that, when
|
||||||
/// enabled, calls the same callback than clicking on the icon.
|
/// enabled, calls the same callback than clicking on the icon.
|
||||||
public func menuEntryIconPrimaryText(_ menuEntryIconPrimaryText: String?) -> Self {
|
public func menuEntryIconPrimaryText(_ menuEntryIconPrimaryText: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.menuEntryIconPrimaryText = menuEntryIconPrimaryText }
|
||||||
newSelf.menuEntryIconPrimaryText = menuEntryIconPrimaryText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Text for an item in the context menu to activate the secondary icon action.
|
/// Text for an item in the context menu to activate the secondary icon action.
|
||||||
@ -536,24 +508,18 @@ if let text, newValue != text.wrappedValue {
|
|||||||
/// menu. This set of methods greatly simplifies this, by adding a menu item that, when
|
/// menu. This set of methods greatly simplifies this, by adding a menu item that, when
|
||||||
/// enabled, calls the same callback than clicking on the icon.
|
/// enabled, calls the same callback than clicking on the icon.
|
||||||
public func menuEntryIconSecondaryText(_ menuEntryIconSecondaryText: String?) -> Self {
|
public func menuEntryIconSecondaryText(_ menuEntryIconSecondaryText: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.menuEntryIconSecondaryText = menuEntryIconSecondaryText }
|
||||||
newSelf.menuEntryIconSecondaryText = menuEntryIconSecondaryText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If text is overwritten when typing in the `GtkEntry`.
|
/// If text is overwritten when typing in the `GtkEntry`.
|
||||||
public func overwriteMode(_ overwriteMode: Bool? = true) -> Self {
|
public func overwriteMode(_ overwriteMode: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.overwriteMode = overwriteMode }
|
||||||
newSelf.overwriteMode = overwriteMode
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The text that will be displayed in the `GtkEntry` when it is empty
|
/// The text that will be displayed in the `GtkEntry` when it is empty
|
||||||
/// and unfocused.
|
/// and unfocused.
|
||||||
public func placeholderText(_ placeholderText: String?) -> Self {
|
public func placeholderText(_ placeholderText: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.placeholderText = placeholderText }
|
||||||
newSelf.placeholderText = placeholderText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the primary icon is activatable.
|
/// Whether the primary icon is activatable.
|
||||||
@ -565,16 +531,12 @@ if let text, newValue != text.wrappedValue {
|
|||||||
/// Sensitive, but non-activatable icons can be used for purely
|
/// Sensitive, but non-activatable icons can be used for purely
|
||||||
/// informational purposes.
|
/// informational purposes.
|
||||||
public func primaryIconActivatable(_ primaryIconActivatable: Bool? = true) -> Self {
|
public func primaryIconActivatable(_ primaryIconActivatable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.primaryIconActivatable = primaryIconActivatable }
|
||||||
newSelf.primaryIconActivatable = primaryIconActivatable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The icon name to use for the primary icon for the entry.
|
/// The icon name to use for the primary icon for the entry.
|
||||||
public func primaryIconName(_ primaryIconName: String?) -> Self {
|
public func primaryIconName(_ primaryIconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.primaryIconName = primaryIconName }
|
||||||
newSelf.primaryIconName = primaryIconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the primary icon is sensitive.
|
/// Whether the primary icon is sensitive.
|
||||||
@ -586,34 +548,26 @@ if let text, newValue != text.wrappedValue {
|
|||||||
/// An icon should be set insensitive if the action that would trigger
|
/// An icon should be set insensitive if the action that would trigger
|
||||||
/// when clicked is currently not available.
|
/// when clicked is currently not available.
|
||||||
public func primaryIconSensitive(_ primaryIconSensitive: Bool? = true) -> Self {
|
public func primaryIconSensitive(_ primaryIconSensitive: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.primaryIconSensitive = primaryIconSensitive }
|
||||||
newSelf.primaryIconSensitive = primaryIconSensitive
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The contents of the tooltip on the primary icon, with markup.
|
/// The contents of the tooltip on the primary icon, with markup.
|
||||||
///
|
///
|
||||||
/// Also see `Gtk.Entry.set_icon_tooltip_markup`.
|
/// Also see `Gtk.Entry.set_icon_tooltip_markup`.
|
||||||
public func primaryIconTooltipMarkup(_ primaryIconTooltipMarkup: String?) -> Self {
|
public func primaryIconTooltipMarkup(_ primaryIconTooltipMarkup: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.primaryIconTooltipMarkup = primaryIconTooltipMarkup }
|
||||||
newSelf.primaryIconTooltipMarkup = primaryIconTooltipMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The contents of the tooltip on the primary icon.
|
/// The contents of the tooltip on the primary icon.
|
||||||
///
|
///
|
||||||
/// Also see `Gtk.Entry.set_icon_tooltip_text`.
|
/// Also see `Gtk.Entry.set_icon_tooltip_text`.
|
||||||
public func primaryIconTooltipText(_ primaryIconTooltipText: String?) -> Self {
|
public func primaryIconTooltipText(_ primaryIconTooltipText: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.primaryIconTooltipText = primaryIconTooltipText }
|
||||||
newSelf.primaryIconTooltipText = primaryIconTooltipText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The current fraction of the task that's been completed.
|
/// The current fraction of the task that's been completed.
|
||||||
public func progressFraction(_ progressFraction: Double?) -> Self {
|
public func progressFraction(_ progressFraction: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.progressFraction = progressFraction }
|
||||||
newSelf.progressFraction = progressFraction
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The fraction of total entry width to move the progress
|
/// The fraction of total entry width to move the progress
|
||||||
@ -621,16 +575,12 @@ if let text, newValue != text.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// See `Gtk.Entry.progress_pulse`.
|
/// See `Gtk.Entry.progress_pulse`.
|
||||||
public func progressPulseStep(_ progressPulseStep: Double?) -> Self {
|
public func progressPulseStep(_ progressPulseStep: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.progressPulseStep = progressPulseStep }
|
||||||
newSelf.progressPulseStep = progressPulseStep
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Number of pixels of the entry scrolled off the screen to the left.
|
/// Number of pixels of the entry scrolled off the screen to the left.
|
||||||
public func scrollOffset(_ scrollOffset: Int?) -> Self {
|
public func scrollOffset(_ scrollOffset: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.scrollOffset = scrollOffset }
|
||||||
newSelf.scrollOffset = scrollOffset
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the secondary icon is activatable.
|
/// Whether the secondary icon is activatable.
|
||||||
@ -642,16 +592,12 @@ if let text, newValue != text.wrappedValue {
|
|||||||
/// Sensitive, but non-activatable icons can be used for purely
|
/// Sensitive, but non-activatable icons can be used for purely
|
||||||
/// informational purposes.
|
/// informational purposes.
|
||||||
public func secondaryIconActivatable(_ secondaryIconActivatable: Bool? = true) -> Self {
|
public func secondaryIconActivatable(_ secondaryIconActivatable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.secondaryIconActivatable = secondaryIconActivatable }
|
||||||
newSelf.secondaryIconActivatable = secondaryIconActivatable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The icon name to use for the secondary icon for the entry.
|
/// The icon name to use for the secondary icon for the entry.
|
||||||
public func secondaryIconName(_ secondaryIconName: String?) -> Self {
|
public func secondaryIconName(_ secondaryIconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.secondaryIconName = secondaryIconName }
|
||||||
newSelf.secondaryIconName = secondaryIconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the secondary icon is sensitive.
|
/// Whether the secondary icon is sensitive.
|
||||||
@ -663,87 +609,65 @@ if let text, newValue != text.wrappedValue {
|
|||||||
/// An icon should be set insensitive if the action that would trigger
|
/// An icon should be set insensitive if the action that would trigger
|
||||||
/// when clicked is currently not available.
|
/// when clicked is currently not available.
|
||||||
public func secondaryIconSensitive(_ secondaryIconSensitive: Bool? = true) -> Self {
|
public func secondaryIconSensitive(_ secondaryIconSensitive: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.secondaryIconSensitive = secondaryIconSensitive }
|
||||||
newSelf.secondaryIconSensitive = secondaryIconSensitive
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The contents of the tooltip on the secondary icon, with markup.
|
/// The contents of the tooltip on the secondary icon, with markup.
|
||||||
///
|
///
|
||||||
/// Also see `Gtk.Entry.set_icon_tooltip_markup`.
|
/// Also see `Gtk.Entry.set_icon_tooltip_markup`.
|
||||||
public func secondaryIconTooltipMarkup(_ secondaryIconTooltipMarkup: String?) -> Self {
|
public func secondaryIconTooltipMarkup(_ secondaryIconTooltipMarkup: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.secondaryIconTooltipMarkup = secondaryIconTooltipMarkup }
|
||||||
newSelf.secondaryIconTooltipMarkup = secondaryIconTooltipMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The contents of the tooltip on the secondary icon.
|
/// The contents of the tooltip on the secondary icon.
|
||||||
///
|
///
|
||||||
/// Also see `Gtk.Entry.set_icon_tooltip_text`.
|
/// Also see `Gtk.Entry.set_icon_tooltip_text`.
|
||||||
public func secondaryIconTooltipText(_ secondaryIconTooltipText: String?) -> Self {
|
public func secondaryIconTooltipText(_ secondaryIconTooltipText: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.secondaryIconTooltipText = secondaryIconTooltipText }
|
||||||
newSelf.secondaryIconTooltipText = secondaryIconTooltipText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The position of the opposite end of the selection from the cursor in chars.
|
/// The position of the opposite end of the selection from the cursor in chars.
|
||||||
public func selectionBound(_ selectionBound: Int?) -> Self {
|
public func selectionBound(_ selectionBound: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.selectionBound = selectionBound }
|
||||||
newSelf.selectionBound = selectionBound
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the entry will show an Emoji icon in the secondary icon position
|
/// Whether the entry will show an Emoji icon in the secondary icon position
|
||||||
/// to open the Emoji chooser.
|
/// to open the Emoji chooser.
|
||||||
public func showEmojiIcon(_ showEmojiIcon: Bool? = true) -> Self {
|
public func showEmojiIcon(_ showEmojiIcon: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showEmojiIcon = showEmojiIcon }
|
||||||
newSelf.showEmojiIcon = showEmojiIcon
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The contents of the entry.
|
/// The contents of the entry.
|
||||||
public func text(_ text: Binding<String>?) -> Self {
|
public func text(_ text: Binding<String>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.text = text }
|
||||||
newSelf.text = text
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The length of the text in the `GtkEntry`.
|
/// The length of the text in the `GtkEntry`.
|
||||||
public func textLength(_ textLength: UInt?) -> Self {
|
public func textLength(_ textLength: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.textLength = textLength }
|
||||||
newSelf.textLength = textLength
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// When `true`, pasted multi-line text is truncated to the first line.
|
/// When `true`, pasted multi-line text is truncated to the first line.
|
||||||
public func truncateMultiline(_ truncateMultiline: Bool? = true) -> Self {
|
public func truncateMultiline(_ truncateMultiline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.truncateMultiline = truncateMultiline }
|
||||||
newSelf.truncateMultiline = truncateMultiline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the entry should show the “invisible char” instead of the
|
/// Whether the entry should show the “invisible char” instead of the
|
||||||
/// actual text (“password mode”).
|
/// actual text (“password mode”).
|
||||||
public func visibility(_ visibility: Bool? = true) -> Self {
|
public func visibility(_ visibility: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.visibility = visibility }
|
||||||
newSelf.visibility = visibility
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Number of characters to leave space for in the entry.
|
/// Number of characters to leave space for in the entry.
|
||||||
public func widthChars(_ widthChars: Int?) -> Self {
|
public func widthChars(_ widthChars: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.widthChars = widthChars }
|
||||||
newSelf.widthChars = widthChars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The horizontal alignment, from 0 (left) to 1 (right).
|
/// The horizontal alignment, from 0 (left) to 1 (right).
|
||||||
///
|
///
|
||||||
/// Reversed for RTL layouts.
|
/// Reversed for RTL layouts.
|
||||||
public func xalign(_ xalign: Float?) -> Self {
|
public func xalign(_ xalign: Float?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.xalign = xalign }
|
||||||
newSelf.xalign = xalign
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when the entry is activated.
|
/// Emitted when the entry is activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// EntryRow.swift
|
// EntryRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -194,25 +194,19 @@ public struct EntryRow: AdwaitaWidget {
|
|||||||
|
|
||||||
/// Whether activating the embedded entry can activate the default widget.
|
/// Whether activating the embedded entry can activate the default widget.
|
||||||
public func activatesDefault(_ activatesDefault: Bool? = true) -> Self {
|
public func activatesDefault(_ activatesDefault: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activatesDefault = activatesDefault }
|
||||||
newSelf.activatesDefault = activatesDefault
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to suggest emoji replacements on the entry row.
|
/// Whether to suggest emoji replacements on the entry row.
|
||||||
///
|
///
|
||||||
/// Emoji replacement is done with :-delimited names, like `:heart:`.
|
/// Emoji replacement is done with :-delimited names, like `:heart:`.
|
||||||
public func enableEmojiCompletion(_ enableEmojiCompletion: Bool? = true) -> Self {
|
public func enableEmojiCompletion(_ enableEmojiCompletion: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableEmojiCompletion = enableEmojiCompletion }
|
||||||
newSelf.enableEmojiCompletion = enableEmojiCompletion
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Maximum number of characters for the entry.
|
/// Maximum number of characters for the entry.
|
||||||
public func maxLength(_ maxLength: Int?) -> Self {
|
public func maxLength(_ maxLength: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxLength = maxLength }
|
||||||
newSelf.maxLength = maxLength
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show the apply button.
|
/// Whether to show the apply button.
|
||||||
@ -225,16 +219,12 @@ public struct EntryRow: AdwaitaWidget {
|
|||||||
/// operation, e.g. network activity, to avoid triggering it after typing every
|
/// operation, e.g. network activity, to avoid triggering it after typing every
|
||||||
/// character.
|
/// character.
|
||||||
public func showApplyButton(_ showApplyButton: Bool? = true) -> Self {
|
public func showApplyButton(_ showApplyButton: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showApplyButton = showApplyButton }
|
||||||
newSelf.showApplyButton = showApplyButton
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The length of the text in the entry row.
|
/// The length of the text in the entry row.
|
||||||
public func textLength(_ textLength: UInt?) -> Self {
|
public func textLength(_ textLength: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.textLength = textLength }
|
||||||
newSelf.textLength = textLength
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title of the preference represented by this row.
|
/// The title of the preference represented by this row.
|
||||||
@ -242,18 +232,14 @@ public struct EntryRow: AdwaitaWidget {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -262,16 +248,12 @@ public struct EntryRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when the apply button is pressed.
|
/// Emitted when the apply button is pressed.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ExpanderRow.swift
|
// ExpanderRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -206,23 +206,17 @@ if let expanded, newValue != expanded.wrappedValue {
|
|||||||
|
|
||||||
/// Whether expansion is enabled.
|
/// Whether expansion is enabled.
|
||||||
public func enableExpansion(_ enableExpansion: Binding<Bool>?) -> Self {
|
public func enableExpansion(_ enableExpansion: Binding<Bool>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableExpansion = enableExpansion }
|
||||||
newSelf.enableExpansion = enableExpansion
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the row is expanded.
|
/// Whether the row is expanded.
|
||||||
public func expanded(_ expanded: Binding<Bool>?) -> Self {
|
public func expanded(_ expanded: Binding<Bool>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.expanded = expanded }
|
||||||
newSelf.expanded = expanded
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the switch enabling the expansion is visible.
|
/// Whether the switch enabling the expansion is visible.
|
||||||
public func showEnableSwitch(_ showEnableSwitch: Bool? = true) -> Self {
|
public func showEnableSwitch(_ showEnableSwitch: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showEnableSwitch = showEnableSwitch }
|
||||||
newSelf.showEnableSwitch = showEnableSwitch
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The subtitle for this row.
|
/// The subtitle for this row.
|
||||||
@ -230,9 +224,7 @@ if let expanded, newValue != expanded.wrappedValue {
|
|||||||
/// The subtitle is interpreted as Pango markup unless
|
/// The subtitle is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func subtitle(_ subtitle: String?) -> Self {
|
public func subtitle(_ subtitle: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitle = subtitle }
|
||||||
newSelf.subtitle = subtitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the subtitle label will be
|
/// The number of lines at the end of which the subtitle label will be
|
||||||
@ -240,9 +232,7 @@ if let expanded, newValue != expanded.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleLines = subtitleLines }
|
||||||
newSelf.subtitleLines = subtitleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title of the preference represented by this row.
|
/// The title of the preference represented by this row.
|
||||||
@ -250,27 +240,21 @@ if let expanded, newValue != expanded.wrappedValue {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the title label will be ellipsized.
|
/// The number of lines at the end of which the title label will be ellipsized.
|
||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func titleLines(_ titleLines: Int?) -> Self {
|
public func titleLines(_ titleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleLines = titleLines }
|
||||||
newSelf.titleLines = titleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -279,16 +263,12 @@ if let expanded, newValue != expanded.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the body for "rows".
|
/// Set the body for "rows".
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Fixed.swift
|
// Fixed.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -101,9 +101,7 @@ public struct Fixed: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// FlowBox.swift
|
// FlowBox.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -238,49 +238,37 @@ public struct FlowBox<Element>: AdwaitaWidget where Element: Identifiable {
|
|||||||
|
|
||||||
/// Whether to accept unpaired release events.
|
/// Whether to accept unpaired release events.
|
||||||
public func acceptUnpairedRelease(_ acceptUnpairedRelease: Bool? = true) -> Self {
|
public func acceptUnpairedRelease(_ acceptUnpairedRelease: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.acceptUnpairedRelease = acceptUnpairedRelease }
|
||||||
newSelf.acceptUnpairedRelease = acceptUnpairedRelease
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The accessible role of the given `GtkAccessible` implementation.
|
/// The accessible role of the given `GtkAccessible` implementation.
|
||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines whether children can be activated with a single
|
/// Determines whether children can be activated with a single
|
||||||
/// click, or require a double-click.
|
/// click, or require a double-click.
|
||||||
public func activateOnSingleClick(_ activateOnSingleClick: Bool? = true) -> Self {
|
public func activateOnSingleClick(_ activateOnSingleClick: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activateOnSingleClick = activateOnSingleClick }
|
||||||
newSelf.activateOnSingleClick = activateOnSingleClick
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The amount of horizontal space between two children.
|
/// The amount of horizontal space between two children.
|
||||||
public func columnSpacing(_ columnSpacing: UInt?) -> Self {
|
public func columnSpacing(_ columnSpacing: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.columnSpacing = columnSpacing }
|
||||||
newSelf.columnSpacing = columnSpacing
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines whether all children should be allocated the
|
/// Determines whether all children should be allocated the
|
||||||
/// same size.
|
/// same size.
|
||||||
public func homogeneous(_ homogeneous: Bool? = true) -> Self {
|
public func homogeneous(_ homogeneous: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.homogeneous = homogeneous }
|
||||||
newSelf.homogeneous = homogeneous
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The maximum amount of children to request space for consecutively
|
/// The maximum amount of children to request space for consecutively
|
||||||
/// in the given orientation.
|
/// in the given orientation.
|
||||||
public func maxChildrenPerLine(_ maxChildrenPerLine: UInt?) -> Self {
|
public func maxChildrenPerLine(_ maxChildrenPerLine: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxChildrenPerLine = maxChildrenPerLine }
|
||||||
newSelf.maxChildrenPerLine = maxChildrenPerLine
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The minimum number of children to allocate consecutively
|
/// The minimum number of children to allocate consecutively
|
||||||
@ -290,16 +278,12 @@ public struct FlowBox<Element>: AdwaitaWidget where Element: Identifiable {
|
|||||||
/// that a reasonably small height will be requested
|
/// that a reasonably small height will be requested
|
||||||
/// for the overall minimum width of the box.
|
/// for the overall minimum width of the box.
|
||||||
public func minChildrenPerLine(_ minChildrenPerLine: UInt?) -> Self {
|
public func minChildrenPerLine(_ minChildrenPerLine: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.minChildrenPerLine = minChildrenPerLine }
|
||||||
newSelf.minChildrenPerLine = minChildrenPerLine
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The amount of vertical space between two children.
|
/// The amount of vertical space between two children.
|
||||||
public func rowSpacing(_ rowSpacing: UInt?) -> Self {
|
public func rowSpacing(_ rowSpacing: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.rowSpacing = rowSpacing }
|
||||||
newSelf.rowSpacing = rowSpacing
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when the user activates the @box.
|
/// Emitted when the user activates the @box.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// HeaderBar.swift
|
// HeaderBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -72,7 +72,7 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
/// ```xml
|
/// ```xml
|
||||||
/// <object class="AdwHeaderBar"><property name="title-widget"><object class="AdwWindowTitle"><property name="title" translatable="yes">Title</property></object></property></object>
|
/// <object class="AdwHeaderBar"><property name="title-widget"><object class="AdwWindowTitle"><property name="title" translatable="yes">Title</property></object></property></object>
|
||||||
/// ```
|
/// ```
|
||||||
var titleWidget: (() -> Body)?
|
var titleWidget: Body?
|
||||||
/// The body for the widget "start".
|
/// The body for the widget "start".
|
||||||
var start: () -> Body = { [] }
|
var start: () -> Body = { [] }
|
||||||
/// The body for the widget "end".
|
/// The body for the widget "end".
|
||||||
@ -93,7 +93,7 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let titleWidgetStorage = titleWidget?().storage(data: data, type: type) {
|
if let titleWidgetStorage = titleWidget?.storage(data: data, type: type) {
|
||||||
storage.content["titleWidget"] = [titleWidgetStorage]
|
storage.content["titleWidget"] = [titleWidgetStorage]
|
||||||
adw_header_bar_set_title_widget(storage.opaquePointer, titleWidgetStorage.opaquePointer?.cast())
|
adw_header_bar_set_title_widget(storage.opaquePointer, titleWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
adw_header_bar_set_show_title(widget, showTitle.cBool)
|
adw_header_bar_set_show_title(widget, showTitle.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["titleWidget"]?.first {
|
if let widget = storage.content["titleWidget"]?.first {
|
||||||
titleWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
titleWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let startStorage = storage.content["start"] {
|
if let startStorage = storage.content["start"] {
|
||||||
@ -189,9 +189,7 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
/// For example, “icon:minimize,maximize,close” specifies an icon at the start,
|
/// For example, “icon:minimize,maximize,close” specifies an icon at the start,
|
||||||
/// and minimize, maximize and close buttons at the end.
|
/// and minimize, maximize and close buttons at the end.
|
||||||
public func decorationLayout(_ decorationLayout: String?) -> Self {
|
public func decorationLayout(_ decorationLayout: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.decorationLayout = decorationLayout }
|
||||||
newSelf.decorationLayout = decorationLayout
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the header bar can show the back button.
|
/// Whether the header bar can show the back button.
|
||||||
@ -199,9 +197,7 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
/// The back button will never be shown unless the header bar is placed inside an
|
/// The back button will never be shown unless the header bar is placed inside an
|
||||||
/// `NavigationView`. Usually, there is no reason to set this to `false`.
|
/// `NavigationView`. Usually, there is no reason to set this to `false`.
|
||||||
public func showBackButton(_ showBackButton: Bool? = true) -> Self {
|
public func showBackButton(_ showBackButton: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showBackButton = showBackButton }
|
||||||
newSelf.showBackButton = showBackButton
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show title buttons at the end of the header bar.
|
/// Whether to show title buttons at the end of the header bar.
|
||||||
@ -213,9 +209,7 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
/// window (e.g. a close button will not be shown if the window can't be
|
/// window (e.g. a close button will not be shown if the window can't be
|
||||||
/// closed).
|
/// closed).
|
||||||
public func showEndTitleButtons(_ showEndTitleButtons: Bool? = true) -> Self {
|
public func showEndTitleButtons(_ showEndTitleButtons: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showEndTitleButtons = showEndTitleButtons }
|
||||||
newSelf.showEndTitleButtons = showEndTitleButtons
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show title buttons at the start of the header bar.
|
/// Whether to show title buttons at the start of the header bar.
|
||||||
@ -227,16 +221,12 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
/// window (e.g. a close button will not be shown if the window can't be
|
/// window (e.g. a close button will not be shown if the window can't be
|
||||||
/// closed).
|
/// closed).
|
||||||
public func showStartTitleButtons(_ showStartTitleButtons: Bool? = true) -> Self {
|
public func showStartTitleButtons(_ showStartTitleButtons: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showStartTitleButtons = showStartTitleButtons }
|
||||||
newSelf.showStartTitleButtons = showStartTitleButtons
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the title widget should be shown.
|
/// Whether the title widget should be shown.
|
||||||
public func showTitle(_ showTitle: Bool? = true) -> Self {
|
public func showTitle(_ showTitle: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showTitle = showTitle }
|
||||||
newSelf.showTitle = showTitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title widget to display.
|
/// The title widget to display.
|
||||||
@ -249,10 +239,8 @@ public struct HeaderBar: AdwaitaWidget {
|
|||||||
/// ```xml
|
/// ```xml
|
||||||
/// <object class="AdwHeaderBar"><property name="title-widget"><object class="AdwWindowTitle"><property name="title" translatable="yes">Title</property></object></property></object>
|
/// <object class="AdwHeaderBar"><property name="title-widget"><object class="AdwWindowTitle"><property name="title" translatable="yes">Title</property></object></property></object>
|
||||||
/// ```
|
/// ```
|
||||||
public func titleWidget(@ViewBuilder _ titleWidget: @escaping (() -> Body)) -> Self {
|
public func titleWidget(@ViewBuilder _ titleWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleWidget = titleWidget() }
|
||||||
newSelf.titleWidget = titleWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the body for "start".
|
/// Set the body for "start".
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Image.swift
|
// Image.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -121,18 +121,14 @@ public struct Image: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the icon in the icon theme.
|
/// The name of the icon in the icon theme.
|
||||||
///
|
///
|
||||||
/// If the icon theme is changed, the image will be updated automatically.
|
/// If the icon theme is changed, the image will be updated automatically.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The size in pixels to display icons at.
|
/// The size in pixels to display icons at.
|
||||||
@ -141,23 +137,17 @@ public struct Image: AdwaitaWidget {
|
|||||||
/// ``iconSize(_:)`` property for images of type
|
/// ``iconSize(_:)`` property for images of type
|
||||||
/// `GTK_IMAGE_ICON_NAME`.
|
/// `GTK_IMAGE_ICON_NAME`.
|
||||||
public func pixelSize(_ pixelSize: Int?) -> Self {
|
public func pixelSize(_ pixelSize: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.pixelSize = pixelSize }
|
||||||
newSelf.pixelSize = pixelSize
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A path to a resource file to display.
|
/// A path to a resource file to display.
|
||||||
public func resource(_ resource: String?) -> Self {
|
public func resource(_ resource: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.resource = resource }
|
||||||
newSelf.resource = resource
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The representation being used for image data.
|
/// The representation being used for image data.
|
||||||
public func storageType(_ storageType: String?) -> Self {
|
public func storageType(_ storageType: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.storageType = storageType }
|
||||||
newSelf.storageType = storageType
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the icon displayed in the `GtkImage` will use
|
/// Whether the icon displayed in the `GtkImage` will use
|
||||||
@ -166,9 +156,7 @@ public struct Image: AdwaitaWidget {
|
|||||||
/// The value of this property is only relevant for images of type
|
/// The value of this property is only relevant for images of type
|
||||||
/// %GTK_IMAGE_ICON_NAME and %GTK_IMAGE_GICON.
|
/// %GTK_IMAGE_ICON_NAME and %GTK_IMAGE_GICON.
|
||||||
public func useFallback(_ useFallback: Bool? = true) -> Self {
|
public func useFallback(_ useFallback: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useFallback = useFallback }
|
||||||
newSelf.useFallback = useFallback
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Label.swift
|
// Label.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -64,7 +64,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
/// The mnemonic accelerator key for the label.
|
/// The mnemonic accelerator key for the label.
|
||||||
var mnemonicKeyval: UInt?
|
var mnemonicKeyval: UInt?
|
||||||
/// The widget to be activated when the labels mnemonic key is pressed.
|
/// The widget to be activated when the labels mnemonic key is pressed.
|
||||||
var mnemonicWidget: (() -> Body)?
|
var mnemonicWidget: Body?
|
||||||
/// Whether the label text can be selected with the mouse.
|
/// Whether the label text can be selected with the mouse.
|
||||||
var selectable: Bool?
|
var selectable: Bool?
|
||||||
/// Whether the label is in single line mode.
|
/// Whether the label is in single line mode.
|
||||||
@ -122,7 +122,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let mnemonicWidgetStorage = mnemonicWidget?().storage(data: data, type: type) {
|
if let mnemonicWidgetStorage = mnemonicWidget?.storage(data: data, type: type) {
|
||||||
storage.content["mnemonicWidget"] = [mnemonicWidgetStorage]
|
storage.content["mnemonicWidget"] = [mnemonicWidgetStorage]
|
||||||
gtk_label_set_mnemonic_widget(storage.opaquePointer, mnemonicWidgetStorage.opaquePointer?.cast())
|
gtk_label_set_mnemonic_widget(storage.opaquePointer, mnemonicWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
gtk_label_set_max_width_chars(widget, maxWidthChars.cInt)
|
gtk_label_set_max_width_chars(widget, maxWidthChars.cInt)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["mnemonicWidget"]?.first {
|
if let widget = storage.content["mnemonicWidget"]?.first {
|
||||||
mnemonicWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
mnemonicWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let selectable, updateProperties, (storage.previousState as? Self)?.selectable != selectable {
|
if let selectable, updateProperties, (storage.previousState as? Self)?.selectable != selectable {
|
||||||
gtk_label_set_selectable(widget, selectable.cBool)
|
gtk_label_set_selectable(widget, selectable.cBool)
|
||||||
@ -196,9 +196,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The contents of the label.
|
/// The contents of the label.
|
||||||
@ -214,9 +212,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
/// set the ``useUnderline(_:)`` property to true in order
|
/// set the ``useUnderline(_:)`` property to true in order
|
||||||
/// for the label to display them.
|
/// for the label to display them.
|
||||||
public func label(_ label: String) -> Self {
|
public func label(_ label: String) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines to which an ellipsized, wrapping label
|
/// The number of lines to which an ellipsized, wrapping label
|
||||||
@ -235,9 +231,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// Set this property to -1 if you don't want to limit the number of lines.
|
/// Set this property to -1 if you don't want to limit the number of lines.
|
||||||
public func lines(_ lines: Int?) -> Self {
|
public func lines(_ lines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.lines = lines }
|
||||||
newSelf.lines = lines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The desired maximum width of the label, in characters.
|
/// The desired maximum width of the label, in characters.
|
||||||
@ -246,30 +240,22 @@ public struct Label: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See the section on [text layout](class.Label.html
|
/// See the section on [text layout](class.Label.html
|
||||||
public func maxWidthChars(_ maxWidthChars: Int?) -> Self {
|
public func maxWidthChars(_ maxWidthChars: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxWidthChars = maxWidthChars }
|
||||||
newSelf.maxWidthChars = maxWidthChars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The mnemonic accelerator key for the label.
|
/// The mnemonic accelerator key for the label.
|
||||||
public func mnemonicKeyval(_ mnemonicKeyval: UInt?) -> Self {
|
public func mnemonicKeyval(_ mnemonicKeyval: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.mnemonicKeyval = mnemonicKeyval }
|
||||||
newSelf.mnemonicKeyval = mnemonicKeyval
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The widget to be activated when the labels mnemonic key is pressed.
|
/// The widget to be activated when the labels mnemonic key is pressed.
|
||||||
public func mnemonicWidget(@ViewBuilder _ mnemonicWidget: @escaping (() -> Body)) -> Self {
|
public func mnemonicWidget(@ViewBuilder _ mnemonicWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.mnemonicWidget = mnemonicWidget() }
|
||||||
newSelf.mnemonicWidget = mnemonicWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the label text can be selected with the mouse.
|
/// Whether the label text can be selected with the mouse.
|
||||||
public func selectable(_ selectable: Bool? = true) -> Self {
|
public func selectable(_ selectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.selectable = selectable }
|
||||||
newSelf.selectable = selectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the label is in single line mode.
|
/// Whether the label is in single line mode.
|
||||||
@ -279,26 +265,20 @@ public struct Label: AdwaitaWidget {
|
|||||||
/// can be an advantage in situations where resizing the label because
|
/// can be an advantage in situations where resizing the label because
|
||||||
/// of text changes would be distracting, e.g. in a statusbar.
|
/// of text changes would be distracting, e.g. in a statusbar.
|
||||||
public func singleLineMode(_ singleLineMode: Bool? = true) -> Self {
|
public func singleLineMode(_ singleLineMode: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.singleLineMode = singleLineMode }
|
||||||
newSelf.singleLineMode = singleLineMode
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True if the text of the label includes Pango markup.
|
/// True if the text of the label includes Pango markup.
|
||||||
///
|
///
|
||||||
/// See `Pango.parse_markup`.
|
/// See `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True if the text of the label indicates a mnemonic with an `_`
|
/// True if the text of the label indicates a mnemonic with an `_`
|
||||||
/// before the mnemonic character.
|
/// before the mnemonic character.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The desired width of the label, in characters.
|
/// The desired width of the label, in characters.
|
||||||
@ -307,16 +287,12 @@ public struct Label: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See the section on [text layout](class.Label.html
|
/// See the section on [text layout](class.Label.html
|
||||||
public func widthChars(_ widthChars: Int?) -> Self {
|
public func widthChars(_ widthChars: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.widthChars = widthChars }
|
||||||
newSelf.widthChars = widthChars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True if the label text will wrap if it gets too wide.
|
/// True if the label text will wrap if it gets too wide.
|
||||||
public func wrap(_ wrap: Bool? = true) -> Self {
|
public func wrap(_ wrap: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.wrap = wrap }
|
||||||
newSelf.wrap = wrap
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The horizontal alignment of the label text inside its size allocation.
|
/// The horizontal alignment of the label text inside its size allocation.
|
||||||
@ -324,9 +300,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
/// Compare this to ``halign(_:)``, which determines how the
|
/// Compare this to ``halign(_:)``, which determines how the
|
||||||
/// labels size allocation is positioned in the space available for the label.
|
/// labels size allocation is positioned in the space available for the label.
|
||||||
public func xalign(_ xalign: Float?) -> Self {
|
public func xalign(_ xalign: Float?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.xalign = xalign }
|
||||||
newSelf.xalign = xalign
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The vertical alignment of the label text inside its size allocation.
|
/// The vertical alignment of the label text inside its size allocation.
|
||||||
@ -334,9 +308,7 @@ public struct Label: AdwaitaWidget {
|
|||||||
/// Compare this to ``valign(_:)``, which determines how the
|
/// Compare this to ``valign(_:)``, which determines how the
|
||||||
/// labels size allocation is positioned in the space available for the label.
|
/// labels size allocation is positioned in the space available for the label.
|
||||||
public func yalign(_ yalign: Float?) -> Self {
|
public func yalign(_ yalign: Float?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.yalign = yalign }
|
||||||
newSelf.yalign = yalign
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets emitted to copy the selection to the clipboard.
|
/// Gets emitted to copy the selection to the clipboard.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// LevelBar.swift
|
// LevelBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -120,9 +120,7 @@ public struct LevelBar: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the `GtkLeveBar` is inverted.
|
/// Whether the `GtkLeveBar` is inverted.
|
||||||
@ -130,30 +128,22 @@ public struct LevelBar: AdwaitaWidget {
|
|||||||
/// Level bars normally grow from top to bottom or left to right.
|
/// Level bars normally grow from top to bottom or left to right.
|
||||||
/// Inverted level bars grow in the opposite direction.
|
/// Inverted level bars grow in the opposite direction.
|
||||||
public func inverted(_ inverted: Bool? = true) -> Self {
|
public func inverted(_ inverted: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.inverted = inverted }
|
||||||
newSelf.inverted = inverted
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines the maximum value of the interval that can be displayed by the bar.
|
/// Determines the maximum value of the interval that can be displayed by the bar.
|
||||||
public func maxValue(_ maxValue: Double?) -> Self {
|
public func maxValue(_ maxValue: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxValue = maxValue }
|
||||||
newSelf.maxValue = maxValue
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines the minimum value of the interval that can be displayed by the bar.
|
/// Determines the minimum value of the interval that can be displayed by the bar.
|
||||||
public func minValue(_ minValue: Double?) -> Self {
|
public func minValue(_ minValue: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.minValue = minValue }
|
||||||
newSelf.minValue = minValue
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines the currently filled value of the level bar.
|
/// Determines the currently filled value of the level bar.
|
||||||
public func value(_ value: Double?) -> Self {
|
public func value(_ value: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.value = value }
|
||||||
newSelf.value = value
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when an offset specified on the bar changes value.
|
/// Emitted when an offset specified on the bar changes value.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// LinkButton.swift
|
// LinkButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -49,7 +49,7 @@ public struct LinkButton: AdwaitaWidget {
|
|||||||
/// property has no effect.
|
/// property has no effect.
|
||||||
var canShrink: Bool?
|
var canShrink: Bool?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
var hasFrame: Bool?
|
var hasFrame: Bool?
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
@ -92,7 +92,7 @@ public struct LinkButton: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ public struct LinkButton: AdwaitaWidget {
|
|||||||
gtk_button_set_can_shrink(widget?.cast(), canShrink.cBool)
|
gtk_button_set_can_shrink(widget?.cast(), canShrink.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
||||||
gtk_button_set_has_frame(widget?.cast(), hasFrame.cBool)
|
gtk_button_set_has_frame(widget?.cast(), hasFrame.cBool)
|
||||||
@ -162,16 +162,12 @@ public struct LinkButton: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the action with which this widget should be associated.
|
/// The name of the action with which this widget should be associated.
|
||||||
public func actionName(_ actionName: String?) -> Self {
|
public func actionName(_ actionName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.actionName = actionName }
|
||||||
newSelf.actionName = actionName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the size of the button can be made smaller than the natural
|
/// Whether the size of the button can be made smaller than the natural
|
||||||
@ -182,61 +178,45 @@ public struct LinkButton: AdwaitaWidget {
|
|||||||
/// If the contents of a button are an icon or a custom widget, setting this
|
/// If the contents of a button are an icon or a custom widget, setting this
|
||||||
/// property has no effect.
|
/// property has no effect.
|
||||||
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.canShrink = canShrink }
|
||||||
newSelf.canShrink = canShrink
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hasFrame = hasFrame }
|
||||||
newSelf.hasFrame = hasFrame
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Text of the label inside the button, if the button contains a label widget.
|
/// Text of the label inside the button, if the button contains a label widget.
|
||||||
public func label(_ label: String?) -> Self {
|
public func label(_ label: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The URI bound to this button.
|
/// The URI bound to this button.
|
||||||
public func uri(_ uri: String) -> Self {
|
public func uri(_ uri: String) -> Self {
|
||||||
var newSelf = self
|
modify { $0.uri = uri }
|
||||||
newSelf.uri = uri
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If set, an underline in the text indicates that the following character is
|
/// If set, an underline in the text indicates that the following character is
|
||||||
/// to be used as mnemonic.
|
/// to be used as mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The 'visited' state of this button.
|
/// The 'visited' state of this button.
|
||||||
///
|
///
|
||||||
/// A visited link is drawn in a different color.
|
/// A visited link is drawn in a different color.
|
||||||
public func visited(_ visited: Bool? = true) -> Self {
|
public func visited(_ visited: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.visited = visited }
|
||||||
newSelf.visited = visited
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to animate press then release.
|
/// Emitted to animate press then release.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ListBox.swift
|
// ListBox.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -208,33 +208,25 @@ public struct ListBox<Element>: AdwaitaWidget where Element: Identifiable {
|
|||||||
|
|
||||||
/// Whether to accept unpaired release events.
|
/// Whether to accept unpaired release events.
|
||||||
public func acceptUnpairedRelease(_ acceptUnpairedRelease: Bool? = true) -> Self {
|
public func acceptUnpairedRelease(_ acceptUnpairedRelease: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.acceptUnpairedRelease = acceptUnpairedRelease }
|
||||||
newSelf.acceptUnpairedRelease = acceptUnpairedRelease
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The accessible role of the given `GtkAccessible` implementation.
|
/// The accessible role of the given `GtkAccessible` implementation.
|
||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Determines whether children can be activated with a single
|
/// Determines whether children can be activated with a single
|
||||||
/// click, or require a double-click.
|
/// click, or require a double-click.
|
||||||
public func activateOnSingleClick(_ activateOnSingleClick: Bool? = true) -> Self {
|
public func activateOnSingleClick(_ activateOnSingleClick: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activateOnSingleClick = activateOnSingleClick }
|
||||||
newSelf.activateOnSingleClick = activateOnSingleClick
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show separators between rows.
|
/// Whether to show separators between rows.
|
||||||
public func showSeparators(_ showSeparators: Bool? = true) -> Self {
|
public func showSeparators(_ showSeparators: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showSeparators = showSeparators }
|
||||||
newSelf.showSeparators = showSeparators
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when the cursor row is activated.
|
/// Emitted when the cursor row is activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Menu.swift
|
// Menu.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -61,7 +61,7 @@ public struct Menu: AdwaitaWidget {
|
|||||||
/// size of its contents.
|
/// size of its contents.
|
||||||
var canShrink: Bool?
|
var canShrink: Bool?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
var hasFrame: Bool?
|
var hasFrame: Bool?
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
@ -72,7 +72,7 @@ public struct Menu: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See `Gtk.MenuButton.set_menu_model` for the interaction
|
/// See `Gtk.MenuButton.set_menu_model` for the interaction
|
||||||
/// with the ``popover(_:)`` property.
|
/// with the ``popover(_:)`` property.
|
||||||
var menuModel: (() -> Body)?
|
var menuModel: Body?
|
||||||
/// Whether the menu button acts as a primary menu.
|
/// Whether the menu button acts as a primary menu.
|
||||||
///
|
///
|
||||||
/// Primary menus can be opened using the <kbd>F10</kbd> key
|
/// Primary menus can be opened using the <kbd>F10</kbd> key
|
||||||
@ -100,12 +100,12 @@ public struct Menu: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_menu_button_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
gtk_menu_button_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
if let menu = menuModel?() {
|
if let menuModel {
|
||||||
let childStorage = MenuCollection { menu }.getMenu(data: data)
|
let childStorage = MenuCollection { menuModel }.getMenu(data: data)
|
||||||
storage.content["menuModel"] = [childStorage]
|
storage.content["menuModel"] = [childStorage]
|
||||||
gtk_menu_button_set_menu_model(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
gtk_menu_button_set_menu_model(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ if let active, newValue != active.wrappedValue {
|
|||||||
gtk_menu_button_set_can_shrink(widget, canShrink.cBool)
|
gtk_menu_button_set_can_shrink(widget, canShrink.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
||||||
gtk_menu_button_set_has_frame(widget, hasFrame.cBool)
|
gtk_menu_button_set_has_frame(widget, hasFrame.cBool)
|
||||||
@ -155,7 +155,7 @@ if let active, newValue != active.wrappedValue {
|
|||||||
gtk_menu_button_set_label(widget, label)
|
gtk_menu_button_set_label(widget, label)
|
||||||
}
|
}
|
||||||
if let menu = storage.content["menuModel"]?.first {
|
if let menu = storage.content["menuModel"]?.first {
|
||||||
MenuCollection { menuModel?() ?? [] }
|
MenuCollection { menuModel ?? [] }
|
||||||
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
||||||
}
|
}
|
||||||
if let primary, updateProperties, (storage.previousState as? Self)?.primary != primary {
|
if let primary, updateProperties, (storage.previousState as? Self)?.primary != primary {
|
||||||
@ -180,85 +180,63 @@ if let active, newValue != active.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the menu button is active.
|
/// Whether the menu button is active.
|
||||||
public func active(_ active: Binding<Bool>?) -> Self {
|
public func active(_ active: Binding<Bool>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.active = active }
|
||||||
newSelf.active = active
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show a dropdown arrow even when using an icon or a custom child.
|
/// Whether to show a dropdown arrow even when using an icon or a custom child.
|
||||||
public func alwaysShowArrow(_ alwaysShowArrow: Bool? = true) -> Self {
|
public func alwaysShowArrow(_ alwaysShowArrow: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.alwaysShowArrow = alwaysShowArrow }
|
||||||
newSelf.alwaysShowArrow = alwaysShowArrow
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the size of the button can be made smaller than the natural
|
/// Whether the size of the button can be made smaller than the natural
|
||||||
/// size of its contents.
|
/// size of its contents.
|
||||||
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.canShrink = canShrink }
|
||||||
newSelf.canShrink = canShrink
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hasFrame = hasFrame }
|
||||||
newSelf.hasFrame = hasFrame
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The label for the button.
|
/// The label for the button.
|
||||||
public func label(_ label: String?) -> Self {
|
public func label(_ label: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The `GMenuModel` from which the popup will be created.
|
/// The `GMenuModel` from which the popup will be created.
|
||||||
///
|
///
|
||||||
/// See `Gtk.MenuButton.set_menu_model` for the interaction
|
/// See `Gtk.MenuButton.set_menu_model` for the interaction
|
||||||
/// with the ``popover(_:)`` property.
|
/// with the ``popover(_:)`` property.
|
||||||
public func menuModel(@ViewBuilder _ menuModel: @escaping (() -> Body)) -> Self {
|
public func menuModel(@ViewBuilder _ menuModel: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.menuModel = menuModel() }
|
||||||
newSelf.menuModel = menuModel
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the menu button acts as a primary menu.
|
/// Whether the menu button acts as a primary menu.
|
||||||
///
|
///
|
||||||
/// Primary menus can be opened using the <kbd>F10</kbd> key
|
/// Primary menus can be opened using the <kbd>F10</kbd> key
|
||||||
public func primary(_ primary: Bool? = true) -> Self {
|
public func primary(_ primary: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.primary = primary }
|
||||||
newSelf.primary = primary
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If set an underscore in the text indicates a mnemonic.
|
/// If set an underscore in the text indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to when the menu button is activated.
|
/// Emitted to when the menu button is activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// NavigationView.swift
|
// NavigationView.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -176,9 +176,7 @@ public struct NavigationView: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// Gesture-based transitions are always animated.
|
/// Gesture-based transitions are always animated.
|
||||||
public func animateTransitions(_ animateTransitions: Bool? = true) -> Self {
|
public func animateTransitions(_ animateTransitions: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.animateTransitions = animateTransitions }
|
||||||
newSelf.animateTransitions = animateTransitions
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the view is horizontally homogeneous.
|
/// Whether the view is horizontally homogeneous.
|
||||||
@ -189,9 +187,7 @@ public struct NavigationView: AdwaitaWidget {
|
|||||||
/// If it's not, the page may change width when a different page becomes
|
/// If it's not, the page may change width when a different page becomes
|
||||||
/// visible.
|
/// visible.
|
||||||
public func hhomogeneous(_ hhomogeneous: Bool? = true) -> Self {
|
public func hhomogeneous(_ hhomogeneous: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hhomogeneous = hhomogeneous }
|
||||||
newSelf.hhomogeneous = hhomogeneous
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether pressing Escape pops the current page.
|
/// Whether pressing Escape pops the current page.
|
||||||
@ -199,9 +195,7 @@ public struct NavigationView: AdwaitaWidget {
|
|||||||
/// Applications using `AdwNavigationView` to implement a browser may want to
|
/// Applications using `AdwNavigationView` to implement a browser may want to
|
||||||
/// disable it.
|
/// disable it.
|
||||||
public func popOnEscape(_ popOnEscape: Bool? = true) -> Self {
|
public func popOnEscape(_ popOnEscape: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.popOnEscape = popOnEscape }
|
||||||
newSelf.popOnEscape = popOnEscape
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the view is vertically homogeneous.
|
/// Whether the view is vertically homogeneous.
|
||||||
@ -212,16 +206,12 @@ public struct NavigationView: AdwaitaWidget {
|
|||||||
/// If it's not, the view may change height when a different page becomes
|
/// If it's not, the view may change height when a different page becomes
|
||||||
/// visible.
|
/// visible.
|
||||||
public func vhomogeneous(_ vhomogeneous: Bool? = true) -> Self {
|
public func vhomogeneous(_ vhomogeneous: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.vhomogeneous = vhomogeneous }
|
||||||
newSelf.vhomogeneous = vhomogeneous
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The tag of the currently visible page.
|
/// The tag of the currently visible page.
|
||||||
public func visiblePageTag(_ visiblePageTag: String?) -> Self {
|
public func visiblePageTag(_ visiblePageTag: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.visiblePageTag = visiblePageTag }
|
||||||
newSelf.visiblePageTag = visiblePageTag
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when a push shortcut or a gesture is triggered.
|
/// Emitted when a push shortcut or a gesture is triggered.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Overlay.swift
|
// Overlay.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -41,7 +41,7 @@ public struct Overlay: AdwaitaWidget {
|
|||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
var accessibleRole: String?
|
var accessibleRole: String?
|
||||||
/// The main child widget.
|
/// The main child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// Emitted to determine the position and size of any overlay
|
/// Emitted to determine the position and size of any overlay
|
||||||
/// child widgets.
|
/// child widgets.
|
||||||
///
|
///
|
||||||
@ -75,7 +75,7 @@ public struct Overlay: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_overlay_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
gtk_overlay_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ public struct Overlay: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let overlayStorage = storage.content["overlay"] {
|
if let overlayStorage = storage.content["overlay"] {
|
||||||
@ -134,16 +134,12 @@ public struct Overlay: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The main child widget.
|
/// The main child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to determine the position and size of any overlay
|
/// Emitted to determine the position and size of any overlay
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// OverlaySplitView.swift
|
// OverlaySplitView.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -61,7 +61,7 @@ public struct OverlaySplitView: AdwaitaWidget {
|
|||||||
/// content widget, otherwise they are displayed side by side.
|
/// content widget, otherwise they are displayed side by side.
|
||||||
var collapsed: Bool?
|
var collapsed: Bool?
|
||||||
/// The content widget.
|
/// The content widget.
|
||||||
var content: (() -> Body)?
|
var content: Body?
|
||||||
/// Whether the sidebar can be closed with a swipe gesture.
|
/// Whether the sidebar can be closed with a swipe gesture.
|
||||||
///
|
///
|
||||||
/// Only touchscreen swipes are supported.
|
/// Only touchscreen swipes are supported.
|
||||||
@ -95,7 +95,7 @@ public struct OverlaySplitView: AdwaitaWidget {
|
|||||||
/// Whether the sidebar widget is shown.
|
/// Whether the sidebar widget is shown.
|
||||||
var showSidebar: Binding<Bool>?
|
var showSidebar: Binding<Bool>?
|
||||||
/// The sidebar widget.
|
/// The sidebar widget.
|
||||||
var sidebar: (() -> Body)?
|
var sidebar: Body?
|
||||||
/// The preferred sidebar width as a fraction of the total width.
|
/// The preferred sidebar width as a fraction of the total width.
|
||||||
///
|
///
|
||||||
/// The preferred width is additionally limited by
|
/// The preferred width is additionally limited by
|
||||||
@ -121,11 +121,11 @@ public struct OverlaySplitView: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let contentStorage = content?().storage(data: data, type: type) {
|
if let contentStorage = content?.storage(data: data, type: type) {
|
||||||
storage.content["content"] = [contentStorage]
|
storage.content["content"] = [contentStorage]
|
||||||
adw_overlay_split_view_set_content(storage.opaquePointer, contentStorage.opaquePointer?.cast())
|
adw_overlay_split_view_set_content(storage.opaquePointer, contentStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
if let sidebarStorage = sidebar?().storage(data: data, type: type) {
|
if let sidebarStorage = sidebar?.storage(data: data, type: type) {
|
||||||
storage.content["sidebar"] = [sidebarStorage]
|
storage.content["sidebar"] = [sidebarStorage]
|
||||||
adw_overlay_split_view_set_sidebar(storage.opaquePointer, sidebarStorage.opaquePointer?.cast())
|
adw_overlay_split_view_set_sidebar(storage.opaquePointer, sidebarStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ if let showSidebar, newValue != showSidebar.wrappedValue {
|
|||||||
adw_overlay_split_view_set_collapsed(widget, collapsed.cBool)
|
adw_overlay_split_view_set_collapsed(widget, collapsed.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["content"]?.first {
|
if let widget = storage.content["content"]?.first {
|
||||||
content?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
content?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let enableHideGesture, updateProperties, (storage.previousState as? Self)?.enableHideGesture != enableHideGesture {
|
if let enableHideGesture, updateProperties, (storage.previousState as? Self)?.enableHideGesture != enableHideGesture {
|
||||||
adw_overlay_split_view_set_enable_hide_gesture(widget, enableHideGesture.cBool)
|
adw_overlay_split_view_set_enable_hide_gesture(widget, enableHideGesture.cBool)
|
||||||
@ -173,7 +173,7 @@ if let showSidebar, newValue != showSidebar.wrappedValue {
|
|||||||
adw_overlay_split_view_set_show_sidebar(storage.opaquePointer, showSidebar.wrappedValue.cBool)
|
adw_overlay_split_view_set_show_sidebar(storage.opaquePointer, showSidebar.wrappedValue.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["sidebar"]?.first {
|
if let widget = storage.content["sidebar"]?.first {
|
||||||
sidebar?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
sidebar?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let sidebarWidthFraction, updateProperties, (storage.previousState as? Self)?.sidebarWidthFraction != sidebarWidthFraction {
|
if let sidebarWidthFraction, updateProperties, (storage.previousState as? Self)?.sidebarWidthFraction != sidebarWidthFraction {
|
||||||
adw_overlay_split_view_set_sidebar_width_fraction(widget, sidebarWidthFraction)
|
adw_overlay_split_view_set_sidebar_width_fraction(widget, sidebarWidthFraction)
|
||||||
@ -195,34 +195,26 @@ if let showSidebar, newValue != showSidebar.wrappedValue {
|
|||||||
/// When collapsed, the sidebar widget is presented as an overlay above the
|
/// When collapsed, the sidebar widget is presented as an overlay above the
|
||||||
/// content widget, otherwise they are displayed side by side.
|
/// content widget, otherwise they are displayed side by side.
|
||||||
public func collapsed(_ collapsed: Bool? = true) -> Self {
|
public func collapsed(_ collapsed: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.collapsed = collapsed }
|
||||||
newSelf.collapsed = collapsed
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The content widget.
|
/// The content widget.
|
||||||
public func content(@ViewBuilder _ content: @escaping (() -> Body)) -> Self {
|
public func content(@ViewBuilder _ content: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.content = content() }
|
||||||
newSelf.content = content
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the sidebar can be closed with a swipe gesture.
|
/// Whether the sidebar can be closed with a swipe gesture.
|
||||||
///
|
///
|
||||||
/// Only touchscreen swipes are supported.
|
/// Only touchscreen swipes are supported.
|
||||||
public func enableHideGesture(_ enableHideGesture: Bool? = true) -> Self {
|
public func enableHideGesture(_ enableHideGesture: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableHideGesture = enableHideGesture }
|
||||||
newSelf.enableHideGesture = enableHideGesture
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the sidebar can be opened with an edge swipe gesture.
|
/// Whether the sidebar can be opened with an edge swipe gesture.
|
||||||
///
|
///
|
||||||
/// Only touchscreen swipes are supported.
|
/// Only touchscreen swipes are supported.
|
||||||
public func enableShowGesture(_ enableShowGesture: Bool? = true) -> Self {
|
public func enableShowGesture(_ enableShowGesture: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableShowGesture = enableShowGesture }
|
||||||
newSelf.enableShowGesture = enableShowGesture
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The maximum sidebar width.
|
/// The maximum sidebar width.
|
||||||
@ -233,9 +225,7 @@ if let showSidebar, newValue != showSidebar.wrappedValue {
|
|||||||
/// The sidebar widget can still be allocated with larger width if its own
|
/// The sidebar widget can still be allocated with larger width if its own
|
||||||
/// minimum width exceeds it.
|
/// minimum width exceeds it.
|
||||||
public func maxSidebarWidth(_ maxSidebarWidth: Double?) -> Self {
|
public func maxSidebarWidth(_ maxSidebarWidth: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxSidebarWidth = maxSidebarWidth }
|
||||||
newSelf.maxSidebarWidth = maxSidebarWidth
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The minimum sidebar width.
|
/// The minimum sidebar width.
|
||||||
@ -246,9 +236,7 @@ if let showSidebar, newValue != showSidebar.wrappedValue {
|
|||||||
/// The sidebar widget can still be allocated with larger width if its own
|
/// The sidebar widget can still be allocated with larger width if its own
|
||||||
/// minimum width exceeds it.
|
/// minimum width exceeds it.
|
||||||
public func minSidebarWidth(_ minSidebarWidth: Double?) -> Self {
|
public func minSidebarWidth(_ minSidebarWidth: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.minSidebarWidth = minSidebarWidth }
|
||||||
newSelf.minSidebarWidth = minSidebarWidth
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the sidebar widget is pinned.
|
/// Whether the sidebar widget is pinned.
|
||||||
@ -257,23 +245,17 @@ if let showSidebar, newValue != showSidebar.wrappedValue {
|
|||||||
/// uncollapsing it shows the sidebar. If set to `true`, sidebar visibility
|
/// uncollapsing it shows the sidebar. If set to `true`, sidebar visibility
|
||||||
/// never changes on its own.
|
/// never changes on its own.
|
||||||
public func pinSidebar(_ pinSidebar: Bool? = true) -> Self {
|
public func pinSidebar(_ pinSidebar: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.pinSidebar = pinSidebar }
|
||||||
newSelf.pinSidebar = pinSidebar
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the sidebar widget is shown.
|
/// Whether the sidebar widget is shown.
|
||||||
public func showSidebar(_ showSidebar: Binding<Bool>?) -> Self {
|
public func showSidebar(_ showSidebar: Binding<Bool>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showSidebar = showSidebar }
|
||||||
newSelf.showSidebar = showSidebar
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The sidebar widget.
|
/// The sidebar widget.
|
||||||
public func sidebar(@ViewBuilder _ sidebar: @escaping (() -> Body)) -> Self {
|
public func sidebar(@ViewBuilder _ sidebar: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.sidebar = sidebar() }
|
||||||
newSelf.sidebar = sidebar
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The preferred sidebar width as a fraction of the total width.
|
/// The preferred sidebar width as a fraction of the total width.
|
||||||
@ -285,9 +267,7 @@ if let showSidebar, newValue != showSidebar.wrappedValue {
|
|||||||
/// The sidebar widget can be allocated with larger width if its own minimum
|
/// The sidebar widget can be allocated with larger width if its own minimum
|
||||||
/// width exceeds the preferred width.
|
/// width exceeds the preferred width.
|
||||||
public func sidebarWidthFraction(_ sidebarWidthFraction: Double?) -> Self {
|
public func sidebarWidthFraction(_ sidebarWidthFraction: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.sidebarWidthFraction = sidebarWidthFraction }
|
||||||
newSelf.sidebarWidthFraction = sidebarWidthFraction
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PasswordEntryRow.swift
|
// PasswordEntryRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -164,25 +164,19 @@ public struct PasswordEntryRow: AdwaitaWidget {
|
|||||||
|
|
||||||
/// Whether activating the embedded entry can activate the default widget.
|
/// Whether activating the embedded entry can activate the default widget.
|
||||||
public func activatesDefault(_ activatesDefault: Bool? = true) -> Self {
|
public func activatesDefault(_ activatesDefault: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activatesDefault = activatesDefault }
|
||||||
newSelf.activatesDefault = activatesDefault
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to suggest emoji replacements on the entry row.
|
/// Whether to suggest emoji replacements on the entry row.
|
||||||
///
|
///
|
||||||
/// Emoji replacement is done with :-delimited names, like `:heart:`.
|
/// Emoji replacement is done with :-delimited names, like `:heart:`.
|
||||||
public func enableEmojiCompletion(_ enableEmojiCompletion: Bool? = true) -> Self {
|
public func enableEmojiCompletion(_ enableEmojiCompletion: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableEmojiCompletion = enableEmojiCompletion }
|
||||||
newSelf.enableEmojiCompletion = enableEmojiCompletion
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Maximum number of characters for the entry.
|
/// Maximum number of characters for the entry.
|
||||||
public func maxLength(_ maxLength: Int?) -> Self {
|
public func maxLength(_ maxLength: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxLength = maxLength }
|
||||||
newSelf.maxLength = maxLength
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show the apply button.
|
/// Whether to show the apply button.
|
||||||
@ -195,16 +189,12 @@ public struct PasswordEntryRow: AdwaitaWidget {
|
|||||||
/// operation, e.g. network activity, to avoid triggering it after typing every
|
/// operation, e.g. network activity, to avoid triggering it after typing every
|
||||||
/// character.
|
/// character.
|
||||||
public func showApplyButton(_ showApplyButton: Bool? = true) -> Self {
|
public func showApplyButton(_ showApplyButton: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showApplyButton = showApplyButton }
|
||||||
newSelf.showApplyButton = showApplyButton
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The length of the text in the entry row.
|
/// The length of the text in the entry row.
|
||||||
public func textLength(_ textLength: UInt?) -> Self {
|
public func textLength(_ textLength: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.textLength = textLength }
|
||||||
newSelf.textLength = textLength
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title of the preference represented by this row.
|
/// The title of the preference represented by this row.
|
||||||
@ -212,18 +202,14 @@ public struct PasswordEntryRow: AdwaitaWidget {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -232,16 +218,12 @@ public struct PasswordEntryRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when the apply button is pressed.
|
/// Emitted when the apply button is pressed.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Picture.swift
|
// Picture.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -107,30 +107,22 @@ public struct Picture: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The alternative textual description for the picture.
|
/// The alternative textual description for the picture.
|
||||||
public func alternativeText(_ alternativeText: String?) -> Self {
|
public func alternativeText(_ alternativeText: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.alternativeText = alternativeText }
|
||||||
newSelf.alternativeText = alternativeText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If the `GtkPicture` can be made smaller than the natural size of its contents.
|
/// If the `GtkPicture` can be made smaller than the natural size of its contents.
|
||||||
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.canShrink = canShrink }
|
||||||
newSelf.canShrink = canShrink
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// How the content should be resized to fit inside the `GtkPicture`.
|
/// How the content should be resized to fit inside the `GtkPicture`.
|
||||||
public func contentFit(_ contentFit: ContentFit?) -> Self {
|
public func contentFit(_ contentFit: ContentFit?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.contentFit = contentFit }
|
||||||
newSelf.contentFit = contentFit
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Popover.swift
|
// Popover.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -51,9 +51,9 @@ public struct Popover: AdwaitaWidget {
|
|||||||
/// This is used to implement the expected behavior of submenus.
|
/// This is used to implement the expected behavior of submenus.
|
||||||
var cascadePopdown: Bool?
|
var cascadePopdown: Bool?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// The default widget inside the popover.
|
/// The default widget inside the popover.
|
||||||
var defaultWidget: (() -> Body)?
|
var defaultWidget: Body?
|
||||||
/// Whether to draw an arrow.
|
/// Whether to draw an arrow.
|
||||||
var hasArrow: Bool?
|
var hasArrow: Bool?
|
||||||
/// Whether mnemonics are currently visible in this popover.
|
/// Whether mnemonics are currently visible in this popover.
|
||||||
@ -82,11 +82,11 @@ public struct Popover: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_popover_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
gtk_popover_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
if let defaultWidgetStorage = defaultWidget?().storage(data: data, type: type) {
|
if let defaultWidgetStorage = defaultWidget?.storage(data: data, type: type) {
|
||||||
storage.content["defaultWidget"] = [defaultWidgetStorage]
|
storage.content["defaultWidget"] = [defaultWidgetStorage]
|
||||||
gtk_popover_set_default_widget(storage.opaquePointer?.cast(), defaultWidgetStorage.opaquePointer?.cast())
|
gtk_popover_set_default_widget(storage.opaquePointer?.cast(), defaultWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -120,10 +120,10 @@ public struct Popover: AdwaitaWidget {
|
|||||||
gtk_popover_set_cascade_popdown(widget?.cast(), cascadePopdown.cBool)
|
gtk_popover_set_cascade_popdown(widget?.cast(), cascadePopdown.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["defaultWidget"]?.first {
|
if let widget = storage.content["defaultWidget"]?.first {
|
||||||
defaultWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
defaultWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let hasArrow, updateProperties, (storage.previousState as? Self)?.hasArrow != hasArrow {
|
if let hasArrow, updateProperties, (storage.previousState as? Self)?.hasArrow != hasArrow {
|
||||||
gtk_popover_set_has_arrow(widget?.cast(), hasArrow.cBool)
|
gtk_popover_set_has_arrow(widget?.cast(), hasArrow.cBool)
|
||||||
@ -147,53 +147,39 @@ public struct Popover: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to dismiss the popover on outside clicks.
|
/// Whether to dismiss the popover on outside clicks.
|
||||||
public func autohide(_ autohide: Bool? = true) -> Self {
|
public func autohide(_ autohide: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.autohide = autohide }
|
||||||
newSelf.autohide = autohide
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the popover pops down after a child popover.
|
/// Whether the popover pops down after a child popover.
|
||||||
///
|
///
|
||||||
/// This is used to implement the expected behavior of submenus.
|
/// This is used to implement the expected behavior of submenus.
|
||||||
public func cascadePopdown(_ cascadePopdown: Bool? = true) -> Self {
|
public func cascadePopdown(_ cascadePopdown: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.cascadePopdown = cascadePopdown }
|
||||||
newSelf.cascadePopdown = cascadePopdown
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The default widget inside the popover.
|
/// The default widget inside the popover.
|
||||||
public func defaultWidget(@ViewBuilder _ defaultWidget: @escaping (() -> Body)) -> Self {
|
public func defaultWidget(@ViewBuilder _ defaultWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.defaultWidget = defaultWidget() }
|
||||||
newSelf.defaultWidget = defaultWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to draw an arrow.
|
/// Whether to draw an arrow.
|
||||||
public func hasArrow(_ hasArrow: Bool? = true) -> Self {
|
public func hasArrow(_ hasArrow: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hasArrow = hasArrow }
|
||||||
newSelf.hasArrow = hasArrow
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether mnemonics are currently visible in this popover.
|
/// Whether mnemonics are currently visible in this popover.
|
||||||
public func mnemonicsVisible(_ mnemonicsVisible: Bool? = true) -> Self {
|
public func mnemonicsVisible(_ mnemonicsVisible: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.mnemonicsVisible = mnemonicsVisible }
|
||||||
newSelf.mnemonicsVisible = mnemonicsVisible
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted whend the user activates the default widget.
|
/// Emitted whend the user activates the default widget.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PreferencesGroup.swift
|
// PreferencesGroup.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -37,7 +37,7 @@ public struct PreferencesGroup: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// Suffixes are commonly used to show a button or a spinner for the whole
|
/// Suffixes are commonly used to show a button or a spinner for the whole
|
||||||
/// group.
|
/// group.
|
||||||
var headerSuffix: (() -> Body)?
|
var headerSuffix: Body?
|
||||||
/// Whether to separate rows.
|
/// Whether to separate rows.
|
||||||
///
|
///
|
||||||
/// Equivalent to using the
|
/// Equivalent to using the
|
||||||
@ -63,7 +63,7 @@ public struct PreferencesGroup: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let headerSuffixStorage = headerSuffix?().storage(data: data, type: type) {
|
if let headerSuffixStorage = headerSuffix?.storage(data: data, type: type) {
|
||||||
storage.content["headerSuffix"] = [headerSuffixStorage]
|
storage.content["headerSuffix"] = [headerSuffixStorage]
|
||||||
adw_preferences_group_set_header_suffix(storage.opaquePointer?.cast(), headerSuffixStorage.opaquePointer?.cast())
|
adw_preferences_group_set_header_suffix(storage.opaquePointer?.cast(), headerSuffixStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ public struct PreferencesGroup: AdwaitaWidget {
|
|||||||
adw_preferences_group_set_description(widget?.cast(), description)
|
adw_preferences_group_set_description(widget?.cast(), description)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["headerSuffix"]?.first {
|
if let widget = storage.content["headerSuffix"]?.first {
|
||||||
headerSuffix?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
headerSuffix?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let separateRows, updateProperties, (storage.previousState as? Self)?.separateRows != separateRows {
|
if let separateRows, updateProperties, (storage.previousState as? Self)?.separateRows != separateRows {
|
||||||
adw_preferences_group_set_separate_rows(widget?.cast(), separateRows.cBool)
|
adw_preferences_group_set_separate_rows(widget?.cast(), separateRows.cBool)
|
||||||
@ -124,9 +124,7 @@ public struct PreferencesGroup: AdwaitaWidget {
|
|||||||
|
|
||||||
/// The description for this group of preferences.
|
/// The description for this group of preferences.
|
||||||
public func description(_ description: String?) -> Self {
|
public func description(_ description: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.description = description }
|
||||||
newSelf.description = description
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The header suffix widget.
|
/// The header suffix widget.
|
||||||
@ -135,10 +133,8 @@ public struct PreferencesGroup: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// Suffixes are commonly used to show a button or a spinner for the whole
|
/// Suffixes are commonly used to show a button or a spinner for the whole
|
||||||
/// group.
|
/// group.
|
||||||
public func headerSuffix(@ViewBuilder _ headerSuffix: @escaping (() -> Body)) -> Self {
|
public func headerSuffix(@ViewBuilder _ headerSuffix: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.headerSuffix = headerSuffix() }
|
||||||
newSelf.headerSuffix = headerSuffix
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to separate rows.
|
/// Whether to separate rows.
|
||||||
@ -146,16 +142,12 @@ public struct PreferencesGroup: AdwaitaWidget {
|
|||||||
/// Equivalent to using the
|
/// Equivalent to using the
|
||||||
/// [`.boxed-list-separate`](style-classes.html
|
/// [`.boxed-list-separate`](style-classes.html
|
||||||
public func separateRows(_ separateRows: Bool? = true) -> Self {
|
public func separateRows(_ separateRows: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.separateRows = separateRows }
|
||||||
newSelf.separateRows = separateRows
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title for this group of preferences.
|
/// The title for this group of preferences.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the body for "child".
|
/// Set the body for "child".
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PreferencesPage.swift
|
// PreferencesPage.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -116,44 +116,32 @@ public struct PreferencesPage: AdwaitaWidget {
|
|||||||
|
|
||||||
/// The description to be displayed at the top of the page.
|
/// The description to be displayed at the top of the page.
|
||||||
public func description(_ description: String?) -> Self {
|
public func description(_ description: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.description = description }
|
||||||
newSelf.description = description
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the description should be centered.
|
/// Whether the description should be centered.
|
||||||
public func descriptionCentered(_ descriptionCentered: Bool? = true) -> Self {
|
public func descriptionCentered(_ descriptionCentered: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.descriptionCentered = descriptionCentered }
|
||||||
newSelf.descriptionCentered = descriptionCentered
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The icon name for this page.
|
/// The icon name for this page.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of this page.
|
/// The name of this page.
|
||||||
public func name(_ name: String?) -> Self {
|
public func name(_ name: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.name = name }
|
||||||
newSelf.name = name
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title for this page.
|
/// The title for this page.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the body for "child".
|
/// Set the body for "child".
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PreferencesRow.swift
|
// PreferencesRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -99,18 +99,14 @@ public struct PreferencesRow: AdwaitaWidget {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -119,16 +115,12 @@ public struct PreferencesRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ProgressBar.swift
|
// ProgressBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -124,30 +124,22 @@ public struct ProgressBar: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The fraction of total work that has been completed.
|
/// The fraction of total work that has been completed.
|
||||||
public func fraction(_ fraction: Double?) -> Self {
|
public func fraction(_ fraction: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.fraction = fraction }
|
||||||
newSelf.fraction = fraction
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Invert the direction in which the progress bar grows.
|
/// Invert the direction in which the progress bar grows.
|
||||||
public func inverted(_ inverted: Bool? = true) -> Self {
|
public func inverted(_ inverted: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.inverted = inverted }
|
||||||
newSelf.inverted = inverted
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The fraction of total progress to move the bounding block when pulsed.
|
/// The fraction of total progress to move the bounding block when pulsed.
|
||||||
public func pulseStep(_ pulseStep: Double?) -> Self {
|
public func pulseStep(_ pulseStep: Double?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.pulseStep = pulseStep }
|
||||||
newSelf.pulseStep = pulseStep
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets whether the progress bar will show a text in addition
|
/// Sets whether the progress bar will show a text in addition
|
||||||
@ -161,16 +153,12 @@ public struct ProgressBar: AdwaitaWidget {
|
|||||||
/// (even if the actual text is blank), set ``showText(_:)``
|
/// (even if the actual text is blank), set ``showText(_:)``
|
||||||
/// to `true` and ``text(_:)`` to the empty string (not %NULL).
|
/// to `true` and ``text(_:)`` to the empty string (not %NULL).
|
||||||
public func showText(_ showText: Bool? = true) -> Self {
|
public func showText(_ showText: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showText = showText }
|
||||||
newSelf.showText = showText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Text to be displayed in the progress bar.
|
/// Text to be displayed in the progress bar.
|
||||||
public func text(_ text: String?) -> Self {
|
public func text(_ text: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.text = text }
|
||||||
newSelf.text = text
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ScrolledWindow.swift
|
// ScrolledWindow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -56,7 +56,7 @@ public struct ScrolledWindow: AdwaitaWidget {
|
|||||||
/// When setting this property, if the child widget does not implement
|
/// When setting this property, if the child widget does not implement
|
||||||
/// `Gtk.Scrollable`, the scrolled window will add the child to
|
/// `Gtk.Scrollable`, the scrolled window will add the child to
|
||||||
/// a `Gtk.Viewport` and then set the viewport as the child.
|
/// a `Gtk.Viewport` and then set the viewport as the child.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// Whether to draw a frame around the contents.
|
/// Whether to draw a frame around the contents.
|
||||||
var hasFrame: Bool?
|
var hasFrame: Bool?
|
||||||
/// When the horizontal scrollbar is displayed.
|
/// When the horizontal scrollbar is displayed.
|
||||||
@ -154,7 +154,7 @@ public struct ScrolledWindow: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_scrolled_window_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
gtk_scrolled_window_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ public struct ScrolledWindow: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
||||||
gtk_scrolled_window_set_has_frame(widget, hasFrame.cBool)
|
gtk_scrolled_window_set_has_frame(widget, hasFrame.cBool)
|
||||||
@ -246,9 +246,7 @@ if hscrollbarPolicy != (storage.previousState as? Self)?.hscrollbarPolicy
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
@ -256,17 +254,13 @@ if hscrollbarPolicy != (storage.previousState as? Self)?.hscrollbarPolicy
|
|||||||
/// When setting this property, if the child widget does not implement
|
/// When setting this property, if the child widget does not implement
|
||||||
/// `Gtk.Scrollable`, the scrolled window will add the child to
|
/// `Gtk.Scrollable`, the scrolled window will add the child to
|
||||||
/// a `Gtk.Viewport` and then set the viewport as the child.
|
/// a `Gtk.Viewport` and then set the viewport as the child.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to draw a frame around the contents.
|
/// Whether to draw a frame around the contents.
|
||||||
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hasFrame = hasFrame }
|
||||||
newSelf.hasFrame = hasFrame
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// When the horizontal scrollbar is displayed.
|
/// When the horizontal scrollbar is displayed.
|
||||||
@ -274,46 +268,34 @@ if hscrollbarPolicy != (storage.previousState as? Self)?.hscrollbarPolicy
|
|||||||
/// Use `Gtk.ScrolledWindow.set_policy` to set
|
/// Use `Gtk.ScrolledWindow.set_policy` to set
|
||||||
/// this property.
|
/// this property.
|
||||||
public func hscrollbarPolicy(_ hscrollbarPolicy: ScrollbarVisibility?) -> Self {
|
public func hscrollbarPolicy(_ hscrollbarPolicy: ScrollbarVisibility?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hscrollbarPolicy = hscrollbarPolicy }
|
||||||
newSelf.hscrollbarPolicy = hscrollbarPolicy
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether kinetic scrolling is enabled or not.
|
/// Whether kinetic scrolling is enabled or not.
|
||||||
///
|
///
|
||||||
/// Kinetic scrolling only applies to devices with source %GDK_SOURCE_TOUCHSCREEN.
|
/// Kinetic scrolling only applies to devices with source %GDK_SOURCE_TOUCHSCREEN.
|
||||||
public func kineticScrolling(_ kineticScrolling: Bool? = true) -> Self {
|
public func kineticScrolling(_ kineticScrolling: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.kineticScrolling = kineticScrolling }
|
||||||
newSelf.kineticScrolling = kineticScrolling
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The maximum content height of @scrolled_window.
|
/// The maximum content height of @scrolled_window.
|
||||||
public func maxContentHeight(_ maxContentHeight: Int?) -> Self {
|
public func maxContentHeight(_ maxContentHeight: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxContentHeight = maxContentHeight }
|
||||||
newSelf.maxContentHeight = maxContentHeight
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The maximum content width of @scrolled_window.
|
/// The maximum content width of @scrolled_window.
|
||||||
public func maxContentWidth(_ maxContentWidth: Int?) -> Self {
|
public func maxContentWidth(_ maxContentWidth: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxContentWidth = maxContentWidth }
|
||||||
newSelf.maxContentWidth = maxContentWidth
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The minimum content height of @scrolled_window.
|
/// The minimum content height of @scrolled_window.
|
||||||
public func minContentHeight(_ minContentHeight: Int?) -> Self {
|
public func minContentHeight(_ minContentHeight: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.minContentHeight = minContentHeight }
|
||||||
newSelf.minContentHeight = minContentHeight
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The minimum content width of @scrolled_window.
|
/// The minimum content width of @scrolled_window.
|
||||||
public func minContentWidth(_ minContentWidth: Int?) -> Self {
|
public func minContentWidth(_ minContentWidth: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.minContentWidth = minContentWidth }
|
||||||
newSelf.minContentWidth = minContentWidth
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether overlay scrolling is enabled or not.
|
/// Whether overlay scrolling is enabled or not.
|
||||||
@ -325,9 +307,7 @@ if hscrollbarPolicy != (storage.previousState as? Self)?.hscrollbarPolicy
|
|||||||
/// Note that overlay scrolling can also be globally disabled, with
|
/// Note that overlay scrolling can also be globally disabled, with
|
||||||
/// the ``gtkOverlayScrolling(_:)`` setting.
|
/// the ``gtkOverlayScrolling(_:)`` setting.
|
||||||
public func overlayScrolling(_ overlayScrolling: Bool? = true) -> Self {
|
public func overlayScrolling(_ overlayScrolling: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.overlayScrolling = overlayScrolling }
|
||||||
newSelf.overlayScrolling = overlayScrolling
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the natural height of the child should be calculated and propagated
|
/// Whether the natural height of the child should be calculated and propagated
|
||||||
@ -336,9 +316,7 @@ if hscrollbarPolicy != (storage.previousState as? Self)?.hscrollbarPolicy
|
|||||||
/// This is useful in cases where an attempt should be made to allocate exactly
|
/// This is useful in cases where an attempt should be made to allocate exactly
|
||||||
/// enough space for the natural size of the child.
|
/// enough space for the natural size of the child.
|
||||||
public func propagateNaturalHeight(_ propagateNaturalHeight: Bool? = true) -> Self {
|
public func propagateNaturalHeight(_ propagateNaturalHeight: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.propagateNaturalHeight = propagateNaturalHeight }
|
||||||
newSelf.propagateNaturalHeight = propagateNaturalHeight
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the natural width of the child should be calculated and propagated
|
/// Whether the natural width of the child should be calculated and propagated
|
||||||
@ -347,9 +325,7 @@ if hscrollbarPolicy != (storage.previousState as? Self)?.hscrollbarPolicy
|
|||||||
/// This is useful in cases where an attempt should be made to allocate exactly
|
/// This is useful in cases where an attempt should be made to allocate exactly
|
||||||
/// enough space for the natural size of the child.
|
/// enough space for the natural size of the child.
|
||||||
public func propagateNaturalWidth(_ propagateNaturalWidth: Bool? = true) -> Self {
|
public func propagateNaturalWidth(_ propagateNaturalWidth: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.propagateNaturalWidth = propagateNaturalWidth }
|
||||||
newSelf.propagateNaturalWidth = propagateNaturalWidth
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// When the vertical scrollbar is displayed.
|
/// When the vertical scrollbar is displayed.
|
||||||
@ -357,9 +333,7 @@ if hscrollbarPolicy != (storage.previousState as? Self)?.hscrollbarPolicy
|
|||||||
/// Use `Gtk.ScrolledWindow.set_policy` to set
|
/// Use `Gtk.ScrolledWindow.set_policy` to set
|
||||||
/// this property.
|
/// this property.
|
||||||
public func vscrollbarPolicy(_ vscrollbarPolicy: ScrollbarVisibility?) -> Self {
|
public func vscrollbarPolicy(_ vscrollbarPolicy: ScrollbarVisibility?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.vscrollbarPolicy = vscrollbarPolicy }
|
||||||
newSelf.vscrollbarPolicy = vscrollbarPolicy
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted whenever user initiated scrolling makes the scrolled
|
/// Emitted whenever user initiated scrolling makes the scrolled
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SearchBar.swift
|
// SearchBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -40,9 +40,9 @@ public struct SearchBar: AdwaitaWidget {
|
|||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
var accessibleRole: String?
|
var accessibleRole: String?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// The key capture widget.
|
/// The key capture widget.
|
||||||
var keyCaptureWidget: (() -> Body)?
|
var keyCaptureWidget: Body?
|
||||||
/// Whether the search mode is on and the search bar shown.
|
/// Whether the search mode is on and the search bar shown.
|
||||||
var searchModeEnabled: Bool?
|
var searchModeEnabled: Bool?
|
||||||
/// Whether to show the close button in the search bar.
|
/// Whether to show the close button in the search bar.
|
||||||
@ -63,11 +63,11 @@ public struct SearchBar: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_search_bar_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
gtk_search_bar_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
if let keyCaptureWidgetStorage = keyCaptureWidget?().storage(data: data, type: type) {
|
if let keyCaptureWidgetStorage = keyCaptureWidget?.storage(data: data, type: type) {
|
||||||
storage.content["keyCaptureWidget"] = [keyCaptureWidgetStorage]
|
storage.content["keyCaptureWidget"] = [keyCaptureWidgetStorage]
|
||||||
gtk_search_bar_set_key_capture_widget(storage.opaquePointer, keyCaptureWidgetStorage.opaquePointer?.cast())
|
gtk_search_bar_set_key_capture_widget(storage.opaquePointer, keyCaptureWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -85,10 +85,10 @@ public struct SearchBar: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["keyCaptureWidget"]?.first {
|
if let widget = storage.content["keyCaptureWidget"]?.first {
|
||||||
keyCaptureWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
keyCaptureWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let searchModeEnabled, updateProperties, (storage.previousState as? Self)?.searchModeEnabled != searchModeEnabled {
|
if let searchModeEnabled, updateProperties, (storage.previousState as? Self)?.searchModeEnabled != searchModeEnabled {
|
||||||
gtk_search_bar_set_search_mode(widget, searchModeEnabled.cBool)
|
gtk_search_bar_set_search_mode(widget, searchModeEnabled.cBool)
|
||||||
@ -112,37 +112,27 @@ public struct SearchBar: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The key capture widget.
|
/// The key capture widget.
|
||||||
public func keyCaptureWidget(@ViewBuilder _ keyCaptureWidget: @escaping (() -> Body)) -> Self {
|
public func keyCaptureWidget(@ViewBuilder _ keyCaptureWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.keyCaptureWidget = keyCaptureWidget() }
|
||||||
newSelf.keyCaptureWidget = keyCaptureWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the search mode is on and the search bar shown.
|
/// Whether the search mode is on and the search bar shown.
|
||||||
public func searchModeEnabled(_ searchModeEnabled: Bool? = true) -> Self {
|
public func searchModeEnabled(_ searchModeEnabled: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.searchModeEnabled = searchModeEnabled }
|
||||||
newSelf.searchModeEnabled = searchModeEnabled
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to show the close button in the search bar.
|
/// Whether to show the close button in the search bar.
|
||||||
public func showCloseButton(_ showCloseButton: Bool? = true) -> Self {
|
public func showCloseButton(_ showCloseButton: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.showCloseButton = showCloseButton }
|
||||||
newSelf.showCloseButton = showCloseButton
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SearchEntry.swift
|
// SearchEntry.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -265,90 +265,66 @@ if let text, newValue != text.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to activate the default widget when Enter is pressed.
|
/// Whether to activate the default widget when Enter is pressed.
|
||||||
public func activatesDefault(_ activatesDefault: Bool? = true) -> Self {
|
public func activatesDefault(_ activatesDefault: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activatesDefault = activatesDefault }
|
||||||
newSelf.activatesDefault = activatesDefault
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The current position of the insertion cursor in chars.
|
/// The current position of the insertion cursor in chars.
|
||||||
public func cursorPosition(_ cursorPosition: Int?) -> Self {
|
public func cursorPosition(_ cursorPosition: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.cursorPosition = cursorPosition }
|
||||||
newSelf.cursorPosition = cursorPosition
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the entry contents can be edited.
|
/// Whether the entry contents can be edited.
|
||||||
public func editable(_ editable: Bool? = true) -> Self {
|
public func editable(_ editable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.editable = editable }
|
||||||
newSelf.editable = editable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If undo/redo should be enabled for the editable.
|
/// If undo/redo should be enabled for the editable.
|
||||||
public func enableUndo(_ enableUndo: Bool? = true) -> Self {
|
public func enableUndo(_ enableUndo: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.enableUndo = enableUndo }
|
||||||
newSelf.enableUndo = enableUndo
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The desired maximum width of the entry, in characters.
|
/// The desired maximum width of the entry, in characters.
|
||||||
public func maxWidthChars(_ maxWidthChars: Int?) -> Self {
|
public func maxWidthChars(_ maxWidthChars: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.maxWidthChars = maxWidthChars }
|
||||||
newSelf.maxWidthChars = maxWidthChars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The text that will be displayed in the `GtkSearchEntry`
|
/// The text that will be displayed in the `GtkSearchEntry`
|
||||||
/// when it is empty and unfocused.
|
/// when it is empty and unfocused.
|
||||||
public func placeholderText(_ placeholderText: String?) -> Self {
|
public func placeholderText(_ placeholderText: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.placeholderText = placeholderText }
|
||||||
newSelf.placeholderText = placeholderText
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The delay in milliseconds from last keypress to the search
|
/// The delay in milliseconds from last keypress to the search
|
||||||
/// changed signal.
|
/// changed signal.
|
||||||
public func searchDelay(_ searchDelay: UInt?) -> Self {
|
public func searchDelay(_ searchDelay: UInt?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.searchDelay = searchDelay }
|
||||||
newSelf.searchDelay = searchDelay
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The position of the opposite end of the selection from the cursor in chars.
|
/// The position of the opposite end of the selection from the cursor in chars.
|
||||||
public func selectionBound(_ selectionBound: Int?) -> Self {
|
public func selectionBound(_ selectionBound: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.selectionBound = selectionBound }
|
||||||
newSelf.selectionBound = selectionBound
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The contents of the entry.
|
/// The contents of the entry.
|
||||||
public func text(_ text: Binding<String>?) -> Self {
|
public func text(_ text: Binding<String>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.text = text }
|
||||||
newSelf.text = text
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Number of characters to leave space for in the entry.
|
/// Number of characters to leave space for in the entry.
|
||||||
public func widthChars(_ widthChars: Int?) -> Self {
|
public func widthChars(_ widthChars: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.widthChars = widthChars }
|
||||||
newSelf.widthChars = widthChars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The horizontal alignment, from 0 (left) to 1 (right).
|
/// The horizontal alignment, from 0 (left) to 1 (right).
|
||||||
///
|
///
|
||||||
/// Reversed for RTL layouts.
|
/// Reversed for RTL layouts.
|
||||||
public func xalign(_ xalign: Float?) -> Self {
|
public func xalign(_ xalign: Float?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.xalign = xalign }
|
||||||
newSelf.xalign = xalign
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted when the entry is activated.
|
/// Emitted when the entry is activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Separator.swift
|
// Separator.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -73,9 +73,7 @@ public struct Separator: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SpinRow.swift
|
// SpinRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -37,7 +37,7 @@ public struct SpinRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
var activatableWidget: (() -> Body)?
|
var activatableWidget: Body?
|
||||||
/// The acceleration rate when you hold down a button or key.
|
/// The acceleration rate when you hold down a button or key.
|
||||||
var climbRate: Double
|
var climbRate: Double
|
||||||
/// The number of decimal places to display.
|
/// The number of decimal places to display.
|
||||||
@ -126,7 +126,7 @@ public struct SpinRow: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let activatableWidgetStorage = activatableWidget?().storage(data: data, type: type) {
|
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ if let value, newValue != value.wrappedValue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let widget = storage.content["activatableWidget"]?.first {
|
if let widget = storage.content["activatableWidget"]?.first {
|
||||||
activatableWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
activatableWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if updateProperties, (storage.previousState as? Self)?.climbRate != climbRate {
|
if updateProperties, (storage.previousState as? Self)?.climbRate != climbRate {
|
||||||
adw_spin_row_set_climb_rate(widget, climbRate)
|
adw_spin_row_set_climb_rate(widget, climbRate)
|
||||||
@ -247,38 +247,28 @@ if let value, newValue != value.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
public func activatableWidget(@ViewBuilder _ activatableWidget: @escaping (() -> Body)) -> Self {
|
public func activatableWidget(@ViewBuilder _ activatableWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activatableWidget = activatableWidget() }
|
||||||
newSelf.activatableWidget = activatableWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The acceleration rate when you hold down a button or key.
|
/// The acceleration rate when you hold down a button or key.
|
||||||
public func climbRate(_ climbRate: Double) -> Self {
|
public func climbRate(_ climbRate: Double) -> Self {
|
||||||
var newSelf = self
|
modify { $0.climbRate = climbRate }
|
||||||
newSelf.climbRate = climbRate
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of decimal places to display.
|
/// The number of decimal places to display.
|
||||||
public func digits(_ digits: UInt) -> Self {
|
public func digits(_ digits: UInt) -> Self {
|
||||||
var newSelf = self
|
modify { $0.digits = digits }
|
||||||
newSelf.digits = digits
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether non-numeric characters should be ignored.
|
/// Whether non-numeric characters should be ignored.
|
||||||
public func numeric(_ numeric: Bool? = true) -> Self {
|
public func numeric(_ numeric: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.numeric = numeric }
|
||||||
newSelf.numeric = numeric
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether invalid values are snapped to the nearest step increment.
|
/// Whether invalid values are snapped to the nearest step increment.
|
||||||
public func snapToTicks(_ snapToTicks: Bool? = true) -> Self {
|
public func snapToTicks(_ snapToTicks: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.snapToTicks = snapToTicks }
|
||||||
newSelf.snapToTicks = snapToTicks
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The subtitle for this row.
|
/// The subtitle for this row.
|
||||||
@ -286,9 +276,7 @@ if let value, newValue != value.wrappedValue {
|
|||||||
/// The subtitle is interpreted as Pango markup unless
|
/// The subtitle is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func subtitle(_ subtitle: String?) -> Self {
|
public func subtitle(_ subtitle: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitle = subtitle }
|
||||||
newSelf.subtitle = subtitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the subtitle label will be
|
/// The number of lines at the end of which the subtitle label will be
|
||||||
@ -296,18 +284,14 @@ if let value, newValue != value.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleLines = subtitleLines }
|
||||||
newSelf.subtitleLines = subtitleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the subtitle from the label.
|
/// Whether the user can copy the subtitle from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleSelectable = subtitleSelectable }
|
||||||
newSelf.subtitleSelectable = subtitleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title of the preference represented by this row.
|
/// The title of the preference represented by this row.
|
||||||
@ -315,27 +299,21 @@ if let value, newValue != value.wrappedValue {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the title label will be ellipsized.
|
/// The number of lines at the end of which the title label will be ellipsized.
|
||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func titleLines(_ titleLines: Int?) -> Self {
|
public func titleLines(_ titleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleLines = titleLines }
|
||||||
newSelf.titleLines = titleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -344,30 +322,22 @@ if let value, newValue != value.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The current value.
|
/// The current value.
|
||||||
public func value(_ value: Binding<Double>?) -> Self {
|
public func value(_ value: Binding<Double>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.value = value }
|
||||||
newSelf.value = value
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the spin row should wrap upon reaching its limits.
|
/// Whether the spin row should wrap upon reaching its limits.
|
||||||
public func wrap(_ wrap: Bool? = true) -> Self {
|
public func wrap(_ wrap: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.wrap = wrap }
|
||||||
newSelf.wrap = wrap
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This signal is emitted after the row has been activated.
|
/// This signal is emitted after the row has been activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Spinner.swift
|
// Spinner.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SplitButton.swift
|
// SplitButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -37,7 +37,7 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// Setting the child widget will set ``label(_:)`` and
|
/// Setting the child widget will set ``label(_:)`` and
|
||||||
/// ``iconName(_:)`` to `NULL`.
|
/// ``iconName(_:)`` to `NULL`.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// The tooltip of the dropdown button.
|
/// The tooltip of the dropdown button.
|
||||||
///
|
///
|
||||||
/// The tooltip can be marked up with the Pango text markup language.
|
/// The tooltip can be marked up with the Pango text markup language.
|
||||||
@ -62,7 +62,7 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// If ``popover(_:)`` is already set, it will be dissociated
|
/// If ``popover(_:)`` is already set, it will be dissociated
|
||||||
/// from the button, and the property is set to `NULL`.
|
/// from the button, and the property is set to `NULL`.
|
||||||
var menuModel: (() -> Body)?
|
var menuModel: Body?
|
||||||
/// Whether an underline in the text indicates a mnemonic.
|
/// Whether an underline in the text indicates a mnemonic.
|
||||||
///
|
///
|
||||||
/// See ``label(_:)``.
|
/// See ``label(_:)``.
|
||||||
@ -90,12 +90,12 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
adw_split_button_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
adw_split_button_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
if let menu = menuModel?() {
|
if let menuModel {
|
||||||
let childStorage = MenuCollection { menu }.getMenu(data: data)
|
let childStorage = MenuCollection { menuModel }.getMenu(data: data)
|
||||||
storage.content["menuModel"] = [childStorage]
|
storage.content["menuModel"] = [childStorage]
|
||||||
adw_split_button_set_menu_model(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
adw_split_button_set_menu_model(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
adw_split_button_set_can_shrink(widget, canShrink.cBool)
|
adw_split_button_set_can_shrink(widget, canShrink.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let dropdownTooltip, updateProperties, (storage.previousState as? Self)?.dropdownTooltip != dropdownTooltip {
|
if let dropdownTooltip, updateProperties, (storage.previousState as? Self)?.dropdownTooltip != dropdownTooltip {
|
||||||
adw_split_button_set_dropdown_tooltip(widget, dropdownTooltip)
|
adw_split_button_set_dropdown_tooltip(widget, dropdownTooltip)
|
||||||
@ -138,7 +138,7 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
adw_split_button_set_label(widget, label)
|
adw_split_button_set_label(widget, label)
|
||||||
}
|
}
|
||||||
if let menu = storage.content["menuModel"]?.first {
|
if let menu = storage.content["menuModel"]?.first {
|
||||||
MenuCollection { menuModel?() ?? [] }
|
MenuCollection { menuModel ?? [] }
|
||||||
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
||||||
}
|
}
|
||||||
if let useUnderline, updateProperties, (storage.previousState as? Self)?.useUnderline != useUnderline {
|
if let useUnderline, updateProperties, (storage.previousState as? Self)?.useUnderline != useUnderline {
|
||||||
@ -163,28 +163,22 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
/// See ``canShrink(_:)`` and
|
/// See ``canShrink(_:)`` and
|
||||||
/// ``canShrink(_:)``.
|
/// ``canShrink(_:)``.
|
||||||
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.canShrink = canShrink }
|
||||||
newSelf.canShrink = canShrink
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
///
|
///
|
||||||
/// Setting the child widget will set ``label(_:)`` and
|
/// Setting the child widget will set ``label(_:)`` and
|
||||||
/// ``iconName(_:)`` to `NULL`.
|
/// ``iconName(_:)`` to `NULL`.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The tooltip of the dropdown button.
|
/// The tooltip of the dropdown button.
|
||||||
///
|
///
|
||||||
/// The tooltip can be marked up with the Pango text markup language.
|
/// The tooltip can be marked up with the Pango text markup language.
|
||||||
public func dropdownTooltip(_ dropdownTooltip: String?) -> Self {
|
public func dropdownTooltip(_ dropdownTooltip: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.dropdownTooltip = dropdownTooltip }
|
||||||
newSelf.dropdownTooltip = dropdownTooltip
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
@ -192,9 +186,7 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
/// Setting the icon name will set ``label(_:)`` and
|
/// Setting the icon name will set ``label(_:)`` and
|
||||||
/// ``child(_:)`` to `NULL`.
|
/// ``child(_:)`` to `NULL`.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The label for the button.
|
/// The label for the button.
|
||||||
@ -202,9 +194,7 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
/// Setting the label will set ``iconName(_:)`` and
|
/// Setting the label will set ``iconName(_:)`` and
|
||||||
/// ``child(_:)`` to `NULL`.
|
/// ``child(_:)`` to `NULL`.
|
||||||
public func label(_ label: String?) -> Self {
|
public func label(_ label: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The `GMenuModel` from which the popup will be created.
|
/// The `GMenuModel` from which the popup will be created.
|
||||||
@ -217,19 +207,15 @@ public struct SplitButton: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// If ``popover(_:)`` is already set, it will be dissociated
|
/// If ``popover(_:)`` is already set, it will be dissociated
|
||||||
/// from the button, and the property is set to `NULL`.
|
/// from the button, and the property is set to `NULL`.
|
||||||
public func menuModel(@ViewBuilder _ menuModel: @escaping (() -> Body)) -> Self {
|
public func menuModel(@ViewBuilder _ menuModel: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.menuModel = menuModel() }
|
||||||
newSelf.menuModel = menuModel
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an underline in the text indicates a mnemonic.
|
/// Whether an underline in the text indicates a mnemonic.
|
||||||
///
|
///
|
||||||
/// See ``label(_:)``.
|
/// See ``label(_:)``.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to animate press then release.
|
/// Emitted to animate press then release.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// StatusPage.swift
|
// StatusPage.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -24,7 +24,7 @@ public struct StatusPage: AdwaitaWidget {
|
|||||||
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// The description markup to be displayed below the title.
|
/// The description markup to be displayed below the title.
|
||||||
var description: String?
|
var description: String?
|
||||||
/// The name of the icon to be used.
|
/// The name of the icon to be used.
|
||||||
@ -51,7 +51,7 @@ public struct StatusPage: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
adw_status_page_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
adw_status_page_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ public struct StatusPage: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let description, updateProperties, (storage.previousState as? Self)?.description != description {
|
if let description, updateProperties, (storage.previousState as? Self)?.description != description {
|
||||||
adw_status_page_set_description(widget, description)
|
adw_status_page_set_description(widget, description)
|
||||||
@ -93,35 +93,27 @@ public struct StatusPage: AdwaitaWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The description markup to be displayed below the title.
|
/// The description markup to be displayed below the title.
|
||||||
public func description(_ description: String?) -> Self {
|
public func description(_ description: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.description = description }
|
||||||
newSelf.description = description
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the icon to be used.
|
/// The name of the icon to be used.
|
||||||
///
|
///
|
||||||
/// Changing this will set ``paintable(_:)`` to `NULL`.
|
/// Changing this will set ``paintable(_:)`` to `NULL`.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title to be displayed below the icon.
|
/// The title to be displayed below the icon.
|
||||||
///
|
///
|
||||||
/// It is not parsed as Pango markup.
|
/// It is not parsed as Pango markup.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SwitchRow.swift
|
// SwitchRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -46,7 +46,7 @@ public struct SwitchRow: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
var activatableWidget: (() -> Body)?
|
var activatableWidget: Body?
|
||||||
/// Whether the switch row is in the "on" or "off" position.
|
/// Whether the switch row is in the "on" or "off" position.
|
||||||
var active: Binding<Bool>?
|
var active: Binding<Bool>?
|
||||||
/// The subtitle for this row.
|
/// The subtitle for this row.
|
||||||
@ -106,7 +106,7 @@ public struct SwitchRow: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let activatableWidgetStorage = activatableWidget?().storage(data: data, type: type) {
|
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ if let active, newValue != active.wrappedValue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let widget = storage.content["activatableWidget"]?.first {
|
if let widget = storage.content["activatableWidget"]?.first {
|
||||||
activatableWidget?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
activatableWidget?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let active, updateProperties, (adw_switch_row_get_active(storage.opaquePointer) != 0) != active.wrappedValue {
|
if let active, updateProperties, (adw_switch_row_get_active(storage.opaquePointer) != 0) != active.wrappedValue {
|
||||||
adw_switch_row_set_active(storage.opaquePointer, active.wrappedValue.cBool)
|
adw_switch_row_set_active(storage.opaquePointer, active.wrappedValue.cBool)
|
||||||
@ -197,17 +197,13 @@ if let active, newValue != active.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The target widget will be activated by emitting the
|
/// The target widget will be activated by emitting the
|
||||||
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
/// `Gtk.Widget::mnemonic-activate` signal on it.
|
||||||
public func activatableWidget(@ViewBuilder _ activatableWidget: @escaping (() -> Body)) -> Self {
|
public func activatableWidget(@ViewBuilder _ activatableWidget: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.activatableWidget = activatableWidget() }
|
||||||
newSelf.activatableWidget = activatableWidget
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the switch row is in the "on" or "off" position.
|
/// Whether the switch row is in the "on" or "off" position.
|
||||||
public func active(_ active: Binding<Bool>?) -> Self {
|
public func active(_ active: Binding<Bool>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.active = active }
|
||||||
newSelf.active = active
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The subtitle for this row.
|
/// The subtitle for this row.
|
||||||
@ -215,9 +211,7 @@ if let active, newValue != active.wrappedValue {
|
|||||||
/// The subtitle is interpreted as Pango markup unless
|
/// The subtitle is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func subtitle(_ subtitle: String?) -> Self {
|
public func subtitle(_ subtitle: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitle = subtitle }
|
||||||
newSelf.subtitle = subtitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the subtitle label will be
|
/// The number of lines at the end of which the subtitle label will be
|
||||||
@ -225,18 +219,14 @@ if let active, newValue != active.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
public func subtitleLines(_ subtitleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleLines = subtitleLines }
|
||||||
newSelf.subtitleLines = subtitleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the subtitle from the label.
|
/// Whether the user can copy the subtitle from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
public func subtitleSelectable(_ subtitleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitleSelectable = subtitleSelectable }
|
||||||
newSelf.subtitleSelectable = subtitleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title of the preference represented by this row.
|
/// The title of the preference represented by this row.
|
||||||
@ -244,27 +234,21 @@ if let active, newValue != active.wrappedValue {
|
|||||||
/// The title is interpreted as Pango markup unless
|
/// The title is interpreted as Pango markup unless
|
||||||
/// ``useMarkup(_:)`` is set to `false`.
|
/// ``useMarkup(_:)`` is set to `false`.
|
||||||
public func title(_ title: String?) -> Self {
|
public func title(_ title: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The number of lines at the end of which the title label will be ellipsized.
|
/// The number of lines at the end of which the title label will be ellipsized.
|
||||||
///
|
///
|
||||||
/// If the value is 0, the number of lines won't be limited.
|
/// If the value is 0, the number of lines won't be limited.
|
||||||
public func titleLines(_ titleLines: Int?) -> Self {
|
public func titleLines(_ titleLines: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleLines = titleLines }
|
||||||
newSelf.titleLines = titleLines
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the user can copy the title from the label.
|
/// Whether the user can copy the title from the label.
|
||||||
///
|
///
|
||||||
/// See also ``selectable(_:)``.
|
/// See also ``selectable(_:)``.
|
||||||
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
public func titleSelectable(_ titleSelectable: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.titleSelectable = titleSelectable }
|
||||||
newSelf.titleSelectable = titleSelectable
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to use Pango markup for the title label.
|
/// Whether to use Pango markup for the title label.
|
||||||
@ -273,16 +257,12 @@ if let active, newValue != active.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// See also `Pango.parse_markup`.
|
/// See also `Pango.parse_markup`.
|
||||||
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
public func useMarkup(_ useMarkup: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useMarkup = useMarkup }
|
||||||
newSelf.useMarkup = useMarkup
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether an embedded underline in the title indicates a mnemonic.
|
/// Whether an embedded underline in the title indicates a mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This signal is emitted after the row has been activated.
|
/// This signal is emitted after the row has been activated.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ToastOverlay.swift
|
// ToastOverlay.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -30,7 +30,7 @@ public struct ToastOverlay: AdwaitaWidget {
|
|||||||
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
|
|
||||||
/// Initialize `ToastOverlay`.
|
/// Initialize `ToastOverlay`.
|
||||||
public init() {
|
public init() {
|
||||||
@ -47,7 +47,7 @@ public struct ToastOverlay: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
adw_toast_overlay_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
adw_toast_overlay_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -65,7 +65,7 @@ public struct ToastOverlay: AdwaitaWidget {
|
|||||||
storage.modify { widget in
|
storage.modify { widget in
|
||||||
|
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -80,10 +80,8 @@ public struct ToastOverlay: AdwaitaWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ToggleButton.swift
|
// ToggleButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -48,7 +48,7 @@ public struct ToggleButton: AdwaitaWidget {
|
|||||||
/// property has no effect.
|
/// property has no effect.
|
||||||
var canShrink: Bool?
|
var canShrink: Bool?
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
var child: (() -> Body)?
|
var child: Body?
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
var hasFrame: Bool?
|
var hasFrame: Bool?
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
@ -86,7 +86,7 @@ public struct ToggleButton: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let childStorage = child?().storage(data: data, type: type) {
|
if let childStorage = child?.storage(data: data, type: type) {
|
||||||
storage.content["child"] = [childStorage]
|
storage.content["child"] = [childStorage]
|
||||||
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ if let active, newValue != active.wrappedValue {
|
|||||||
gtk_button_set_can_shrink(widget?.cast(), canShrink.cBool)
|
gtk_button_set_can_shrink(widget?.cast(), canShrink.cBool)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["child"]?.first {
|
if let widget = storage.content["child"]?.first {
|
||||||
child?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
child?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
if let hasFrame, updateProperties, (storage.previousState as? Self)?.hasFrame != hasFrame {
|
||||||
gtk_button_set_has_frame(widget?.cast(), hasFrame.cBool)
|
gtk_button_set_has_frame(widget?.cast(), hasFrame.cBool)
|
||||||
@ -164,23 +164,17 @@ if let active, newValue != active.wrappedValue {
|
|||||||
///
|
///
|
||||||
/// The accessible role cannot be changed once set.
|
/// The accessible role cannot be changed once set.
|
||||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.accessibleRole = accessibleRole }
|
||||||
newSelf.accessibleRole = accessibleRole
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the action with which this widget should be associated.
|
/// The name of the action with which this widget should be associated.
|
||||||
public func actionName(_ actionName: String?) -> Self {
|
public func actionName(_ actionName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.actionName = actionName }
|
||||||
newSelf.actionName = actionName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If the toggle button should be pressed in.
|
/// If the toggle button should be pressed in.
|
||||||
public func active(_ active: Binding<Bool>?) -> Self {
|
public func active(_ active: Binding<Bool>?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.active = active }
|
||||||
newSelf.active = active
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the size of the button can be made smaller than the natural
|
/// Whether the size of the button can be made smaller than the natural
|
||||||
@ -191,45 +185,33 @@ if let active, newValue != active.wrappedValue {
|
|||||||
/// If the contents of a button are an icon or a custom widget, setting this
|
/// If the contents of a button are an icon or a custom widget, setting this
|
||||||
/// property has no effect.
|
/// property has no effect.
|
||||||
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
public func canShrink(_ canShrink: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.canShrink = canShrink }
|
||||||
newSelf.canShrink = canShrink
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The child widget.
|
/// The child widget.
|
||||||
public func child(@ViewBuilder _ child: @escaping (() -> Body)) -> Self {
|
public func child(@ViewBuilder _ child: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.child = child() }
|
||||||
newSelf.child = child
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the button has a frame.
|
/// Whether the button has a frame.
|
||||||
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
public func hasFrame(_ hasFrame: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.hasFrame = hasFrame }
|
||||||
newSelf.hasFrame = hasFrame
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The name of the icon used to automatically populate the button.
|
/// The name of the icon used to automatically populate the button.
|
||||||
public func iconName(_ iconName: String?) -> Self {
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.iconName = iconName }
|
||||||
newSelf.iconName = iconName
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Text of the label inside the button, if the button contains a label widget.
|
/// Text of the label inside the button, if the button contains a label widget.
|
||||||
public func label(_ label: String?) -> Self {
|
public func label(_ label: String?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.label = label }
|
||||||
newSelf.label = label
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If set, an underline in the text indicates that the following character is
|
/// If set, an underline in the text indicates that the following character is
|
||||||
/// to be used as mnemonic.
|
/// to be used as mnemonic.
|
||||||
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
public func useUnderline(_ useUnderline: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.useUnderline = useUnderline }
|
||||||
newSelf.useUnderline = useUnderline
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emitted to animate press then release.
|
/// Emitted to animate press then release.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ToolbarView.swift
|
// ToolbarView.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -52,7 +52,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
/// [`.undershoot-bottom`](style-classes.html
|
/// [`.undershoot-bottom`](style-classes.html
|
||||||
var bottomBarStyle: ToolbarStyle?
|
var bottomBarStyle: ToolbarStyle?
|
||||||
/// The content widget.
|
/// The content widget.
|
||||||
var content: (() -> Body)?
|
var content: Body?
|
||||||
/// Whether the content widget can extend behind bottom bars.
|
/// Whether the content widget can extend behind bottom bars.
|
||||||
///
|
///
|
||||||
/// This can be used in combination with
|
/// This can be used in combination with
|
||||||
@ -121,7 +121,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
function(storage, data)
|
function(storage, data)
|
||||||
}
|
}
|
||||||
update(storage, data: data, updateProperties: true, type: type)
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
if let contentStorage = content?().storage(data: data, type: type) {
|
if let contentStorage = content?.storage(data: data, type: type) {
|
||||||
storage.content["content"] = [contentStorage]
|
storage.content["content"] = [contentStorage]
|
||||||
adw_toolbar_view_set_content(storage.opaquePointer, contentStorage.opaquePointer?.cast())
|
adw_toolbar_view_set_content(storage.opaquePointer, contentStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
adw_toolbar_view_set_bottom_bar_style(widget, bottomBarStyle.gtkValue)
|
adw_toolbar_view_set_bottom_bar_style(widget, bottomBarStyle.gtkValue)
|
||||||
}
|
}
|
||||||
if let widget = storage.content["content"]?.first {
|
if let widget = storage.content["content"]?.first {
|
||||||
content?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
content?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
if let extendContentToBottomEdge, updateProperties, (storage.previousState as? Self)?.extendContentToBottomEdge != extendContentToBottomEdge {
|
if let extendContentToBottomEdge, updateProperties, (storage.previousState as? Self)?.extendContentToBottomEdge != extendContentToBottomEdge {
|
||||||
adw_toolbar_view_set_extend_content_to_bottom_edge(widget, extendContentToBottomEdge.cBool)
|
adw_toolbar_view_set_extend_content_to_bottom_edge(widget, extendContentToBottomEdge.cBool)
|
||||||
@ -214,9 +214,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``topBarHeight(_:)``.
|
/// See ``topBarHeight(_:)``.
|
||||||
public func bottomBarHeight(_ bottomBarHeight: Int?) -> Self {
|
public func bottomBarHeight(_ bottomBarHeight: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.bottomBarHeight = bottomBarHeight }
|
||||||
newSelf.bottomBarHeight = bottomBarHeight
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Appearance of the bottom bars.
|
/// Appearance of the bottom bars.
|
||||||
@ -225,16 +223,12 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
/// has a subtle undershoot shadow when touching them, same as the
|
/// has a subtle undershoot shadow when touching them, same as the
|
||||||
/// [`.undershoot-bottom`](style-classes.html
|
/// [`.undershoot-bottom`](style-classes.html
|
||||||
public func bottomBarStyle(_ bottomBarStyle: ToolbarStyle?) -> Self {
|
public func bottomBarStyle(_ bottomBarStyle: ToolbarStyle?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.bottomBarStyle = bottomBarStyle }
|
||||||
newSelf.bottomBarStyle = bottomBarStyle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The content widget.
|
/// The content widget.
|
||||||
public func content(@ViewBuilder _ content: @escaping (() -> Body)) -> Self {
|
public func content(@ViewBuilder _ content: () -> Body) -> Self {
|
||||||
var newSelf = self
|
modify { $0.content = content() }
|
||||||
newSelf.content = content
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the content widget can extend behind bottom bars.
|
/// Whether the content widget can extend behind bottom bars.
|
||||||
@ -245,9 +239,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``extendContentToTopEdge(_:)``.
|
/// See ``extendContentToTopEdge(_:)``.
|
||||||
public func extendContentToBottomEdge(_ extendContentToBottomEdge: Bool? = true) -> Self {
|
public func extendContentToBottomEdge(_ extendContentToBottomEdge: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.extendContentToBottomEdge = extendContentToBottomEdge }
|
||||||
newSelf.extendContentToBottomEdge = extendContentToBottomEdge
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether the content widget can extend behind top bars.
|
/// Whether the content widget can extend behind top bars.
|
||||||
@ -257,9 +249,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``extendContentToBottomEdge(_:)``.
|
/// See ``extendContentToBottomEdge(_:)``.
|
||||||
public func extendContentToTopEdge(_ extendContentToTopEdge: Bool? = true) -> Self {
|
public func extendContentToTopEdge(_ extendContentToTopEdge: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.extendContentToTopEdge = extendContentToTopEdge }
|
||||||
newSelf.extendContentToTopEdge = extendContentToTopEdge
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether bottom bars are visible.
|
/// Whether bottom bars are visible.
|
||||||
@ -272,9 +262,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``revealTopBars(_:)``.
|
/// See ``revealTopBars(_:)``.
|
||||||
public func revealBottomBars(_ revealBottomBars: Bool? = true) -> Self {
|
public func revealBottomBars(_ revealBottomBars: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.revealBottomBars = revealBottomBars }
|
||||||
newSelf.revealBottomBars = revealBottomBars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether top bars are revealed.
|
/// Whether top bars are revealed.
|
||||||
@ -287,9 +275,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``revealBottomBars(_:)``.
|
/// See ``revealBottomBars(_:)``.
|
||||||
public func revealTopBars(_ revealTopBars: Bool? = true) -> Self {
|
public func revealTopBars(_ revealTopBars: Bool? = true) -> Self {
|
||||||
var newSelf = self
|
modify { $0.revealTopBars = revealTopBars }
|
||||||
newSelf.revealTopBars = revealTopBars
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The current top bar height.
|
/// The current top bar height.
|
||||||
@ -299,9 +285,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// See ``bottomBarHeight(_:)``.
|
/// See ``bottomBarHeight(_:)``.
|
||||||
public func topBarHeight(_ topBarHeight: Int?) -> Self {
|
public func topBarHeight(_ topBarHeight: Int?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.topBarHeight = topBarHeight }
|
||||||
newSelf.topBarHeight = topBarHeight
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Appearance of the top bars.
|
/// Appearance of the top bars.
|
||||||
@ -310,9 +294,7 @@ public struct ToolbarView: AdwaitaWidget {
|
|||||||
/// subtle undershoot shadow when touching them, same as the
|
/// subtle undershoot shadow when touching them, same as the
|
||||||
/// [`.undershoot-top`](style-classes.html
|
/// [`.undershoot-top`](style-classes.html
|
||||||
public func topBarStyle(_ topBarStyle: ToolbarStyle?) -> Self {
|
public func topBarStyle(_ topBarStyle: ToolbarStyle?) -> Self {
|
||||||
var newSelf = self
|
modify { $0.topBarStyle = topBarStyle }
|
||||||
newSelf.topBarStyle = topBarStyle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the body for "bottom".
|
/// Set the body for "bottom".
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// WindowTitle.swift
|
// WindowTitle.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 30.10.25.
|
// Created by auto-generation on 31.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -85,9 +85,7 @@ public struct WindowTitle: AdwaitaWidget {
|
|||||||
///
|
///
|
||||||
/// The subtitle should give the user additional details.
|
/// The subtitle should give the user additional details.
|
||||||
public func subtitle(_ subtitle: String) -> Self {
|
public func subtitle(_ subtitle: String) -> Self {
|
||||||
var newSelf = self
|
modify { $0.subtitle = subtitle }
|
||||||
newSelf.subtitle = subtitle
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The title to display.
|
/// The title to display.
|
||||||
@ -95,9 +93,7 @@ public struct WindowTitle: AdwaitaWidget {
|
|||||||
/// The title typically identifies the current view or content item, and
|
/// The title typically identifies the current view or content item, and
|
||||||
/// generally does not use the application name.
|
/// generally does not use the application name.
|
||||||
public func title(_ title: String) -> Self {
|
public func title(_ title: String) -> Self {
|
||||||
var newSelf = self
|
modify { $0.title = title }
|
||||||
newSelf.title = title
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ extension Toggle {
|
|||||||
if let child {
|
if let child {
|
||||||
return .init()
|
return .init()
|
||||||
.active(active)
|
.active(active)
|
||||||
.child(child)
|
.child { child }
|
||||||
} else {
|
} else {
|
||||||
return .init()
|
return .init()
|
||||||
.active(active)
|
.active(active)
|
||||||
|
|||||||
@ -27,6 +27,10 @@ struct Property: Decodable {
|
|||||||
/// Whether the property is deprecated.
|
/// Whether the property is deprecated.
|
||||||
var deprecated: Bool?
|
var deprecated: Bool?
|
||||||
|
|
||||||
|
var isView: Bool {
|
||||||
|
(self.type?.isWidget ?? false) || (self.type?.isMenu ?? false)
|
||||||
|
}
|
||||||
|
|
||||||
/// Get the Swift property name.
|
/// Get the Swift property name.
|
||||||
/// - Parameter configuration: The generation configuration.
|
/// - Parameter configuration: The generation configuration.
|
||||||
/// - Returns: The name.
|
/// - Returns: The name.
|
||||||
@ -53,11 +57,10 @@ struct Property: Decodable {
|
|||||||
} else {
|
} else {
|
||||||
type = (try? self.type?.generate(configuration: genConfig)) ?? "String"
|
type = (try? self.type?.generate(configuration: genConfig)) ?? "String"
|
||||||
}
|
}
|
||||||
if (self.type?.isWidget ?? false) || (self.type?.isMenu ?? false) {
|
if isView {
|
||||||
type = "\(modifier ? "@escaping " : "")(() -> Body)"
|
type = modifier ? "() -> Body" : "Body"
|
||||||
}
|
}
|
||||||
if !config.requiredProperties.contains(name)
|
if !config.requiredProperties.contains(name) && !(isView && modifier) {
|
||||||
&& !(((self.type?.isWidget ?? false) || (self.type?.isMenu ?? false)) && modifier) {
|
|
||||||
type += "?"
|
type += "?"
|
||||||
}
|
}
|
||||||
if defaultValue, let value = genConfig.defaultModifierValues[type] {
|
if defaultValue, let value = genConfig.defaultModifierValues[type] {
|
||||||
@ -93,9 +96,7 @@ struct Property: Decodable {
|
|||||||
|
|
||||||
\(doc?.docComment(configuration: genConfig, indent: " ") ?? "/// \(name)")
|
\(doc?.docComment(configuration: genConfig, indent: " ") ?? "/// \(name)")
|
||||||
public func \(convertPropertyName(configuration: genConfig))(\(builder)_ \(mainParameter)) -> Self {
|
public func \(convertPropertyName(configuration: genConfig))(\(builder)_ \(mainParameter)) -> Self {
|
||||||
var newSelf = self
|
modify { $0.\(property) = \(property)\(isView ? "()" : "") }
|
||||||
newSelf.\(property) = \(property)
|
|
||||||
return newSelf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -117,7 +118,7 @@ struct Property: Decodable {
|
|||||||
guard !(type?.isWidget ?? false) else {
|
guard !(type?.isWidget ?? false) else {
|
||||||
return """
|
return """
|
||||||
if let widget = storage.content["\(name)"]?.first {
|
if let widget = storage.content["\(name)"]?.first {
|
||||||
\(name)?().updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
\(name)?.updateStorage(widget, data: data, updateProperties: updateProperties, type: type)
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -125,7 +126,7 @@ struct Property: Decodable {
|
|||||||
guard !(type?.isMenu ?? false) else {
|
guard !(type?.isMenu ?? false) else {
|
||||||
return """
|
return """
|
||||||
if let menu = storage.content["\(name)"]?.first {
|
if let menu = storage.content["\(name)"]?.first {
|
||||||
MenuCollection { \(name)?() ?? [] }
|
MenuCollection { \(name) ?? [] }
|
||||||
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
.updateStorage(menu, data: data.noModifiers, updateProperties: updateProperties, type: MenuContext.self)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +199,7 @@ struct Property: Decodable {
|
|||||||
let name = convertPropertyName(configuration: genConfig)
|
let name = convertPropertyName(configuration: genConfig)
|
||||||
let view = (self.cast ?? config.cast) ? "storage.opaquePointer?.cast()" : "storage.opaquePointer"
|
let view = (self.cast ?? config.cast) ? "storage.opaquePointer?.cast()" : "storage.opaquePointer"
|
||||||
return """
|
return """
|
||||||
if let \(name)Storage = \(name)?().storage(data: data, type: type) {
|
if let \(name)Storage = \(name)?.storage(data: data, type: type) {
|
||||||
storage.content["\(name)"] = [\(name)Storage]
|
storage.content["\(name)"] = [\(name)Storage]
|
||||||
\(setter)(\(view), \(name)Storage.opaquePointer?.cast())
|
\(setter)(\(view), \(name)Storage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
@ -224,8 +225,8 @@ struct Property: Decodable {
|
|||||||
let name = convertPropertyName(configuration: genConfig)
|
let name = convertPropertyName(configuration: genConfig)
|
||||||
let view = (self.cast ?? config.cast) ? "storage.opaquePointer?.cast()" : "storage.opaquePointer"
|
let view = (self.cast ?? config.cast) ? "storage.opaquePointer?.cast()" : "storage.opaquePointer"
|
||||||
return """
|
return """
|
||||||
if let menu = \(name)?() {
|
if let \(name) {
|
||||||
let childStorage = MenuCollection { menu }.getMenu(data: data)
|
let childStorage = MenuCollection { \(name) }.getMenu(data: data)
|
||||||
storage.content["\(name)"] = [childStorage]
|
storage.content["\(name)"] = [childStorage]
|
||||||
\(setter)(\(view), childStorage.opaquePointer?.cast())
|
\(setter)(\(view), childStorage.opaquePointer?.cast())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user