portico/Sources/Portico/Generated/AboutWindow.swift

1899 lines
108 KiB
Swift

// Generated by PorticoGen. DO NOT EDIT. See Sources/PorticoGen to make changes.
import Adw
import Gtk
import Gio
import Gdk
// PorticoGen: generateStruct | source: Adw.AboutWindow
/// A window showing information about the application.
///
/// <picture>
/// <source srcset="about-window-dark.png" media="(prefers-color-scheme: dark)">
/// <img src="about-window.png" alt="about-window">
/// </picture>
///
/// An about window is typically opened when the user activates the `About `
/// item in the application's primary menu. All parts of the window are optional.
///
/// ## Main page
///
/// `AdwAboutWindow` prominently displays the application's icon, name, developer
/// name and version. They can be set with the [property`AboutWindow`:application-icon],
/// [property`AboutWindow`:application-name],
/// [property`AboutWindow`:developer-name] and [property`AboutWindow`:version]
/// respectively.
///
/// ## What's New
///
/// `AdwAboutWindow` provides a way for applications to display their release
/// notes, set with the [property`AboutWindow`:release-notes] property.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// Only one version can be shown at a time. By default, the displayed version
/// number matches [property`AboutWindow`:version]. Use
/// [property`AboutWindow`:release-notes-version] to override it.
///
/// ## Details
///
/// The Details page displays the application comments and links.
///
/// The comments can be set with the [property`AboutWindow`:comments] property.
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// To set the application website, use [property`AboutWindow`:website].
/// To add extra links below the website, use [method`AboutWindow`.add_link].
///
/// If the Details page doesn't have any other content besides website, the
/// website will be displayed on the main page instead.
///
/// ## Troubleshooting
///
/// `AdwAboutWindow` displays the following two links on the main page:
///
/// * Support Questions, set with the [property`AboutWindow`:support-url] property,
/// * Report an Issue, set with the [property`AboutWindow`:issue-url] property.
///
/// Additionally, applications can provide debugging information. It will be
/// shown separately on the Troubleshooting page. Use the
/// [property`AboutWindow`:debug-info] property to specify it.
///
/// It's intended to be attached to issue reports when reporting issues against
/// the application. As such, it cannot contain markup or links.
///
/// `AdwAboutWindow` provides a quick way to save debug information to a file.
/// When saving, [property`AboutWindow`:debug-info-filename] would be used as
/// the suggested filename.
///
/// ## Credits and Acknowledgements
///
/// The Credits page has the following default sections:
///
/// * Developers, set with the [property`AboutWindow`:developers] property,
/// * Designers, set with the [property`AboutWindow`:designers] property,
/// * Artists, set with the [property`AboutWindow`:artists] property,
/// * Documenters, set with the [property`AboutWindow`:documenters] property,
/// * Translators, set with the [property`AboutWindow`:translator-credits] property.
///
/// When setting translator credits, use the strings `"translator-credits"` or
/// `"translator_credits"` and mark them as translatable.
///
/// The default sections that don't contain any names won't be displayed.
///
/// The Credits page can also contain an arbitrary number of extra sections below
/// the default ones. Use [method`AboutWindow`.add_credit_section] to add them.
///
/// The Acknowledgements page can be used to acknowledge additional people and
/// organizations for their non-development contributions. Use
/// [method`AboutWindow`.add_acknowledgement_section] to add sections to it. For
/// example, it can be used to list backers in a crowdfunded project or to give
/// special thanks.
///
/// Each of the people or organizations can have an email address or a website
/// specified. To add a email address, use a string like
/// `Edgar Allan Poe <edgar`poe`.com>`. To specify a website with a title, use a
/// string like `The GNOME Project https://www.gnome.org`:
///
/// <picture>
/// <source srcset="about-window-credits-dark.png" media="(prefers-color-scheme: dark)">
/// <img src="about-window-credits.png" alt="about-window-credits">
/// </picture>
///
/// ## Legal
///
/// The Legal page displays the copyright and licensing information for the
/// application and other modules.
///
/// The copyright string is set with the [property`AboutWindow`:copyright]
/// property and should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// Licensing information can be quickly set from a list of known licenses with
/// the [property`AboutWindow`:license-type] property. If the application's
/// license is not in the list, [property`AboutWindow`:license] can be used
/// instead.
///
/// To add information about other modules, such as application dependencies or
/// data, use [method`AboutWindow`.add_legal_section].
///
/// ## Constructing
///
/// To make constructing an `AdwAboutWindow` as convenient as possible, you can
/// use the function [func`show_about_window`] which constructs and shows a
/// window.
///
/// ```c
/// static void
/// show_about (GtkApplication *app)
/// {
/// const char *developers[] = {
/// "Angela Avery",
/// NULL
/// };
///
/// const char *designers[] = {
/// "GNOME Design Team",
/// NULL
/// };
///
/// adw_show_about_window (gtk_application_get_active_window (app),
/// "application-name", _("Example"),
/// "application-icon", "org.example.App",
/// "version", "1.2.3",
/// "copyright", "© 2022 Angela Avery",
/// "issue-url", "https://gitlab.gnome.org/example/example/-/issues/",
/// "license-type", GTK_LICENSE_GPL_3_0,
/// "developers", developers,
/// "designers", designers,
/// "translator-credits", _("translator-credits"),
/// NULL);
/// }
/// ```
///
/// ## CSS nodes
///
/// `AdwAboutWindow` has a main CSS node with the name `window` and the
/// style class `.about`.
///
/// A Portico view that mounts a `Adw.AboutWindow`.
@MainActor public struct AboutWindow: View {
private let make: (MountContext) -> Adw.AboutWindow
private var configure: [(Adw.AboutWindow, MountContext) -> Void] = []
public var body: Never { fatalError() }
// PorticoGen: generateInits(static) | source: Adw.AboutWindow.init()
/// Creates a new `AdwAboutWindow`.
///
/// Applied once at mount; use the `Binding` or closure overload for values that change.
/// Each closure is evaluated once; children are added in order and slot closures mount their first view.
/// An empty closure adds no children and leaves slots unset.
/// Optional value parameters are applied only when non-`nil`; a `nil` argument leaves the widget's own default in place and cannot clear a nullable property - use the matching modifier for that.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Parameter applicationName: The name of the application.
/// - Parameter comments: The comments about the application.
/// - Parameter copyright: The copyright information.
/// - Parameter debugInfo: The debug information.
/// - Parameter debugInfoFilename: The debug information filename.
/// - Parameter developerName: The developer name.
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Parameter license: The license text.
/// - Parameter licenseType: The license type.
/// - Parameter releaseNotes: The release notes of the application.
/// - Parameter supportUrl: The URL of the application's support page.
/// - Parameter translatorCredits: The translator credits string.
/// - Parameter version: The version of the application.
/// - Parameter website: The URL of the application's website.
/// - Parameter adaptivePreview: Whether adaptive preview is currently open.
/// - Parameter application: The `GtkApplication` associated with the window.
/// - Parameter decorated: Whether the window should have a frame (also known as *decorations*).
/// - Parameter deletable: Whether the window frame should have a close button.
/// - Parameter destroyWithParent: If this window should be destroyed when the parent is destroyed.
/// - Parameter display: The display that will display this window.
/// - Parameter focusVisible: Whether 'focus rectangles' are currently visible in this window.
/// - Parameter gravity: The gravity to use when resizing the window programmatically.
/// - Parameter handleMenubarAccel: Whether the window frame should handle <kbd>F10</kbd> for activating menubars.
/// - Parameter hideOnClose: If this window should be hidden instead of destroyed when the user clicks the close button.
/// - Parameter iconName: Specifies the name of the themed icon to use as the window icon.
/// - Parameter mnemonicsVisible: Whether mnemonics are currently visible in this window.
/// - Parameter modal: If true, the window is modal.
/// - Parameter resizable: If true, users can resize the window.
/// - Parameter startupId: A write-only property for setting window's startup notification identifier.
/// - Parameter title: The title of the window.
/// - Parameter transientFor: The transient parent of the window.
/// - Parameter content: A `ViewBuilder` closure whose first view is mounted into the `content` slot.
/// - Parameter child: A `ViewBuilder` closure whose first view is mounted into the `child` slot.
/// - Parameter defaultWidget: A `ViewBuilder` closure whose first view is mounted into the `defaultWidget` slot.
/// - Parameter focusWidget: A `ViewBuilder` closure whose first view is mounted into the `focusWidget` slot.
/// - Parameter titlebar: A `ViewBuilder` closure whose first view is mounted into the `titlebar` slot.
/// - Parameter onActivateLink: Invoked when the widget emits the `activate-link` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onActivateDefault: Invoked when the widget emits the `activate-default` signal.
/// - Parameter onActivateFocus: Invoked when the widget emits the `activate-focus` signal.
/// - Parameter onCloseRequest: Invoked when the widget emits the `close-request` signal. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onEnableDebugging: Invoked when the widget emits the `enable-debugging` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onKeysChanged: Invoked when the widget emits the `keys-changed` signal.
public init(applicationIcon: String? = nil, applicationName: String? = nil, comments: String? = nil, copyright: String? = nil, debugInfo: String? = nil, debugInfoFilename: String? = nil, developerName: String? = nil, issueUrl: String? = nil, license: String? = nil, licenseType: Adw.License? = nil, releaseNotes: String? = nil, supportUrl: String? = nil, translatorCredits: String? = nil, version: String? = nil, website: String? = nil, adaptivePreview: Bool? = nil, application: Gtk.Application? = nil, decorated: Bool? = nil, deletable: Bool? = nil, destroyWithParent: Bool? = nil, display: Gtk.Display? = nil, focusVisible: Bool? = nil, gravity: Gtk.WindowGravity? = nil, handleMenubarAccel: Bool? = nil, hideOnClose: Bool? = nil, iconName: String? = nil, mnemonicsVisible: Bool? = nil, modal: Bool? = nil, resizable: Bool? = nil, startupId: String? = nil, title: String? = nil, transientFor: Gtk.Window? = nil, @ViewBuilder content: @escaping () -> [AnyView] = { [] }, @ViewBuilder child: @escaping () -> [AnyView] = { [] }, @ViewBuilder defaultWidget: @escaping () -> [AnyView] = { [] }, @ViewBuilder focusWidget: @escaping () -> [AnyView] = { [] }, @ViewBuilder titlebar: @escaping () -> [AnyView] = { [] }, onActivateLink: ((String) -> Bool)? = nil, onActivateDefault: (() -> Void)? = nil, onActivateFocus: (() -> Void)? = nil, onCloseRequest: (() -> Bool)? = nil, onEnableDebugging: ((Bool) -> Bool)? = nil, onKeysChanged: (() -> Void)? = nil) {
make = { _ in Adw.AboutWindow() }
configure.append { w, ctx in
if let applicationIcon { w.setApplicationIcon(applicationIcon: applicationIcon) }
if let applicationName { w.setApplicationName(applicationName: applicationName) }
if let comments { w.setComments(comments: comments) }
if let copyright { w.setCopyright(copyright: copyright) }
if let debugInfo { w.setDebugInfo(debugInfo: debugInfo) }
if let debugInfoFilename { w.setDebugInfoFilename(filename: debugInfoFilename) }
if let developerName { w.setDeveloperName(developerName: developerName) }
if let issueUrl { w.setIssueUrl(issueUrl: issueUrl) }
if let license { w.setLicense(license: license) }
if let licenseType { w.setLicenseType(licenseType: licenseType) }
if let releaseNotes { w.setReleaseNotes(releaseNotes: releaseNotes) }
if let supportUrl { w.setSupportUrl(supportUrl: supportUrl) }
if let translatorCredits { w.setTranslatorCredits(translatorCredits: translatorCredits) }
if let version { w.setVersion(version: version) }
if let website { w.setWebsite(website: website) }
if let adaptivePreview { w.setAdaptivePreview(adaptivePreview: adaptivePreview) }
if let application { w.setApplication(application: application) }
if let decorated { w.setDecorated(setting: decorated) }
if let deletable { w.setDeletable(setting: deletable) }
if let destroyWithParent { w.setDestroyWithParent(setting: destroyWithParent) }
if let display { w.setDisplay(display: display) }
if let focusVisible { w.setFocusVisible(setting: focusVisible) }
if let gravity { w.setGravity(gravity: gravity) }
if let handleMenubarAccel { w.setHandleMenubarAccel(handleMenubarAccel: handleMenubarAccel) }
if let hideOnClose { w.setHideOnClose(setting: hideOnClose) }
if let iconName { w.setIconName(name: iconName) }
if let mnemonicsVisible { w.setMnemonicsVisible(setting: mnemonicsVisible) }
if let modal { w.setModal(modal: modal) }
if let resizable { w.setResizable(resizable: resizable) }
if let startupId { w.setStartupId(startupId: startupId) }
if let title { w.setTitle(title: title) }
if let transientFor { w.setTransientFor(parent: transientFor) }
if let v = Portico.mountSlotChild(content, ctx, onUpdate: { v in w.setContent(content: v) }) { w.setContent(content: v) }
if let v = Portico.mountSlotChild(child, ctx, onUpdate: { v in w.setChild(child: v) }) { w.setChild(child: v) }
if let v = Portico.mountSlotChild(defaultWidget, ctx, onUpdate: { v in w.setDefaultWidget(defaultWidget: v) }) { w.setDefaultWidget(defaultWidget: v) }
if let v = Portico.mountSlotChild(focusWidget, ctx, onUpdate: { v in w.setFocus(focus: v) }) { w.setFocus(focus: v) }
if let v = Portico.mountSlotChild(titlebar, ctx, onUpdate: { v in w.setTitlebar(titlebar: v) }) { w.setTitlebar(titlebar: v) }
if let onActivateLink { ctx.registry.add(w.connectActivateLink { _, a0 in onActivateLink(a0) }) }
if let onActivateDefault { ctx.registry.add(w.connectActivateDefault { _ in onActivateDefault() }) }
if let onActivateFocus { ctx.registry.add(w.connectActivateFocus { _ in onActivateFocus() }) }
if let onCloseRequest { ctx.registry.add(w.connectCloseRequest { _ in onCloseRequest() }) }
if let onEnableDebugging { ctx.registry.add(w.connectEnableDebugging { _, a0 in onEnableDebugging(a0) }) }
if let onKeysChanged { ctx.registry.add(w.connectKeysChanged { _ in onKeysChanged() }) }
}
}
// PorticoGen: generateInits(static) | source: Adw.AboutWindow.init(resourcePath:releaseNotesVersion:)
/// Creates a new `AdwAboutWindow` using AppStream metadata.
///
/// This automatically sets the following properties with the following AppStream
/// values:
///
/// * [property`AboutWindow`:application-icon] is set from the `<id>`
/// * [property`AboutWindow`:application-name] is set from the `<name>`
/// * [property`AboutWindow`:developer-name] is set from the `<name>` within
/// `<developer>`
/// * [property`AboutWindow`:version] is set from the version of the latest release
/// * [property`AboutWindow`:website] is set from the `<url type="homepage">`
/// * [property`AboutWindow`:support-url] is set from the `<url type="help">`
/// * [property`AboutWindow`:issue-url] is set from the `<url type="bugtracker">`
/// * [property`AboutWindow`:license-type] is set from the `<project_license>`.
/// If the license type retrieved from AppStream is not listed in
/// [enum`Gtk`.License], it will be set to [enum`Gtk`.License.custom].
///
/// If `release_notes_version` is not `NULL`,
/// [property`AboutWindow`:release-notes-version] is set to match it, while
/// [property`AboutWindow`:release-notes] is set from the AppStream release
/// description for that version.
///
/// Applied once at mount; use the `Binding` or closure overload for values that change.
/// Each closure is evaluated once; children are added in order and slot closures mount their first view.
/// An empty closure adds no children and leaves slots unset.
/// Optional value parameters are applied only when non-`nil`; a `nil` argument leaves the widget's own default in place and cannot clear a nullable property - use the matching modifier for that.
///
/// - Parameter resourcePath: The `resourcePath` value forwarded to `Adw.AboutWindow`.
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Parameter applicationIcon: The name of the application icon.
/// - Parameter applicationName: The name of the application.
/// - Parameter comments: The comments about the application.
/// - Parameter copyright: The copyright information.
/// - Parameter debugInfo: The debug information.
/// - Parameter debugInfoFilename: The debug information filename.
/// - Parameter developerName: The developer name.
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Parameter license: The license text.
/// - Parameter licenseType: The license type.
/// - Parameter releaseNotes: The release notes of the application.
/// - Parameter supportUrl: The URL of the application's support page.
/// - Parameter translatorCredits: The translator credits string.
/// - Parameter version: The version of the application.
/// - Parameter website: The URL of the application's website.
/// - Parameter adaptivePreview: Whether adaptive preview is currently open.
/// - Parameter application: The `GtkApplication` associated with the window.
/// - Parameter decorated: Whether the window should have a frame (also known as *decorations*).
/// - Parameter deletable: Whether the window frame should have a close button.
/// - Parameter destroyWithParent: If this window should be destroyed when the parent is destroyed.
/// - Parameter display: The display that will display this window.
/// - Parameter focusVisible: Whether 'focus rectangles' are currently visible in this window.
/// - Parameter gravity: The gravity to use when resizing the window programmatically.
/// - Parameter handleMenubarAccel: Whether the window frame should handle <kbd>F10</kbd> for activating menubars.
/// - Parameter hideOnClose: If this window should be hidden instead of destroyed when the user clicks the close button.
/// - Parameter iconName: Specifies the name of the themed icon to use as the window icon.
/// - Parameter mnemonicsVisible: Whether mnemonics are currently visible in this window.
/// - Parameter modal: If true, the window is modal.
/// - Parameter resizable: If true, users can resize the window.
/// - Parameter startupId: A write-only property for setting window's startup notification identifier.
/// - Parameter title: The title of the window.
/// - Parameter transientFor: The transient parent of the window.
/// - Parameter content: A `ViewBuilder` closure whose first view is mounted into the `content` slot.
/// - Parameter child: A `ViewBuilder` closure whose first view is mounted into the `child` slot.
/// - Parameter defaultWidget: A `ViewBuilder` closure whose first view is mounted into the `defaultWidget` slot.
/// - Parameter focusWidget: A `ViewBuilder` closure whose first view is mounted into the `focusWidget` slot.
/// - Parameter titlebar: A `ViewBuilder` closure whose first view is mounted into the `titlebar` slot.
/// - Parameter onActivateLink: Invoked when the widget emits the `activate-link` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onActivateDefault: Invoked when the widget emits the `activate-default` signal.
/// - Parameter onActivateFocus: Invoked when the widget emits the `activate-focus` signal.
/// - Parameter onCloseRequest: Invoked when the widget emits the `close-request` signal. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onEnableDebugging: Invoked when the widget emits the `enable-debugging` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Parameter onKeysChanged: Invoked when the widget emits the `keys-changed` signal.
public init(resourcePath: String, releaseNotesVersion: String?, applicationIcon: String? = nil, applicationName: String? = nil, comments: String? = nil, copyright: String? = nil, debugInfo: String? = nil, debugInfoFilename: String? = nil, developerName: String? = nil, issueUrl: String? = nil, license: String? = nil, licenseType: Adw.License? = nil, releaseNotes: String? = nil, supportUrl: String? = nil, translatorCredits: String? = nil, version: String? = nil, website: String? = nil, adaptivePreview: Bool? = nil, application: Gtk.Application? = nil, decorated: Bool? = nil, deletable: Bool? = nil, destroyWithParent: Bool? = nil, display: Gtk.Display? = nil, focusVisible: Bool? = nil, gravity: Gtk.WindowGravity? = nil, handleMenubarAccel: Bool? = nil, hideOnClose: Bool? = nil, iconName: String? = nil, mnemonicsVisible: Bool? = nil, modal: Bool? = nil, resizable: Bool? = nil, startupId: String? = nil, title: String? = nil, transientFor: Gtk.Window? = nil, @ViewBuilder content: @escaping () -> [AnyView] = { [] }, @ViewBuilder child: @escaping () -> [AnyView] = { [] }, @ViewBuilder defaultWidget: @escaping () -> [AnyView] = { [] }, @ViewBuilder focusWidget: @escaping () -> [AnyView] = { [] }, @ViewBuilder titlebar: @escaping () -> [AnyView] = { [] }, onActivateLink: ((String) -> Bool)? = nil, onActivateDefault: (() -> Void)? = nil, onActivateFocus: (() -> Void)? = nil, onCloseRequest: (() -> Bool)? = nil, onEnableDebugging: ((Bool) -> Bool)? = nil, onKeysChanged: (() -> Void)? = nil) {
make = { _ in Adw.AboutWindow(resourcePath: resourcePath, releaseNotesVersion: releaseNotesVersion) }
configure.append { w, ctx in
if let applicationIcon { w.setApplicationIcon(applicationIcon: applicationIcon) }
if let applicationName { w.setApplicationName(applicationName: applicationName) }
if let comments { w.setComments(comments: comments) }
if let copyright { w.setCopyright(copyright: copyright) }
if let debugInfo { w.setDebugInfo(debugInfo: debugInfo) }
if let debugInfoFilename { w.setDebugInfoFilename(filename: debugInfoFilename) }
if let developerName { w.setDeveloperName(developerName: developerName) }
if let issueUrl { w.setIssueUrl(issueUrl: issueUrl) }
if let license { w.setLicense(license: license) }
if let licenseType { w.setLicenseType(licenseType: licenseType) }
if let releaseNotes { w.setReleaseNotes(releaseNotes: releaseNotes) }
if let supportUrl { w.setSupportUrl(supportUrl: supportUrl) }
if let translatorCredits { w.setTranslatorCredits(translatorCredits: translatorCredits) }
if let version { w.setVersion(version: version) }
if let website { w.setWebsite(website: website) }
if let adaptivePreview { w.setAdaptivePreview(adaptivePreview: adaptivePreview) }
if let application { w.setApplication(application: application) }
if let decorated { w.setDecorated(setting: decorated) }
if let deletable { w.setDeletable(setting: deletable) }
if let destroyWithParent { w.setDestroyWithParent(setting: destroyWithParent) }
if let display { w.setDisplay(display: display) }
if let focusVisible { w.setFocusVisible(setting: focusVisible) }
if let gravity { w.setGravity(gravity: gravity) }
if let handleMenubarAccel { w.setHandleMenubarAccel(handleMenubarAccel: handleMenubarAccel) }
if let hideOnClose { w.setHideOnClose(setting: hideOnClose) }
if let iconName { w.setIconName(name: iconName) }
if let mnemonicsVisible { w.setMnemonicsVisible(setting: mnemonicsVisible) }
if let modal { w.setModal(modal: modal) }
if let resizable { w.setResizable(resizable: resizable) }
if let startupId { w.setStartupId(startupId: startupId) }
if let title { w.setTitle(title: title) }
if let transientFor { w.setTransientFor(parent: transientFor) }
if let v = Portico.mountSlotChild(content, ctx, onUpdate: { v in w.setContent(content: v) }) { w.setContent(content: v) }
if let v = Portico.mountSlotChild(child, ctx, onUpdate: { v in w.setChild(child: v) }) { w.setChild(child: v) }
if let v = Portico.mountSlotChild(defaultWidget, ctx, onUpdate: { v in w.setDefaultWidget(defaultWidget: v) }) { w.setDefaultWidget(defaultWidget: v) }
if let v = Portico.mountSlotChild(focusWidget, ctx, onUpdate: { v in w.setFocus(focus: v) }) { w.setFocus(focus: v) }
if let v = Portico.mountSlotChild(titlebar, ctx, onUpdate: { v in w.setTitlebar(titlebar: v) }) { w.setTitlebar(titlebar: v) }
if let onActivateLink { ctx.registry.add(w.connectActivateLink { _, a0 in onActivateLink(a0) }) }
if let onActivateDefault { ctx.registry.add(w.connectActivateDefault { _ in onActivateDefault() }) }
if let onActivateFocus { ctx.registry.add(w.connectActivateFocus { _ in onActivateFocus() }) }
if let onCloseRequest { ctx.registry.add(w.connectCloseRequest { _ in onCloseRequest() }) }
if let onEnableDebugging { ctx.registry.add(w.connectEnableDebugging { _, a0 in onEnableDebugging(a0) }) }
if let onKeysChanged { ctx.registry.add(w.connectKeysChanged { _ in onKeysChanged() }) }
}
}
}
extension AboutWindow: WidgetView {
public typealias Target = Adw.AboutWindow
@_spi(Portico) public func appending(
_ step: @escaping (Adw.AboutWindow, MountContext) -> Void
) -> Self {
var c = self
c.configure.append(step)
return c
}
}
@_spi(Portico) extension AboutWindow: Mountable {
@_spi(Portico) public func mount(_ ctx: MountContext) -> Gtk.Widget {
let w = make(ctx)
for step in configure { step(w, ctx) }
return w
}
}
// PorticoGen: generateModifierExtension | source: Adw.AboutWindow
/// Modifiers for `Adw.AboutWindow`, available on every Portico view whose
/// backing widget is `Adw.AboutWindow` or one of its subclasses.
extension WidgetView where Target: Adw.AboutWindow {
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setApplicationIcon(applicationIcon:)
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func applicationIcon<S: StringProtocol>(_ applicationIcon: S) -> Self {
appending { w, _ in
w.setApplicationIcon(applicationIcon: String(applicationIcon))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setApplicationIcon(applicationIcon:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getApplicationIcon()
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func applicationIcon(_ applicationIcon: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, applicationIcon, registry: ctx.registry, notifyDetail: "application-icon",
read: { [w] in w.getApplicationIcon() },
write: { [w] v in w.setApplicationIcon(applicationIcon: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setApplicationIcon(applicationIcon:)
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setApplicationIcon(applicationIcon:)`.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Returns: A copy of this view with the modifier applied.
public func applicationIcon(_ applicationIcon: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setApplicationIcon(applicationIcon: applicationIcon()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setApplicationIcon(applicationIcon:)
/// Sets the name of the application icon for `self`.
///
/// The icon is displayed at the top of the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setApplicationIcon(applicationIcon:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter applicationIcon: The name of the application icon.
/// - Returns: A copy of this view with the modifier applied.
public func applicationIcon(_ applicationIcon: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(applicationIcon, registry: ctx.registry) { [w] v in w.setApplicationIcon(applicationIcon: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setApplicationName(applicationName:)
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter applicationName: The name of the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func applicationName<S: StringProtocol>(_ applicationName: S) -> Self {
appending { w, _ in
w.setApplicationName(applicationName: String(applicationName))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setApplicationName(applicationName:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getApplicationName()
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func applicationName(_ applicationName: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, applicationName, registry: ctx.registry, notifyDetail: "application-name",
read: { [w] in w.getApplicationName() },
write: { [w] v in w.setApplicationName(applicationName: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setApplicationName(applicationName:)
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setApplicationName(applicationName:)`.
///
/// - Parameter applicationName: The name of the application.
/// - Returns: A copy of this view with the modifier applied.
public func applicationName(_ applicationName: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setApplicationName(applicationName: applicationName()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setApplicationName(applicationName:)
/// Sets the application name for `self`.
///
/// The name is displayed at the top of the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setApplicationName(applicationName:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter applicationName: The name of the application.
/// - Returns: A copy of this view with the modifier applied.
public func applicationName(_ applicationName: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(applicationName, registry: ctx.registry) { [w] v in w.setApplicationName(applicationName: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setComments(comments:)
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter comments: The comments about the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func comments<S: StringProtocol>(_ comments: S) -> Self {
appending { w, _ in
w.setComments(comments: String(comments))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setComments(comments:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getComments()
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, comments, registry: ctx.registry, notifyDetail: "comments",
read: { [w] in w.getComments() },
write: { [w] v in w.setComments(comments: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setComments(comments:)
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setComments(comments:)`.
///
/// - Parameter comments: The comments about the application.
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setComments(comments: comments()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setComments(comments:)
/// Sets the comments about the application.
///
/// Comments will be shown on the Details page, above links.
///
/// Unlike [property`Gtk`.AboutDialog:comments], this string can be long and
/// detailed. It can also contain links and Pango markup.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setComments(comments:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter comments: The comments about the application.
/// - Returns: A copy of this view with the modifier applied.
public func comments(_ comments: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(comments, registry: ctx.registry) { [w] v in w.setComments(comments: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setCopyright(copyright:)
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutWindow`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter copyright: The copyright information.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func copyright<S: StringProtocol>(_ copyright: S) -> Self {
appending { w, _ in
w.setCopyright(copyright: String(copyright))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setCopyright(copyright:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getCopyright()
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutWindow`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, copyright, registry: ctx.registry, notifyDetail: "copyright",
read: { [w] in w.getCopyright() },
write: { [w] v in w.setCopyright(copyright: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setCopyright(copyright:)
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutWindow`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setCopyright(copyright:)`.
///
/// - Parameter copyright: The copyright information.
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setCopyright(copyright: copyright()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setCopyright(copyright:)
/// Sets the copyright information for `self`.
///
/// This should be a short string of one or two lines, for example:
/// `© 2022 Example`.
///
/// The copyright information will be displayed on the Legal page, before the
/// application license.
///
/// [method`AboutWindow`.add_legal_section] can be used to add copyright
/// information for the application dependencies or other components.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setCopyright(copyright:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter copyright: The copyright information.
/// - Returns: A copy of this view with the modifier applied.
public func copyright(_ copyright: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(copyright, registry: ctx.registry) { [w] v in w.setCopyright(copyright: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setDebugInfo(debugInfo:)
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutWindow` provides a quick way to save debug information to a file.
/// When saving, [property`AboutWindow`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter debugInfo: The debug information.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func debugInfo<S: StringProtocol>(_ debugInfo: S) -> Self {
appending { w, _ in
w.setDebugInfo(debugInfo: String(debugInfo))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setDebugInfo(debugInfo:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getDebugInfo()
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutWindow` provides a quick way to save debug information to a file.
/// When saving, [property`AboutWindow`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func debugInfo(_ debugInfo: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, debugInfo, registry: ctx.registry, notifyDetail: "debug-info",
read: { [w] in w.getDebugInfo() },
write: { [w] v in w.setDebugInfo(debugInfo: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setDebugInfo(debugInfo:)
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutWindow` provides a quick way to save debug information to a file.
/// When saving, [property`AboutWindow`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setDebugInfo(debugInfo:)`.
///
/// - Parameter debugInfo: The debug information.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfo(_ debugInfo: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setDebugInfo(debugInfo: debugInfo()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setDebugInfo(debugInfo:)
/// Sets the debug information for `self`.
///
/// Debug information will be shown on the Troubleshooting page. It's intended
/// to be attached to issue reports when reporting issues against the
/// application.
///
/// `AdwAboutWindow` provides a quick way to save debug information to a file.
/// When saving, [property`AboutWindow`:debug-info-filename] would be used as
/// the suggested filename.
///
/// Debug information cannot contain markup or links.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setDebugInfo(debugInfo:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter debugInfo: The debug information.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfo(_ debugInfo: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(debugInfo, registry: ctx.registry) { [w] v in w.setDebugInfo(debugInfo: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setDebugInfoFilename(filename:)
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutWindow`:debug-info].
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter debugInfoFilename: The debug information filename.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func debugInfoFilename<S: StringProtocol>(_ debugInfoFilename: S) -> Self {
appending { w, _ in
w.setDebugInfoFilename(filename: String(debugInfoFilename))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setDebugInfoFilename(filename:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getDebugInfoFilename()
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutWindow`:debug-info].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func debugInfoFilename(_ debugInfoFilename: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, debugInfoFilename, registry: ctx.registry, notifyDetail: "debug-info-filename",
read: { [w] in w.getDebugInfoFilename() },
write: { [w] v in w.setDebugInfoFilename(filename: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setDebugInfoFilename(filename:)
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutWindow`:debug-info].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setDebugInfoFilename(filename:)`.
///
/// - Parameter debugInfoFilename: The debug information filename.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfoFilename(_ debugInfoFilename: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setDebugInfoFilename(filename: debugInfoFilename()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setDebugInfoFilename(filename:)
/// Sets the debug information filename for `self`.
///
/// It will be used as the suggested filename when saving debug information to a
/// file.
///
/// See [property`AboutWindow`:debug-info].
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setDebugInfoFilename(filename:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter debugInfoFilename: The debug information filename.
/// - Returns: A copy of this view with the modifier applied.
public func debugInfoFilename(_ debugInfoFilename: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(debugInfoFilename, registry: ctx.registry) { [w] v in w.setDebugInfoFilename(filename: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setDeveloperName(developerName:)
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutWindow`:developers] and related properties.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter developerName: The developer name.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func developerName<S: StringProtocol>(_ developerName: S) -> Self {
appending { w, _ in
w.setDeveloperName(developerName: String(developerName))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setDeveloperName(developerName:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getDeveloperName()
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutWindow`:developers] and related properties.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func developerName(_ developerName: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, developerName, registry: ctx.registry, notifyDetail: "developer-name",
read: { [w] in w.getDeveloperName() },
write: { [w] v in w.setDeveloperName(developerName: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setDeveloperName(developerName:)
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutWindow`:developers] and related properties.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setDeveloperName(developerName:)`.
///
/// - Parameter developerName: The developer name.
/// - Returns: A copy of this view with the modifier applied.
public func developerName(_ developerName: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setDeveloperName(developerName: developerName()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setDeveloperName(developerName:)
/// Sets the developer name for `self`.
///
/// The developer name is displayed on the main page, under the application name.
///
/// If the application is developed by multiple people, the developer name can be
/// set to values like "AppName team", "AppName developers" or
/// "The AppName project", and the individual contributors can be listed on the
/// Credits page, with [property`AboutWindow`:developers] and related properties.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setDeveloperName(developerName:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter developerName: The developer name.
/// - Returns: A copy of this view with the modifier applied.
public func developerName(_ developerName: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(developerName, registry: ctx.registry) { [w] v in w.setDeveloperName(developerName: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setIssueUrl(issueUrl:)
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func issueUrl<S: StringProtocol>(_ issueUrl: S) -> Self {
appending { w, _ in
w.setIssueUrl(issueUrl: String(issueUrl))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setIssueUrl(issueUrl:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getIssueUrl()
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func issueUrl(_ issueUrl: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, issueUrl, registry: ctx.registry, notifyDetail: "issue-url",
read: { [w] in w.getIssueUrl() },
write: { [w] v in w.setIssueUrl(issueUrl: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setIssueUrl(issueUrl:)
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setIssueUrl(issueUrl:)`.
///
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Returns: A copy of this view with the modifier applied.
public func issueUrl(_ issueUrl: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setIssueUrl(issueUrl: issueUrl()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setIssueUrl(issueUrl:)
/// Sets the issue tracker URL for `self`.
///
/// The issue tracker link is displayed on the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setIssueUrl(issueUrl:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter issueUrl: The URL for the application's issue tracker.
/// - Returns: A copy of this view with the modifier applied.
public func issueUrl(_ issueUrl: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(issueUrl, registry: ctx.registry) { [w] v in w.setIssueUrl(issueUrl: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setLicense(license:)
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutWindow`:license-type].
///
/// When set, [property`AboutWindow`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutWindow`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter license: The license text.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func license<S: StringProtocol>(_ license: S) -> Self {
appending { w, _ in
w.setLicense(license: String(license))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setLicense(license:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getLicense()
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutWindow`:license-type].
///
/// When set, [property`AboutWindow`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutWindow`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, license, registry: ctx.registry, notifyDetail: "license",
read: { [w] in w.getLicense() },
write: { [w] v in w.setLicense(license: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setLicense(license:)
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutWindow`:license-type].
///
/// When set, [property`AboutWindow`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutWindow`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setLicense(license:)`.
///
/// - Parameter license: The license text.
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLicense(license: license()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setLicense(license:)
/// Sets the license for `self`.
///
/// This can be used to set a custom text for the license if it can't be set via
/// [property`AboutWindow`:license-type].
///
/// When set, [property`AboutWindow`:license-type] will be set to
/// [enum`Gtk`.License.custom].
///
/// The license text will be displayed on the Legal page, below the copyright
/// information.
///
/// License text can contain Pango markup and links.
///
/// [method`AboutWindow`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setLicense(license:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter license: The license text.
/// - Returns: A copy of this view with the modifier applied.
public func license(_ license: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(license, registry: ctx.registry) { [w] v in w.setLicense(license: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setLicenseType(licenseType:)
/// Sets the license for `self` from a list of known licenses.
///
/// If the application's license is not in the list,
/// [property`AboutWindow`:license] can be used instead. The license type will be
/// automatically set to [enum`Gtk`.License.custom] in that case.
///
/// If `license_type` is [enum`Gtk`.License.unknown], no information will be displayed.
///
/// If `license_type` is different from [enum`Gtk`.License.custom].
/// [property`AboutWindow`:license] will be cleared out.
///
/// The license description will be displayed on the Legal page, below the
/// copyright information.
///
/// [method`AboutWindow`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied once at mount; use the `Binding` or closure overload for a value that changes.
///
/// - Parameter licenseType: The license type.
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: Adw.License) -> Self {
appending { w, _ in
w.setLicenseType(licenseType: licenseType)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setLicenseType(licenseType:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getLicenseType()
/// Sets the license for `self` from a list of known licenses.
///
/// If the application's license is not in the list,
/// [property`AboutWindow`:license] can be used instead. The license type will be
/// automatically set to [enum`Gtk`.License.custom] in that case.
///
/// If `license_type` is [enum`Gtk`.License.unknown], no information will be displayed.
///
/// If `license_type` is different from [enum`Gtk`.License.custom].
/// [property`AboutWindow`:license] will be cleared out.
///
/// The license description will be displayed on the Legal page, below the
/// copyright information.
///
/// [method`AboutWindow`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `Adw.License` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: Portico.Binding<Adw.License>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, licenseType, registry: ctx.registry, notifyDetail: "license-type",
read: { [w] in w.getLicenseType() },
write: { [w] v in w.setLicenseType(licenseType: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setLicenseType(licenseType:)
/// Sets the license for `self` from a list of known licenses.
///
/// If the application's license is not in the list,
/// [property`AboutWindow`:license] can be used instead. The license type will be
/// automatically set to [enum`Gtk`.License.custom] in that case.
///
/// If `license_type` is [enum`Gtk`.License.unknown], no information will be displayed.
///
/// If `license_type` is different from [enum`Gtk`.License.custom].
/// [property`AboutWindow`:license] will be cleared out.
///
/// The license description will be displayed on the Legal page, below the
/// copyright information.
///
/// [method`AboutWindow`.add_legal_section] can be used to add license information
/// for the application dependencies or other components.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setLicenseType(licenseType:)`.
///
/// - Parameter licenseType: The license type.
/// - Returns: A copy of this view with the modifier applied.
public func licenseType(_ licenseType: @escaping () -> Adw.License) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setLicenseType(licenseType: licenseType()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setReleaseNotes(releaseNotes:)
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutWindow` displays the version above the release notes. If set, the
/// [property`AboutWindow`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutWindow`:version] is used.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter releaseNotes: The release notes of the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func releaseNotes<S: StringProtocol>(_ releaseNotes: S) -> Self {
appending { w, _ in
w.setReleaseNotes(releaseNotes: String(releaseNotes))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setReleaseNotes(releaseNotes:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getReleaseNotes()
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutWindow` displays the version above the release notes. If set, the
/// [property`AboutWindow`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutWindow`:version] is used.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotes(_ releaseNotes: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, releaseNotes, registry: ctx.registry, notifyDetail: "release-notes",
read: { [w] in w.getReleaseNotes() },
write: { [w] v in w.setReleaseNotes(releaseNotes: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setReleaseNotes(releaseNotes:)
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutWindow` displays the version above the release notes. If set, the
/// [property`AboutWindow`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutWindow`:version] is used.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setReleaseNotes(releaseNotes:)`.
///
/// - Parameter releaseNotes: The release notes of the application.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotes(_ releaseNotes: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setReleaseNotes(releaseNotes: releaseNotes()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setReleaseNotes(releaseNotes:)
/// Sets the release notes for `self`.
///
/// Release notes are displayed on the the What's New page.
///
/// Release notes are formatted the same way as
/// [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html`tag`-description).
///
/// The supported formatting options are:
///
/// * Paragraph (`<p>`)
/// * Ordered list (`<ol>`), with list items (`<li>`)
/// * Unordered list (`<ul>`), with list items (`<li>`)
///
/// Within paragraphs and list items, emphasis (`<em>`) and inline code
/// (`<code>`) text styles are supported. The emphasis is rendered in italic,
/// while inline code is shown in a monospaced font.
///
/// Any text outside paragraphs or list items is ignored.
///
/// Nested lists are not supported.
///
/// `AdwAboutWindow` displays the version above the release notes. If set, the
/// [property`AboutWindow`:release-notes-version] of the property will be used
/// as the version; otherwise, [property`AboutWindow`:version] is used.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setReleaseNotes(releaseNotes:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter releaseNotes: The release notes of the application.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotes(_ releaseNotes: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(releaseNotes, registry: ctx.registry) { [w] v in w.setReleaseNotes(releaseNotes: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setReleaseNotesVersion(version:)
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutWindow`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutWindow`:release-notes].
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func releaseNotesVersion<S: StringProtocol>(_ releaseNotesVersion: S) -> Self {
appending { w, _ in
w.setReleaseNotesVersion(version: String(releaseNotesVersion))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setReleaseNotesVersion(version:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getReleaseNotesVersion()
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutWindow`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutWindow`:release-notes].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotesVersion(_ releaseNotesVersion: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, releaseNotesVersion, registry: ctx.registry, notifyDetail: "release-notes-version",
read: { [w] in w.getReleaseNotesVersion() },
write: { [w] v in w.setReleaseNotesVersion(version: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setReleaseNotesVersion(version:)
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutWindow`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutWindow`:release-notes].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setReleaseNotesVersion(version:)`.
///
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotesVersion(_ releaseNotesVersion: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setReleaseNotesVersion(version: releaseNotesVersion()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setReleaseNotesVersion(version:)
/// Sets the version described by the application's release notes.
///
/// The release notes version is displayed on the What's New page, above the
/// release notes.
///
/// If not set, [property`AboutWindow`:version] will be used instead.
///
/// For example, an application with the current version 2.0.2 might want to
/// keep the release notes from 2.0.0, and set the release notes version
/// accordingly.
///
/// See [property`AboutWindow`:release-notes].
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setReleaseNotesVersion(version:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter releaseNotesVersion: The version described by the application's release notes.
/// - Returns: A copy of this view with the modifier applied.
public func releaseNotesVersion(_ releaseNotesVersion: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(releaseNotesVersion, registry: ctx.registry) { [w] v in w.setReleaseNotesVersion(version: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setSupportUrl(supportUrl:)
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter supportUrl: The URL of the application's support page.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func supportUrl<S: StringProtocol>(_ supportUrl: S) -> Self {
appending { w, _ in
w.setSupportUrl(supportUrl: String(supportUrl))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setSupportUrl(supportUrl:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getSupportUrl()
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func supportUrl(_ supportUrl: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, supportUrl, registry: ctx.registry, notifyDetail: "support-url",
read: { [w] in w.getSupportUrl() },
write: { [w] v in w.setSupportUrl(supportUrl: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setSupportUrl(supportUrl:)
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setSupportUrl(supportUrl:)`.
///
/// - Parameter supportUrl: The URL of the application's support page.
/// - Returns: A copy of this view with the modifier applied.
public func supportUrl(_ supportUrl: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setSupportUrl(supportUrl: supportUrl()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setSupportUrl(supportUrl:)
/// Sets the URL of the support page for `self`.
///
/// The support page link is displayed on the main page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setSupportUrl(supportUrl:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter supportUrl: The URL of the application's support page.
/// - Returns: A copy of this view with the modifier applied.
public func supportUrl(_ supportUrl: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(supportUrl, registry: ctx.registry) { [w] v in w.setSupportUrl(supportUrl: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutWindow`:developers]
/// * [property`AboutWindow`:designers]
/// * [property`AboutWindow`:artists]
/// * [property`AboutWindow`:documenters]
/// * [method`AboutWindow`.add_credit_section]
/// * [method`AboutWindow`.add_acknowledgement_section]
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter translatorCredits: The translator credits string.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func translatorCredits<S: StringProtocol>(_ translatorCredits: S) -> Self {
appending { w, _ in
w.setTranslatorCredits(translatorCredits: String(translatorCredits))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setTranslatorCredits(translatorCredits:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getTranslatorCredits()
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutWindow`:developers]
/// * [property`AboutWindow`:designers]
/// * [property`AboutWindow`:artists]
/// * [property`AboutWindow`:documenters]
/// * [method`AboutWindow`.add_credit_section]
/// * [method`AboutWindow`.add_acknowledgement_section]
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, translatorCredits, registry: ctx.registry, notifyDetail: "translator-credits",
read: { [w] in w.getTranslatorCredits() },
write: { [w] v in w.setTranslatorCredits(translatorCredits: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutWindow`:developers]
/// * [property`AboutWindow`:designers]
/// * [property`AboutWindow`:artists]
/// * [property`AboutWindow`:documenters]
/// * [method`AboutWindow`.add_credit_section]
/// * [method`AboutWindow`.add_acknowledgement_section]
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setTranslatorCredits(translatorCredits:)`.
///
/// - Parameter translatorCredits: The translator credits string.
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setTranslatorCredits(translatorCredits: translatorCredits()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setTranslatorCredits(translatorCredits:)
/// Sets the translator credits string.
///
/// It will be displayed on the Credits page.
///
/// This string should be `"translator-credits"` or `"translator_credits"` and
/// should be marked as translatable.
///
/// The string may contain email addresses and URLs, see the introduction for
/// more details. When there is more than one translator, they must be
/// separated by a newline in the same string.
///
/// See also:
///
/// * [property`AboutWindow`:developers]
/// * [property`AboutWindow`:designers]
/// * [property`AboutWindow`:artists]
/// * [property`AboutWindow`:documenters]
/// * [method`AboutWindow`.add_credit_section]
/// * [method`AboutWindow`.add_acknowledgement_section]
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setTranslatorCredits(translatorCredits:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter translatorCredits: The translator credits string.
/// - Returns: A copy of this view with the modifier applied.
public func translatorCredits(_ translatorCredits: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(translatorCredits, registry: ctx.registry) { [w] v in w.setTranslatorCredits(translatorCredits: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setVersion(version:)
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutWindow`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter version: The version of the application.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func version<S: StringProtocol>(_ version: S) -> Self {
appending { w, _ in
w.setVersion(version: String(version))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setVersion(version:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getVersion()
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutWindow`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, version, registry: ctx.registry, notifyDetail: "version",
read: { [w] in w.getVersion() },
write: { [w] v in w.setVersion(version: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setVersion(version:)
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutWindow`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setVersion(version:)`.
///
/// - Parameter version: The version of the application.
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setVersion(version: version()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setVersion(version:)
/// Sets the version for `self`.
///
/// The version is displayed on the main page.
///
/// If [property`AboutWindow`:release-notes-version] is not set, the version will
/// also be displayed above the release notes on the What's New page.
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setVersion(version:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter version: The version of the application.
/// - Returns: A copy of this view with the modifier applied.
public func version(_ version: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(version, registry: ctx.registry) { [w] v in w.setVersion(version: v) }
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(static) | source: Adw.AboutWindow.setWebsite(website:)
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutWindow`.add_link].
///
/// Applied once at mount; use the `Binding`, closure, or `InterpolatedText` overload for a value that changes.
/// A string literal containing interpolation selects the `InterpolatedText` overload instead, which updates live.
///
/// - Parameter website: The URL of the application's website.
/// - Returns: A copy of this view with the modifier applied.
@_disfavoredOverload
public func website<S: StringProtocol>(_ website: S) -> Self {
appending { w, _ in
w.setWebsite(website: String(website))
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers -> bindingModifier(twoWay) | source: Adw.AboutWindow.setWebsite(website:), GObject.Object.connectNotify(detail:_:), Adw.AboutWindow.getWebsite()
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutWindow`.add_link].
///
/// Applied at mount and re-applied on every change the binding publishes.
/// When `String` conforms to `Equatable` this binds in both directions: the widget's `notify` signal writes its current value back into the binding, so changes made in the UI propagate to the bound state. Each direction compares before writing, which terminates the echo after one hop. A value type that is not `Equatable` binds one way only, because the echo cannot be broken.
///
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: Portico.Binding<String>) -> Self {
appending { w, ctx in
Portico.bindProperty(
w, website, registry: ctx.registry, notifyDetail: "website",
read: { [w] in w.getWebsite() },
write: { [w] v in w.setWebsite(website: v) }
)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(closure) | source: Adw.AboutWindow.setWebsite(website:)
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutWindow`.add_link].
///
/// The closure runs inside a `DependencyTracker`, so any `@State` it reads re-runs it and pushes the new value through `Adw.AboutWindow.setWebsite(website:)`.
///
/// - Parameter website: The URL of the application's website.
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: @escaping () -> String) -> Self {
appending { w, ctx in
let tracker = DependencyTracker { [w] in w.setWebsite(website: website()) }
tracker.run()
ctx.registry.add(tracker)
}
}
// PorticoGen: generateModifierExtension -> generatePropertyModifiers(interpolation) | source: Adw.AboutWindow.setWebsite(website:)
/// Sets the application website URL for `self`.
///
/// Website is displayed on the Details page, below comments, or on the main page
/// if the Details page doesn't have any other content.
///
/// Applications can add other links below, see [method`AboutWindow`.add_link].
///
/// Interpolated segments are captured unevaluated and re-read inside a `DependencyTracker`, so any `@State` they read pushes a new value through `Adw.AboutWindow.setWebsite(website:)`. A literal with no interpolation is applied once, with no subscription.
///
/// - Parameter website: The URL of the application's website.
/// - Returns: A copy of this view with the modifier applied.
public func website(_ website: Portico.InterpolatedText) -> Self {
appending { w, ctx in
Portico.bindInterpolation(website, registry: ctx.registry) { [w] v in w.setWebsite(website: v) }
}
}
// PorticoGen: generateModifierExtension -> generateSignalModifier | source: Adw.AboutWindow.connectActivateLink(_:)
/// Emitted when a URL is activated.
///
/// Applications may connect to it to override the default behavior, which is
/// to call [func`Gtk`.show_uri].
///
/// - Parameter handler: Invoked when the widget emits the `activate-link` signal. The closure receives the signal's arguments in order. Its return value is forwarded to GTK as the signal's result.
/// - Returns: A copy of this view with the modifier applied.
public func onActivateLink(_ handler: @escaping (String) -> Bool) -> Self {
appending { w, ctx in
ctx.registry.add(w.connectActivateLink { _, a0 in handler(a0) })
}
}
}