Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Update to most recent version of Meta
Browse files Browse the repository at this point in the history
  • Loading branch information
david-swift committed Sep 4, 2024
1 parent 018d21e commit 1680d34
Show file tree
Hide file tree
Showing 61 changed files with 126 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ file_header:
missing_docs:
warning: [internal, private]
error: [open, public]
excludes_extensions: false
excludes_extensions: true
excludes_inherited_types: false
type_contents_order:
order:
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Dialogs/AboutDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct AboutDialog: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - 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)
Expand All @@ -48,7 +48,7 @@ struct AboutDialog: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
func update<Data>(
_ storage: ViewStorage,
data: WidgetData,
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Dialogs/AlertDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public struct AlertDialog: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(
data: WidgetData,
Expand All @@ -90,7 +90,7 @@ public struct AlertDialog: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(
_ storage: ViewStorage,
data: WidgetData,
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Dialogs/Dialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Dialog: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let child = child.storage(data: data, type: type)
Expand All @@ -47,7 +47,7 @@ struct Dialog: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
func update<Data>(
_ storage: ViewStorage,
data: WidgetData,
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Dialogs/FileDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct FileDialog: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let child = child.storage(data: data, type: type)
Expand All @@ -45,7 +45,7 @@ struct FileDialog: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
func update<Data>(
_ storage: ViewStorage,
data: WidgetData,
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/ForEach.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public struct ForEach<Element>: AdwaitaWidget where Element: Identifiable {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(
data: WidgetData,
Expand All @@ -46,7 +46,7 @@ public struct ForEach<Element>: AdwaitaWidget where Element: Identifiable {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(
_ storage: ViewStorage,
data: WidgetData,
Expand Down
7 changes: 7 additions & 0 deletions Sources/Adwaita/View/Forms/ComboRow+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import LevenshteinTransformations
/// A row for selecting an element out of a list of elements.
extension ComboRow {

/// The identifier for the values.
static var values: String { "values" }
/// The identifier for the string list.
static var stringList: String { "string-list" }

/// Initialize a combo row.
Expand Down Expand Up @@ -43,6 +45,11 @@ extension ComboRow {
}
}

/// Update the combo row's content.
/// - Parameters:
/// - storage: The view storage.
/// - values: The elements.
/// - element: The type of the elements.
static func updateContent<Element>(
storage: ViewStorage,
values: [Element],
Expand Down
2 changes: 0 additions & 2 deletions Sources/Adwaita/View/Forms/EntryRow+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import CAdw

extension EntryRow {

static var textField: String { "text" }

/// Initialize an entry row.
/// - Parameters:
/// - title: The row's title.
Expand Down
2 changes: 0 additions & 2 deletions Sources/Adwaita/View/Forms/PasswordEntryRow+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import CAdw

extension PasswordEntryRow {

static var textField: String { "text" }

/// Initialize an entry row.
/// - Parameters:
/// - title: The row's title.
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/ActionRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public struct ActionRow: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_action_row_new()?.opaque())
Expand Down Expand Up @@ -143,7 +143,7 @@ public struct ActionRow: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
if let activated {
storage.connectSignal(name: "activated", argCount: 0) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/AspectFrame.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public struct AspectFrame: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(gtk_aspect_frame_new(0.5, 0.5, ratio, 0)?.opaque())
Expand All @@ -76,7 +76,7 @@ public struct AspectFrame: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
storage.modify { widget in

Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Avatar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public struct Avatar: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_avatar_new(size.cInt, text, showInitials.cBool)?.opaque())
Expand All @@ -77,7 +77,7 @@ public struct Avatar: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
storage.modify { widget in

Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Banner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public struct Banner: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_banner_new(title)?.opaque())
Expand All @@ -81,7 +81,7 @@ public struct Banner: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
if let buttonClicked {
storage.connectSignal(name: "button-clicked", argCount: 0) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Bin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public struct Bin: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_bin_new()?.opaque())
Expand All @@ -55,7 +55,7 @@ public struct Bin: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
storage.modify { widget in

Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Box.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public struct Box: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing.cInt)?.opaque())
Expand Down Expand Up @@ -101,7 +101,7 @@ public struct Box: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
storage.modify { widget in

Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Button.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public struct Button: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(gtk_button_new()?.opaque())
Expand All @@ -109,7 +109,7 @@ public struct Button: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
if let activate {
storage.connectSignal(name: "activate", argCount: 0) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/ButtonContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public struct ButtonContent: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_button_content_new()?.opaque())
Expand All @@ -94,7 +94,7 @@ public struct ButtonContent: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
storage.modify { widget in

Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Carousel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public struct Carousel<Element>: AdwaitaWidget where Element: Identifiable {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_carousel_new()?.opaque())
Expand All @@ -92,7 +92,7 @@ public struct Carousel<Element>: AdwaitaWidget where Element: Identifiable {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
if let pageChanged {
storage.connectSignal(name: "page-changed", argCount: 1) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/CenterBox.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public struct CenterBox: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(gtk_center_box_new()?.opaque())
Expand Down Expand Up @@ -113,7 +113,7 @@ public struct CenterBox: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
storage.modify { widget in

Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/CheckButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public struct CheckButton: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(gtk_check_button_new()?.opaque())
Expand All @@ -138,7 +138,7 @@ public struct CheckButton: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
if let activate {
storage.connectSignal(name: "activate", argCount: 0) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Clamp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public struct Clamp: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_clamp_new()?.opaque())
Expand All @@ -83,7 +83,7 @@ public struct Clamp: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
storage.modify { widget in

Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/ComboRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public struct ComboRow: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_combo_row_new()?.opaque())
Expand Down Expand Up @@ -162,7 +162,7 @@ public struct ComboRow: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
if let activated {
storage.connectSignal(name: "activated", argCount: 0) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/EntryRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public struct EntryRow: AdwaitaWidget {
/// The view storage.
/// - Parameters:
/// - modifiers: Modify views before being updated.
/// - type: The type of the app storage.
/// - type: The view render data type.
/// - Returns: The view storage.
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
let storage = ViewStorage(adw_entry_row_new()?.opaque())
Expand Down Expand Up @@ -128,7 +128,7 @@ public struct EntryRow: AdwaitaWidget {
/// - storage: The storage to update.
/// - modifiers: Modify views before being updated
/// - updateProperties: Whether to update the view's properties.
/// - type: The type of the app storage.
/// - type: The view render data type.
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
if let apply {
storage.connectSignal(name: "apply", argCount: 0) {
Expand Down
Loading

0 comments on commit 1680d34

Please sign in to comment.