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

Commit

Permalink
Enhance support for signals
Browse files Browse the repository at this point in the history
  • Loading branch information
david-swift committed Jan 29, 2024
1 parent db8d667 commit 8d05d22
Show file tree
Hide file tree
Showing 39 changed files with 90 additions and 78 deletions.
10 changes: 10 additions & 0 deletions Documentation/Reference/structs/AboutWindow.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ The app icon.

The app's website.

### `issues`

The link for opening issues.

### `path`

The path to the app data file.
Expand Down Expand Up @@ -74,6 +78,12 @@ Set the app's website.
- Parameter url: The app's website.
- Returns: The window.

### `issues(_:)`

Set the app's website.
- Parameter url: The URL to the issue tracker.
- Returns: The window.

### `createWindow(app:)`

Get the storage for the window.
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 @@ -2,7 +2,7 @@
// ActionRow.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -145,7 +145,7 @@ public struct ActionRow: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let activated {
storage.connectSignal(name: "activated") {
storage.connectSignal(name: "activated", argCount: 0) {
activated()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/Avatar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Avatar.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
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 @@ -2,7 +2,7 @@
// Banner.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -86,7 +86,7 @@ public struct Banner: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let buttonClicked {
storage.connectSignal(name: "button-clicked") {
storage.connectSignal(name: "button-clicked", argCount: 0) {
buttonClicked()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/Bin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Bin.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/Box.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Box.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down
6 changes: 3 additions & 3 deletions Sources/Adwaita/View/Generated/Button.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Button.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -108,12 +108,12 @@ public struct Button: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let activate {
storage.connectSignal(name: "activate") {
storage.connectSignal(name: "activate", argCount: 0) {
activate()
}
}
if let clicked {
storage.connectSignal(name: "clicked") {
storage.connectSignal(name: "clicked", argCount: 0) {
clicked()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/ButtonContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ButtonContent.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
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 @@ -2,7 +2,7 @@
// Carousel.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -95,7 +95,7 @@ public struct Carousel<Element>: Widget where Element: Identifiable {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let pageChanged {
storage.connectSignal(name: "page-changed") {
storage.connectSignal(name: "page-changed", argCount: 1) {
pageChanged()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/CenterBox.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// CenterBox.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down
6 changes: 3 additions & 3 deletions Sources/Adwaita/View/Generated/CheckButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// CheckButton.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -140,12 +140,12 @@ public struct CheckButton: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let activate {
storage.connectSignal(name: "activate") {
storage.connectSignal(name: "activate", argCount: 0) {
activate()
}
}
if let toggled {
storage.connectSignal(name: "toggled") {
storage.connectSignal(name: "toggled", argCount: 0) {
toggled()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/Clamp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Clamp.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
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 @@ -2,7 +2,7 @@
// ComboRow.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -172,7 +172,7 @@ public struct ComboRow: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let activated {
storage.connectSignal(name: "activated") {
storage.connectSignal(name: "activated", argCount: 0) {
activated()
}
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Adwaita/View/Generated/EntryRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// EntryRow.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -131,12 +131,12 @@ public struct EntryRow: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let apply {
storage.connectSignal(name: "apply") {
storage.connectSignal(name: "apply", argCount: 0) {
apply()
}
}
if let entryActivated {
storage.connectSignal(name: "entry-activated") {
storage.connectSignal(name: "entry-activated", argCount: 0) {
entryActivated()
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/ExpanderRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ExpanderRow.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down
2 changes: 1 addition & 1 deletion Sources/Adwaita/View/Generated/HeaderBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// HeaderBar.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Label.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Label.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -297,7 +297,7 @@ public struct Label: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let copyClipboard {
storage.connectSignal(name: "copy-clipboard") {
storage.connectSignal(name: "copy-clipboard", argCount: 0) {
copyClipboard()
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/LevelBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// LevelBar.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -162,7 +162,7 @@ public struct LevelBar: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let offsetChanged {
storage.connectSignal(name: "offset-changed") {
storage.connectSignal(name: "offset-changed", argCount: 1) {
offsetChanged()
}
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/Adwaita/View/Generated/LinkButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// LinkButton.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -111,12 +111,12 @@ public struct LinkButton: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let activate {
storage.connectSignal(name: "activate") {
storage.connectSignal(name: "activate", argCount: 0) {
activate()
}
}
if let clicked {
storage.connectSignal(name: "clicked") {
storage.connectSignal(name: "clicked", argCount: 0) {
clicked()
}
}
Expand Down
18 changes: 9 additions & 9 deletions Sources/Adwaita/View/Generated/ListBox.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ListBox.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -143,42 +143,42 @@ public struct ListBox<Element>: Widget where Element: Identifiable {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let activateCursorRow {
storage.connectSignal(name: "activate-cursor-row") {
storage.connectSignal(name: "activate-cursor-row", argCount: 0) {
activateCursorRow()
}
}
if let moveCursor {
storage.connectSignal(name: "move-cursor") {
storage.connectSignal(name: "move-cursor", argCount: 4) {
moveCursor()
}
}
if let rowActivated {
storage.connectSignal(name: "row-activated") {
storage.connectSignal(name: "row-activated", argCount: 1) {
rowActivated()
}
}
if let rowSelected {
storage.connectSignal(name: "row-selected") {
storage.connectSignal(name: "row-selected", argCount: 1) {
rowSelected()
}
}
if let selectAll {
storage.connectSignal(name: "select-all") {
storage.connectSignal(name: "select-all", argCount: 0) {
selectAll()
}
}
if let selectedRowsChanged {
storage.connectSignal(name: "selected-rows-changed") {
storage.connectSignal(name: "selected-rows-changed", argCount: 0) {
selectedRowsChanged()
}
}
if let toggleCursorRow {
storage.connectSignal(name: "toggle-cursor-row") {
storage.connectSignal(name: "toggle-cursor-row", argCount: 0) {
toggleCursorRow()
}
}
if let unselectAll {
storage.connectSignal(name: "unselect-all") {
storage.connectSignal(name: "unselect-all", argCount: 0) {
unselectAll()
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Menu.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -151,7 +151,7 @@ public struct Menu: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let activate {
storage.connectSignal(name: "activate") {
storage.connectSignal(name: "activate", argCount: 0) {
activate()
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Adwaita/View/Generated/Overlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Overlay.swift
// Adwaita
//
// Created by auto-generation on 27.01.24.
// Created by auto-generation on 29.01.24.
//

import CAdw
Expand Down Expand Up @@ -106,7 +106,7 @@ public struct Overlay: Widget {
/// - updateProperties: Whether to update the view's properties.
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
if let getChildPosition {
storage.connectSignal(name: "get-child-position") {
storage.connectSignal(name: "get-child-position", argCount: 2) {
getChildPosition()
}
}
Expand Down
Loading

0 comments on commit 8d05d22

Please sign in to comment.