Merge pull request 'Add Symbol view' (#73) from marquiskurt/adwaita-swift:main into main
Reviewed-on: #73 Reviewed-by: david-swift <david-swift@noreply.aproksha.uber.space>
This commit is contained in:
commit
f86e968028
@ -2,7 +2,7 @@
|
|||||||
// ActionRow.swift
|
// ActionRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// AspectFrame.swift
|
// AspectFrame.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Avatar.swift
|
// Avatar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Banner.swift
|
// Banner.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Bin.swift
|
// Bin.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Box.swift
|
// Box.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Button.swift
|
// Button.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ButtonContent.swift
|
// ButtonContent.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Carousel.swift
|
// Carousel.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// CenterBox.swift
|
// CenterBox.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// CheckButton.swift
|
// CheckButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Clamp.swift
|
// Clamp.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ComboRow.swift
|
// ComboRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// DropDown.swift
|
// DropDown.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Entry.swift
|
// Entry.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// EntryRow.swift
|
// EntryRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ExpanderRow.swift
|
// ExpanderRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Fixed.swift
|
// Fixed.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// FlowBox.swift
|
// FlowBox.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// HeaderBar.swift
|
// HeaderBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
182
Sources/Core/View/Generated/Image.swift
Normal file
182
Sources/Core/View/Generated/Image.swift
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
//
|
||||||
|
// Image.swift
|
||||||
|
// Adwaita
|
||||||
|
//
|
||||||
|
// Created by auto-generation on 23.10.25.
|
||||||
|
//
|
||||||
|
|
||||||
|
import CAdw
|
||||||
|
import LevenshteinTransformations
|
||||||
|
|
||||||
|
/// Displays an image.
|
||||||
|
///
|
||||||
|
/// picture><source srcset="image-dark.png" media="(prefers-color-scheme: dark)"><img alt="An example GtkImage" src="image.png"></picture>
|
||||||
|
///
|
||||||
|
/// Various kinds of object can be displayed as an image; most typically,
|
||||||
|
/// you would load a `GdkTexture` from a file, using the convenience function
|
||||||
|
/// [ctor@Gtk.Image.new_from_file], for instance:
|
||||||
|
///
|
||||||
|
/// ```c
|
||||||
|
/// GtkWidget *image = gtk_image_new_from_file ("myfile.png");
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// If the file isn’t loaded successfully, the image will contain a
|
||||||
|
/// “broken image” icon similar to that used in many web browsers.
|
||||||
|
///
|
||||||
|
/// If you want to handle errors in loading the file yourself,
|
||||||
|
/// for example by displaying an error message, then load the image with
|
||||||
|
/// [ctor@Gdk.Texture.new_from_file], then create the `GtkImage` with
|
||||||
|
/// [ctor@Gtk.Image.new_from_paintable].
|
||||||
|
///
|
||||||
|
/// Sometimes an application will want to avoid depending on external data
|
||||||
|
/// files, such as image files. See the documentation of `GResource` inside
|
||||||
|
/// GIO, for details. In this case, [property@Gtk.Image:resource],
|
||||||
|
/// [ctor@Gtk.Image.new_from_resource], and [method@Gtk.Image.set_from_resource]
|
||||||
|
/// should be used.
|
||||||
|
///
|
||||||
|
/// `GtkImage` displays its image as an icon, with a size that is determined
|
||||||
|
/// by the application. See [class@Gtk.Picture] if you want to show an image
|
||||||
|
/// at is actual size.
|
||||||
|
///
|
||||||
|
/// ## CSS nodes
|
||||||
|
///
|
||||||
|
/// `GtkImage` has a single CSS node with the name `image`. The style classes
|
||||||
|
/// `.normal-icons` or `.large-icons` may appear, depending on the
|
||||||
|
/// [property@Gtk.Image:icon-size] property.
|
||||||
|
///
|
||||||
|
/// ## Accessibility
|
||||||
|
///
|
||||||
|
/// `GtkImage` uses the [enum@Gtk.AccessibleRole.img] role.
|
||||||
|
public struct Image: AdwaitaWidget {
|
||||||
|
|
||||||
|
/// Additional update functions for type extensions.
|
||||||
|
var updateFunctions: [(ViewStorage, WidgetData, Bool) -> Void] = []
|
||||||
|
/// Additional appear functions for type extensions.
|
||||||
|
var appearFunctions: [(ViewStorage, WidgetData) -> Void] = []
|
||||||
|
|
||||||
|
/// The accessible role of the given `GtkAccessible` implementation.
|
||||||
|
///
|
||||||
|
/// The accessible role cannot be changed once set.
|
||||||
|
var accessibleRole: String?
|
||||||
|
/// The name of the icon in the icon theme.
|
||||||
|
///
|
||||||
|
/// If the icon theme is changed, the image will be updated automatically.
|
||||||
|
var iconName: String?
|
||||||
|
/// The size in pixels to display icons at.
|
||||||
|
///
|
||||||
|
/// If set to a value != -1, this property overrides the
|
||||||
|
/// [property@Gtk.Image:icon-size] property for images of type
|
||||||
|
/// `GTK_IMAGE_ICON_NAME`.
|
||||||
|
var pixelSize: Int?
|
||||||
|
/// A path to a resource file to display.
|
||||||
|
var resource: String?
|
||||||
|
/// The representation being used for image data.
|
||||||
|
var storageType: String?
|
||||||
|
/// Whether the icon displayed in the `GtkImage` will use
|
||||||
|
/// standard icon names fallback.
|
||||||
|
///
|
||||||
|
/// The value of this property is only relevant for images of type
|
||||||
|
/// %GTK_IMAGE_ICON_NAME and %GTK_IMAGE_GICON.
|
||||||
|
var useFallback: Bool?
|
||||||
|
|
||||||
|
/// Initialize `Image`.
|
||||||
|
public init() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The view storage.
|
||||||
|
/// - Parameters:
|
||||||
|
/// - modifiers: Modify views before being updated.
|
||||||
|
/// - type: The view render data type.
|
||||||
|
/// - Returns: The view storage.
|
||||||
|
public func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||||
|
let storage = ViewStorage(gtk_image_new()?.opaque())
|
||||||
|
for function in appearFunctions {
|
||||||
|
function(storage, data)
|
||||||
|
}
|
||||||
|
update(storage, data: data, updateProperties: true, type: type)
|
||||||
|
|
||||||
|
return storage
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Update the stored content.
|
||||||
|
/// - Parameters:
|
||||||
|
/// - storage: The storage to update.
|
||||||
|
/// - modifiers: Modify views before being updated
|
||||||
|
/// - updateProperties: Whether to update the view's properties.
|
||||||
|
/// - type: The view render data type.
|
||||||
|
public func update<Data>(_ storage: ViewStorage, data: WidgetData, updateProperties: Bool, type: Data.Type) where Data: ViewRenderData {
|
||||||
|
storage.modify { widget in
|
||||||
|
|
||||||
|
if let iconName, updateProperties, (storage.previousState as? Self)?.iconName != iconName {
|
||||||
|
gtk_image_set_from_icon_name(widget, iconName)
|
||||||
|
}
|
||||||
|
if let pixelSize, updateProperties, (storage.previousState as? Self)?.pixelSize != pixelSize {
|
||||||
|
gtk_image_set_pixel_size(widget, pixelSize.cInt)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
for function in updateFunctions {
|
||||||
|
function(storage, data, updateProperties)
|
||||||
|
}
|
||||||
|
if updateProperties {
|
||||||
|
storage.previousState = self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The name of the icon in the icon theme.
|
||||||
|
///
|
||||||
|
/// If the icon theme is changed, the image will be updated automatically.
|
||||||
|
public func iconName(_ iconName: String?) -> Self {
|
||||||
|
var newSelf = self
|
||||||
|
newSelf.iconName = iconName
|
||||||
|
return newSelf
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The size in pixels to display icons at.
|
||||||
|
///
|
||||||
|
/// If set to a value != -1, this property overrides the
|
||||||
|
/// [property@Gtk.Image:icon-size] property for images of type
|
||||||
|
/// `GTK_IMAGE_ICON_NAME`.
|
||||||
|
public func pixelSize(_ pixelSize: Int?) -> Self {
|
||||||
|
var newSelf = self
|
||||||
|
newSelf.pixelSize = pixelSize
|
||||||
|
return newSelf
|
||||||
|
}
|
||||||
|
|
||||||
|
/// A path to a resource file to display.
|
||||||
|
public func resource(_ resource: String?) -> Self {
|
||||||
|
var newSelf = self
|
||||||
|
newSelf.resource = resource
|
||||||
|
return newSelf
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The representation being used for image data.
|
||||||
|
public func storageType(_ storageType: String?) -> Self {
|
||||||
|
var newSelf = self
|
||||||
|
newSelf.storageType = storageType
|
||||||
|
return newSelf
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Whether the icon displayed in the `GtkImage` will use
|
||||||
|
/// standard icon names fallback.
|
||||||
|
///
|
||||||
|
/// The value of this property is only relevant for images of type
|
||||||
|
/// %GTK_IMAGE_ICON_NAME and %GTK_IMAGE_GICON.
|
||||||
|
public func useFallback(_ useFallback: Bool? = true) -> Self {
|
||||||
|
var newSelf = self
|
||||||
|
newSelf.useFallback = useFallback
|
||||||
|
return newSelf
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
// Label.swift
|
// Label.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// LevelBar.swift
|
// LevelBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// LinkButton.swift
|
// LinkButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ListBox.swift
|
// ListBox.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Menu.swift
|
// Menu.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// NavigationView.swift
|
// NavigationView.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Overlay.swift
|
// Overlay.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// OverlaySplitView.swift
|
// OverlaySplitView.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PasswordEntryRow.swift
|
// PasswordEntryRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Picture.swift
|
// Picture.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Popover.swift
|
// Popover.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -13,12 +13,17 @@ import LevenshteinTransformations
|
|||||||
/// <picture><source srcset="popover-dark.png" media="(prefers-color-scheme: dark)"><img alt="An example GtkPopover" src="popover.png"></picture>
|
/// <picture><source srcset="popover-dark.png" media="(prefers-color-scheme: dark)"><img alt="An example GtkPopover" src="popover.png"></picture>
|
||||||
///
|
///
|
||||||
/// It is primarily meant to provide context-dependent information
|
/// It is primarily meant to provide context-dependent information
|
||||||
/// or options. Popovers are attached to a parent widget. By default,
|
/// or options. Popovers are attached to a parent widget. The parent widget
|
||||||
/// they point to the whole widget area, although this behavior can be
|
/// must support popover children, as [class@Gtk.MenuButton] and
|
||||||
/// changed with [method@Gtk.Popover.set_pointing_to].
|
/// [class@Gtk.PopoverMenuBar] do. If you want to make a custom widget that
|
||||||
|
/// has an attached popover, you need to call [method@Gtk.Popover.present]
|
||||||
|
/// in your [vfunc@Gtk.Widget.size_allocate] vfunc, in order to update the
|
||||||
|
/// positioning of the popover.
|
||||||
///
|
///
|
||||||
/// The position of a popover relative to the widget it is attached to
|
/// The position of a popover relative to the widget it is attached to
|
||||||
/// can also be changed with [method@Gtk.Popover.set_position]
|
/// can also be changed with [method@Gtk.Popover.set_position]. By default,
|
||||||
|
/// it points to the whole widget area, but it can be made to point to
|
||||||
|
/// a specific area using [method@Gtk.Popover.set_pointing_to].
|
||||||
///
|
///
|
||||||
/// By default, `GtkPopover` performs a grab, in order to ensure input
|
/// By default, `GtkPopover` performs a grab, in order to ensure input
|
||||||
/// events get redirected to it while it is shown, and also so the popover
|
/// events get redirected to it while it is shown, and also so the popover
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PreferencesGroup.swift
|
// PreferencesGroup.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PreferencesPage.swift
|
// PreferencesPage.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// PreferencesRow.swift
|
// PreferencesRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ProgressBar.swift
|
// ProgressBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ScrolledWindow.swift
|
// ScrolledWindow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SearchBar.swift
|
// SearchBar.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SearchEntry.swift
|
// SearchEntry.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Separator.swift
|
// Separator.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SpinRow.swift
|
// SpinRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// Spinner.swift
|
// Spinner.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
@ -32,6 +32,10 @@ import LevenshteinTransformations
|
|||||||
///
|
///
|
||||||
/// `AdwSpinner` has a single node with the name `image` and the style class
|
/// `AdwSpinner` has a single node with the name `image` and the style class
|
||||||
/// `.spinner`.
|
/// `.spinner`.
|
||||||
|
///
|
||||||
|
/// ## Accessibility
|
||||||
|
///
|
||||||
|
/// `AdwSpinner` uses the [enum@Gtk.AccessibleRole.progress-bar] role.
|
||||||
public struct Spinner: AdwaitaWidget {
|
public struct Spinner: AdwaitaWidget {
|
||||||
|
|
||||||
/// Additional update functions for type extensions.
|
/// Additional update functions for type extensions.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SplitButton.swift
|
// SplitButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// StatusPage.swift
|
// StatusPage.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// SwitchRow.swift
|
// SwitchRow.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ToastOverlay.swift
|
// ToastOverlay.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ToggleButton.swift
|
// ToggleButton.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// ToolbarView.swift
|
// ToolbarView.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
// WindowTitle.swift
|
// WindowTitle.swift
|
||||||
// Adwaita
|
// Adwaita
|
||||||
//
|
//
|
||||||
// Created by auto-generation on 19.04.25.
|
// Created by auto-generation on 23.10.25.
|
||||||
//
|
//
|
||||||
|
|
||||||
import CAdw
|
import CAdw
|
||||||
|
|||||||
19
Sources/Core/View/Symbol.swift
Normal file
19
Sources/Core/View/Symbol.swift
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// Symbol.swift
|
||||||
|
// Adwaita
|
||||||
|
//
|
||||||
|
// Created by Marquis Kurt on 23.10.25.
|
||||||
|
//
|
||||||
|
|
||||||
|
/// A view that display a symbolic image.
|
||||||
|
public typealias Symbol = Image
|
||||||
|
|
||||||
|
extension Symbol {
|
||||||
|
|
||||||
|
/// Initialize a symbolic image view.
|
||||||
|
/// - Parameter icon: The icon to display in the view.
|
||||||
|
public init(icon: Icon) {
|
||||||
|
self.init()
|
||||||
|
self.iconName = icon.string
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -34,6 +34,7 @@ enum Page: String, Identifiable, CaseIterable, Codable, CustomStringConvertible
|
|||||||
case fixed
|
case fixed
|
||||||
case textEditor
|
case textEditor
|
||||||
case splitView
|
case splitView
|
||||||
|
case symbol
|
||||||
|
|
||||||
var id: Self {
|
var id: Self {
|
||||||
self
|
self
|
||||||
@ -115,6 +116,8 @@ enum Page: String, Identifiable, CaseIterable, Codable, CustomStringConvertible
|
|||||||
return "A simple text editor"
|
return "A simple text editor"
|
||||||
case .splitView:
|
case .splitView:
|
||||||
return "A split view whose panes are ajustable in size"
|
return "A split view whose panes are ajustable in size"
|
||||||
|
case .symbol:
|
||||||
|
return "Display a symbolic image"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,6 +169,8 @@ enum Page: String, Identifiable, CaseIterable, Codable, CustomStringConvertible
|
|||||||
TextEditorDemo()
|
TextEditorDemo()
|
||||||
case .splitView:
|
case .splitView:
|
||||||
SplitViewDemo()
|
SplitViewDemo()
|
||||||
|
case .symbol:
|
||||||
|
SymbolDemo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// swiftlint:enable cyclomatic_complexity
|
// swiftlint:enable cyclomatic_complexity
|
||||||
|
|||||||
28
Sources/Demo/SymbolDemo.swift
Normal file
28
Sources/Demo/SymbolDemo.swift
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
//
|
||||||
|
// SymbolDemo.swift
|
||||||
|
// Adwaita
|
||||||
|
//
|
||||||
|
// Created by Marquis Kurt on 23.10.25.
|
||||||
|
//
|
||||||
|
|
||||||
|
// swiftlint:disable missing_docs
|
||||||
|
|
||||||
|
import Adwaita
|
||||||
|
|
||||||
|
struct SymbolDemo: View {
|
||||||
|
|
||||||
|
var view: Body {
|
||||||
|
HStack {
|
||||||
|
Symbol(icon: .default(icon: .goNext))
|
||||||
|
.pixelSize(64)
|
||||||
|
Symbol(icon: .default(icon: .goPrevious))
|
||||||
|
.pixelSize(64)
|
||||||
|
Symbol(icon: .default(icon: .airplaneMode))
|
||||||
|
.pixelSize(64)
|
||||||
|
}
|
||||||
|
.halign(.center)
|
||||||
|
.hexpand()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// swiftlint:enable missing_docs
|
||||||
@ -301,6 +301,7 @@ struct GenerationConfiguration {
|
|||||||
),
|
),
|
||||||
.init(class: "SearchBar"),
|
.init(class: "SearchBar"),
|
||||||
.init(class: "Picture", excludeProperties: ["file", "paintable"]),
|
.init(class: "Picture", excludeProperties: ["file", "paintable"]),
|
||||||
|
.init(class: "Image", excludeProperties: ["file", "paintable", "gicon", "icon-size"]),
|
||||||
.init(
|
.init(
|
||||||
class: "AspectFrame",
|
class: "AspectFrame",
|
||||||
initializer: "gtk_aspect_frame_new(0.5, 0.5, ratio, 0)",
|
initializer: "gtk_aspect_frame_new(0.5, 0.5, ratio, 0)",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user