Move update responsibility to constructor
When constructing views, the top-level constructor should now update those views directly after the construction process. In adwaita-swift, this applies only for EitherViews (as Meta will now automatically update when constructing new scene elements).
This commit is contained in:
parent
c976c29cd0
commit
8f6a83dfc3
@ -68,9 +68,7 @@ struct AboutDialog: AdwaitaWidget {
|
||||
/// - type: The view render data type.
|
||||
/// - Returns: The view storage.
|
||||
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let storage = child.storage(data: data, type: type)
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
child.storage(data: data, type: type)
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -106,9 +106,7 @@ public struct AlertDialog: AdwaitaWidget {
|
||||
data: WidgetData,
|
||||
type: Data.Type
|
||||
) -> ViewStorage where Data: ViewRenderData {
|
||||
let storage = child.storage(data: data, type: type)
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
child.storage(data: data, type: type)
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -64,9 +64,7 @@ struct Dialog: AdwaitaWidget {
|
||||
/// - Returns: The view storage.
|
||||
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let child = child.storage(data: data, type: type)
|
||||
let storage = ViewStorage(child.opaquePointer, content: [.mainContent: [child]])
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
return .init(child.opaquePointer, content: [.mainContent: [child]])
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -105,9 +105,7 @@ struct FileDialog: AdwaitaWidget {
|
||||
/// - Returns: The view storage.
|
||||
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let child = child.storage(data: data, type: type)
|
||||
let storage = ViewStorage(child.opaquePointer, content: [.mainContent: [child]])
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
return .init(child.opaquePointer, content: [.mainContent: [child]])
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -153,9 +153,7 @@ public struct PreferencesDialog: AdwaitaWidget {
|
||||
/// - Returns: The view storage.
|
||||
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let child = child.storage(data: data, type: type)
|
||||
let storage = ViewStorage(child.opaquePointer, content: [.mainContent: [child]])
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
return .init(child.opaquePointer, content: [.mainContent: [child]])
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -109,9 +109,7 @@ public struct ShortcutsDialog: AdwaitaWidget {
|
||||
/// - Returns: The view storage.
|
||||
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let child = child.storage(data: data, type: type)
|
||||
let storage = ViewStorage(child.opaquePointer, content: [.mainContent: [child]])
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
return .init(child.opaquePointer, content: [.mainContent: [child]])
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -36,11 +36,9 @@ public struct ForEach<Element>: AdwaitaWidget where Element: Identifiable {
|
||||
data: WidgetData,
|
||||
type: Data.Type
|
||||
) -> ViewStorage where Data: ViewRenderData {
|
||||
let storage = ViewStorage(
|
||||
.init(
|
||||
gtk_box_new(horizontal ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL, 0)?.opaque()
|
||||
)
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ActionRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -95,7 +95,6 @@ public struct ActionRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// AspectFrame.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -54,7 +54,6 @@ public struct AspectFrame: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_aspect_frame_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Avatar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -65,7 +65,6 @@ public struct Avatar: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Banner.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -72,7 +72,6 @@ public struct Banner: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Bin.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -41,7 +41,6 @@ public struct Bin: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
adw_bin_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Box.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -73,7 +73,6 @@ public struct Box: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
var appendStorage: [ViewStorage] = []
|
||||
for view in append() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Button.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -74,7 +74,6 @@ public struct Button: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ButtonContent.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -66,7 +66,6 @@ public struct ButtonContent: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Carousel.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -80,7 +80,6 @@ public struct Carousel<Element>: AdwaitaWidget where Element: Identifiable {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// CenterBox.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -70,7 +70,6 @@ public struct CenterBox: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let centerWidgetStorage = centerWidget?.storage(data: data, type: type) {
|
||||
storage.content["centerWidget"] = [centerWidgetStorage]
|
||||
gtk_center_box_set_center_widget(storage.opaquePointer, centerWidgetStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// CheckButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -79,7 +79,6 @@ public struct CheckButton: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_check_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Clamp.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -69,7 +69,6 @@ public struct Clamp: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
adw_clamp_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ComboRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -125,7 +125,6 @@ public struct ComboRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// DropDown.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -89,7 +89,6 @@ public struct DropDown: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Entry.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -279,7 +279,6 @@ public struct Entry: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let extraMenu {
|
||||
let childStorage = MenuCollection { extraMenu }.getMenu(data: data)
|
||||
storage.content["extraMenu"] = [childStorage]
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// EntryRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -96,7 +96,6 @@ public struct EntryRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
var suffixStorage: [ViewStorage] = []
|
||||
for view in suffix() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ExpanderRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -82,7 +82,6 @@ public struct ExpanderRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
var rowsStorage: [ViewStorage] = []
|
||||
for view in rows() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Fixed.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -71,7 +71,6 @@ public struct Fixed: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// FlowBox.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -140,7 +140,6 @@ public struct FlowBox<Element>: AdwaitaWidget where Element: Identifiable {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// HeaderBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -92,7 +92,6 @@ public struct HeaderBar: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let titleWidgetStorage = titleWidget?.storage(data: data, type: type) {
|
||||
storage.content["titleWidget"] = [titleWidgetStorage]
|
||||
adw_header_bar_set_title_widget(storage.opaquePointer, titleWidgetStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Image.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -85,7 +85,6 @@ public struct Image: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Label.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -121,7 +121,6 @@ public struct Label: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let mnemonicWidgetStorage = mnemonicWidget?.storage(data: data, type: type) {
|
||||
storage.content["mnemonicWidget"] = [mnemonicWidgetStorage]
|
||||
gtk_label_set_mnemonic_widget(storage.opaquePointer, mnemonicWidgetStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// LevelBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -73,7 +73,6 @@ public struct LevelBar: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// LinkButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -91,7 +91,6 @@ public struct LinkButton: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ListBox.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -117,7 +117,6 @@ public struct ListBox<Element>: AdwaitaWidget where Element: Identifiable {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Menu.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -99,7 +99,6 @@ public struct Menu: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_menu_button_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// NavigationView.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -114,7 +114,6 @@ public struct NavigationView: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Overlay.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -74,7 +74,6 @@ public struct Overlay: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_overlay_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// OverlaySplitView.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -120,7 +120,6 @@ public struct OverlaySplitView: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let contentStorage = content?.storage(data: data, type: type) {
|
||||
storage.content["content"] = [contentStorage]
|
||||
adw_overlay_split_view_set_content(storage.opaquePointer, contentStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// PasswordEntryRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -90,7 +90,6 @@ public struct PasswordEntryRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
var suffixStorage: [ViewStorage] = []
|
||||
for view in suffix() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Picture.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -68,7 +68,6 @@ public struct Picture: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Popover.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -81,7 +81,6 @@ public struct Popover: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_popover_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// PreferencesGroup.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -62,7 +62,6 @@ public struct PreferencesGroup: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let headerSuffixStorage = headerSuffix?.storage(data: data, type: type) {
|
||||
storage.content["headerSuffix"] = [headerSuffixStorage]
|
||||
adw_preferences_group_set_header_suffix(storage.opaquePointer?.cast(), headerSuffixStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// PreferencesPage.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -52,7 +52,6 @@ public struct PreferencesPage: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
var childStorage: [ViewStorage] = []
|
||||
for view in child() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// PreferencesRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -56,7 +56,6 @@ public struct PreferencesRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ProgressBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -79,7 +79,6 @@ public struct ProgressBar: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ScrolledWindow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -153,7 +153,6 @@ public struct ScrolledWindow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_scrolled_window_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SearchBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -62,7 +62,6 @@ public struct SearchBar: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_search_bar_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SearchEntry.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -157,7 +157,6 @@ public struct SearchEntry: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Separator.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -43,7 +43,6 @@ public struct Separator: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SpinRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -125,7 +125,6 @@ public struct SpinRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// Spinner.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -51,7 +51,6 @@ public struct Spinner: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SplitButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -89,7 +89,6 @@ public struct SplitButton: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
adw_split_button_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// StatusPage.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -50,7 +50,6 @@ public struct StatusPage: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
adw_status_page_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// SwitchRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -105,7 +105,6 @@ public struct SwitchRow: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let activatableWidgetStorage = activatableWidget?.storage(data: data, type: type) {
|
||||
storage.content["activatableWidget"] = [activatableWidgetStorage]
|
||||
adw_action_row_set_activatable_widget(storage.opaquePointer?.cast(), activatableWidgetStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ToastOverlay.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -46,7 +46,6 @@ public struct ToastOverlay: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
adw_toast_overlay_set_child(storage.opaquePointer, childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ToggleButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -85,7 +85,6 @@ public struct ToggleButton: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let childStorage = child?.storage(data: data, type: type) {
|
||||
storage.content["child"] = [childStorage]
|
||||
gtk_button_set_child(storage.opaquePointer?.cast(), childStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ToggleGroup.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -91,7 +91,6 @@ public struct ToggleGroup: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// ToolbarView.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -120,7 +120,6 @@ public struct ToolbarView: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
if let contentStorage = content?.storage(data: data, type: type) {
|
||||
storage.content["content"] = [contentStorage]
|
||||
adw_toolbar_view_set_content(storage.opaquePointer, contentStorage.opaquePointer?.cast())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// WindowTitle.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 30.12.25.
|
||||
// Created by auto-generation on 02.02.26.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
@ -49,7 +49,6 @@ public struct WindowTitle: AdwaitaWidget {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
@ -94,9 +94,7 @@ struct ModifierWrapper: AdwaitaWidget {
|
||||
/// - Returns: The view storage.
|
||||
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let content = content.storage(data: data, type: type)
|
||||
let storage = ViewStorage(content.pointer, content: [.mainContent: [content]])
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
return .init(content.pointer, content: [.mainContent: [content]])
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
|
||||
@ -58,7 +58,6 @@ public struct NavigationSplitView: AdwaitaWidget {
|
||||
content[contentID] = [mainContent]
|
||||
|
||||
let storage = ViewStorage(splitView?.opaque(), content: content)
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
|
||||
storage.fields["sidebar-page"] = sidebarPage?.opaque()
|
||||
storage.fields["main-page"] = mainPage?.opaque()
|
||||
|
||||
@ -104,7 +104,6 @@ public struct TextView: AdwaitaWidget {
|
||||
content: ["buffer": [buffer]]
|
||||
)
|
||||
initProperties(editor, data: data, type: type)
|
||||
update(editor, data: data, updateProperties: true, type: type)
|
||||
return editor
|
||||
}
|
||||
|
||||
|
||||
@ -53,9 +53,7 @@ public struct ViewStack: AdwaitaWidget {
|
||||
type: Data.Type
|
||||
) -> ViewStorage where Data: ViewRenderData {
|
||||
let stack = gtk_stack_new()
|
||||
let storage = ViewStorage(stack?.opaque())
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
return .init(stack?.opaque())
|
||||
}
|
||||
|
||||
/// Update the stored content.
|
||||
@ -74,6 +72,7 @@ public struct ViewStack: AdwaitaWidget {
|
||||
content.updateStorage(view, data: data, updateProperties: updateProperties, type: type)
|
||||
} else {
|
||||
let view = content.storage(data: data, type: type)
|
||||
content.updateStorage(view, data: data, updateProperties: true, type: type)
|
||||
gtk_stack_add_named(storage.opaquePointer, view.opaquePointer?.cast(), id.description)
|
||||
storage.content[id.description] = [view]
|
||||
}
|
||||
|
||||
@ -39,7 +39,6 @@ public struct ViewSwitcher<Element>: AdwaitaWidget where Element: ViewSwitcherOp
|
||||
let switcher = ViewStorage(adw_view_switcher_new()?.opaque())
|
||||
let stack = ViewStorage(adw_view_stack_new()?.opaque())
|
||||
adw_view_switcher_set_stack(switcher.opaquePointer, stack.opaquePointer)
|
||||
updateSwitcher(switcher: switcher)
|
||||
switcher.fields["stack"] = stack
|
||||
return switcher
|
||||
}
|
||||
|
||||
@ -102,7 +102,6 @@ struct Class: ClassLike, Decodable {
|
||||
for function in appearFunctions {
|
||||
function(storage, data)
|
||||
}
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
\(generateWidgetAssignments(config: config, genConfig: genConfig, namespace: namespace, configs: configs))
|
||||
return storage
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user