Add support for GtkSeparator
This commit is contained in:
parent
e9e4cf0e94
commit
77dd38e712
@ -2,7 +2,7 @@
|
||||
// ActionRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// AspectFrame.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Avatar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Banner.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Bin.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Box.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Button.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ButtonContent.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Carousel.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// CenterBox.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// CheckButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Clamp.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ComboRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// EntryRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ExpanderRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// FlowBox.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// HeaderBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Label.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// LevelBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// LinkButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ListBox.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Menu.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// NavigationView.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Overlay.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// OverlaySplitView.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// PasswordEntryRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Picture.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Popover.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// PreferencesGroup.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// PreferencesPage.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// PreferencesRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ProgressBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ScrolledWindow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SearchBar.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SearchEntry.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
86
Sources/Adwaita/View/Generated/Separator.swift
Normal file
86
Sources/Adwaita/View/Generated/Separator.swift
Normal file
@ -0,0 +1,86 @@
|
||||
//
|
||||
// Separator.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
import LevenshteinTransformations
|
||||
|
||||
/// `GtkSeparator` is a horizontal or vertical separator widget.
|
||||
///
|
||||
/// ![An example GtkSeparator](separator.png)
|
||||
///
|
||||
/// A `GtkSeparator` can be used to group the widgets within a window.
|
||||
/// It displays a line with a shadow to make it appear sunken into the
|
||||
/// interface.
|
||||
///
|
||||
/// # CSS nodes
|
||||
///
|
||||
/// `GtkSeparator` has a single CSS node with name separator. The node
|
||||
/// gets one of the .horizontal or .vertical style classes.
|
||||
///
|
||||
/// # Accessibility
|
||||
///
|
||||
/// `GtkSeparator` uses the %GTK_ACCESSIBLE_ROLE_SEPARATOR role.
|
||||
public struct Separator: Widget {
|
||||
|
||||
/// Additional update functions for type extensions.
|
||||
var updateFunctions: [(ViewStorage, [(View) -> View], Bool) -> Void] = []
|
||||
/// Additional appear functions for type extensions.
|
||||
var appearFunctions: [(ViewStorage, [(View) -> View]) -> Void] = []
|
||||
|
||||
/// The accessible role of the given `GtkAccessible` implementation.
|
||||
///
|
||||
/// The accessible role cannot be changed once set.
|
||||
var accessibleRole: String?
|
||||
/// The application.
|
||||
var app: GTUIApp?
|
||||
/// The window.
|
||||
var window: GTUIApplicationWindow?
|
||||
|
||||
/// Initialize `Separator`.
|
||||
public init() {
|
||||
}
|
||||
|
||||
/// Get the widget's view storage.
|
||||
/// - Parameter modifiers: The view modifiers.
|
||||
/// - Returns: The view storage.
|
||||
public func container(modifiers: [(View) -> View]) -> ViewStorage {
|
||||
let storage = ViewStorage(gtk_separator_new(GTK_ORIENTATION_VERTICAL)?.opaque())
|
||||
for function in appearFunctions {
|
||||
function(storage, modifiers)
|
||||
}
|
||||
update(storage, modifiers: modifiers, updateProperties: true)
|
||||
|
||||
return storage
|
||||
}
|
||||
|
||||
/// Update the widget's view storage.
|
||||
/// - Parameters:
|
||||
/// - storage: The view storage.
|
||||
/// - modifiers: The view modifiers.
|
||||
/// - updateProperties: Whether to update the view's properties.
|
||||
public func update(_ storage: ViewStorage, modifiers: [(View) -> View], updateProperties: Bool) {
|
||||
storage.modify { widget in
|
||||
|
||||
|
||||
|
||||
}
|
||||
for function in updateFunctions {
|
||||
function(storage, modifiers, updateProperties)
|
||||
}
|
||||
}
|
||||
|
||||
/// The accessible role of the given `GtkAccessible` implementation.
|
||||
///
|
||||
/// The accessible role cannot be changed once set.
|
||||
public func accessibleRole(_ accessibleRole: String?) -> Self {
|
||||
var newSelf = self
|
||||
newSelf.accessibleRole = accessibleRole
|
||||
|
||||
return newSelf
|
||||
}
|
||||
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// SpinRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Spinner.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SplitButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// StatusPage.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SwitchRow.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ToastOverlay.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ToggleButton.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// ToolbarView.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -2,7 +2,7 @@
|
||||
// WindowTitle.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by auto-generation on 19.07.24.
|
||||
// Created by auto-generation on 21.07.24.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
@ -266,6 +266,11 @@ struct GenerationConfiguration {
|
||||
class: "AspectFrame",
|
||||
initializer: "gtk_aspect_frame_new(0.5, 0.5, ratio, 0)",
|
||||
requiredProperties: ["ratio"]
|
||||
),
|
||||
.init(
|
||||
class: "Separator",
|
||||
initializer: "gtk_separator_new(GTK_ORIENTATION_VERTICAL)",
|
||||
excludeProperties: ["orientation"]
|
||||
)
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user