forked from aparoksha/adwaita-swift
Remove Core library
This commit is contained in:
parent
fd29eccd68
commit
04c77831b5
@ -154,5 +154,5 @@ type_contents_order:
|
||||
- other_method
|
||||
|
||||
excluded:
|
||||
- Sources/Core/View/Generated/
|
||||
- Sources/Adwaita/View/Generated/
|
||||
- .build/
|
||||
@ -17,10 +17,6 @@ let package = Package(
|
||||
name: "Adwaita",
|
||||
targets: ["Adwaita"]
|
||||
),
|
||||
.library(
|
||||
name: "Core",
|
||||
targets: ["Core"]
|
||||
),
|
||||
.library(
|
||||
name: "CAdw",
|
||||
targets: ["CAdw"]
|
||||
@ -41,7 +37,7 @@ let package = Package(
|
||||
pkgConfig: "libadwaita-1"
|
||||
),
|
||||
.target(
|
||||
name: "Core",
|
||||
name: "Adwaita",
|
||||
dependencies: [
|
||||
"CAdw",
|
||||
.product(name: "LevenshteinTransformations", package: "levenshtein-transformations"),
|
||||
@ -49,10 +45,6 @@ let package = Package(
|
||||
.product(name: "MetaSQLite", package: "meta-sqlite")
|
||||
]
|
||||
),
|
||||
.target(
|
||||
name: "Adwaita",
|
||||
dependencies: ["Core"]
|
||||
),
|
||||
.executableTarget(
|
||||
name: "Generation",
|
||||
dependencies: [
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// ActionRow+.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by david-swift on 16.10.24.
|
||||
//
|
||||
|
||||
extension ActionRow {
|
||||
|
||||
/// Deemphasize the row title and emphasize the subtitle.
|
||||
/// - Parameter active: Whether the style is currently applied.
|
||||
/// - Returns: A view.
|
||||
public func property(_ active: Bool = true) -> AnyView {
|
||||
style("property", active: active)
|
||||
}
|
||||
|
||||
}
|
||||
@ -5,7 +5,6 @@
|
||||
// Created by david-swift on 16.10.24.
|
||||
//
|
||||
|
||||
@_exported import Core
|
||||
import Foundation
|
||||
|
||||
extension AnyView {
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
//
|
||||
// StatusPage+.swift
|
||||
// Adwaita
|
||||
//
|
||||
// Created by david-swift on 16.10.24.
|
||||
//
|
||||
|
||||
extension StatusPage {
|
||||
|
||||
/// Make the status page more compact.
|
||||
/// - Parameter active: Whether the style is applied.
|
||||
/// - Returns: A view.
|
||||
public func compact(_ active: Bool = true) -> AnyView {
|
||||
style("compact", active: active)
|
||||
}
|
||||
|
||||
}
|
||||
@ -9,7 +9,7 @@ import CAdw
|
||||
import Foundation
|
||||
|
||||
/// The about dialog widget.
|
||||
public struct AboutDialog: AdwaitaWidget {
|
||||
struct AboutDialog: AdwaitaWidget {
|
||||
|
||||
/// Whether the dialog is visible.
|
||||
@Binding var visible: Bool
|
||||
@ -42,7 +42,7 @@ public struct AboutDialog: AdwaitaWidget {
|
||||
/// - icon: The icon.
|
||||
/// - website: The website's URL.
|
||||
/// - issues: The link for opening issues.
|
||||
public init(
|
||||
init(
|
||||
visible: Binding<Bool>,
|
||||
child: AnyView,
|
||||
appName: String? = nil,
|
||||
@ -67,7 +67,7 @@ public struct AboutDialog: AdwaitaWidget {
|
||||
/// - 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 {
|
||||
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let storage = child.storage(data: data, type: type)
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
return storage
|
||||
@ -79,7 +79,7 @@ public struct AboutDialog: AdwaitaWidget {
|
||||
/// - modifiers: Modify views before being updated
|
||||
/// - updateProperties: Whether to update the view's properties.
|
||||
/// - type: The view render data type.
|
||||
public func update<Data>(
|
||||
func update<Data>(
|
||||
_ storage: ViewStorage,
|
||||
data: WidgetData,
|
||||
updateProperties: Bool,
|
||||
@ -43,7 +43,7 @@ public struct AlertDialog: AdwaitaWidget {
|
||||
/// - heading: The heading.
|
||||
/// - body: The body text.
|
||||
/// - extraChild: The body view.
|
||||
public init(
|
||||
init(
|
||||
visible: Binding<Bool>,
|
||||
child: AnyView,
|
||||
id: String,
|
||||
@ -8,7 +8,7 @@
|
||||
import CAdw
|
||||
|
||||
/// The dialog widget.
|
||||
public struct Dialog: AdwaitaWidget {
|
||||
struct Dialog: AdwaitaWidget {
|
||||
|
||||
/// Whether the dialog is visible.
|
||||
@Binding var visible: Bool
|
||||
@ -39,7 +39,7 @@ public struct Dialog: AdwaitaWidget {
|
||||
/// - title: The title.
|
||||
/// - width: The width.
|
||||
/// - height: The height.
|
||||
public init(
|
||||
init(
|
||||
visible: Binding<Bool>,
|
||||
child: AnyView,
|
||||
id: String,
|
||||
@ -62,7 +62,7 @@ public struct Dialog: AdwaitaWidget {
|
||||
/// - 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 {
|
||||
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let child = child.storage(data: data, type: type)
|
||||
let storage = ViewStorage(child.opaquePointer, content: [.mainContent: [child]])
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
@ -75,7 +75,7 @@ public struct Dialog: AdwaitaWidget {
|
||||
/// - modifiers: Modify views before being updated
|
||||
/// - updateProperties: Whether to update the view's properties.
|
||||
/// - type: The view render data type.
|
||||
public func update<Data>(
|
||||
func update<Data>(
|
||||
_ storage: ViewStorage,
|
||||
data: WidgetData,
|
||||
updateProperties: Bool,
|
||||
@ -9,7 +9,7 @@ import CAdw
|
||||
import Foundation
|
||||
|
||||
/// A structure representing a file dialog window.
|
||||
public struct FileDialog: AdwaitaWidget {
|
||||
struct FileDialog: AdwaitaWidget {
|
||||
|
||||
/// The dialog type.
|
||||
var type: DialogType
|
||||
@ -32,7 +32,7 @@ public struct FileDialog: AdwaitaWidget {
|
||||
/// - result: Run when the import or export succeeds.
|
||||
/// - cancel: Run when the import or export is not successful.
|
||||
/// - initialFolder: The initial folder.
|
||||
public init(
|
||||
init(
|
||||
type: DialogType,
|
||||
`open`: Signal,
|
||||
child: AnyView,
|
||||
@ -49,7 +49,7 @@ public struct FileDialog: AdwaitaWidget {
|
||||
}
|
||||
|
||||
/// The different types of dialogs and their properties.
|
||||
public enum DialogType {
|
||||
enum DialogType {
|
||||
|
||||
/// An importer dialog.
|
||||
case importer(folder: Bool, extensions: [String]?)
|
||||
@ -103,7 +103,7 @@ public struct FileDialog: AdwaitaWidget {
|
||||
/// - 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 {
|
||||
func container<Data>(data: WidgetData, type: Data.Type) -> ViewStorage where Data: ViewRenderData {
|
||||
let child = child.storage(data: data, type: type)
|
||||
let storage = ViewStorage(child.opaquePointer, content: [.mainContent: [child]])
|
||||
update(storage, data: data, updateProperties: true, type: type)
|
||||
@ -116,7 +116,7 @@ public struct FileDialog: AdwaitaWidget {
|
||||
/// - modifiers: Modify views before being updated
|
||||
/// - updateProperties: Whether to update the view's properties.
|
||||
/// - type: The view render data type.
|
||||
public func update<Data>(
|
||||
func update<Data>(
|
||||
_ storage: ViewStorage,
|
||||
data: WidgetData,
|
||||
updateProperties: Bool,
|
||||
@ -29,7 +29,7 @@ public struct PreferencesDialog: AdwaitaWidget {
|
||||
/// - visible: Whether the dialog is visible.
|
||||
/// - child: The wrapped view.
|
||||
/// - id: An unique identifier for dialogs on the view.
|
||||
public init(
|
||||
init(
|
||||
visible: Binding<Bool>,
|
||||
child: AnyView,
|
||||
id: String
|
||||
@ -53,7 +53,7 @@ public struct PreferencesDialog: AdwaitaWidget {
|
||||
/// - Parameters:
|
||||
/// - title: The page title.
|
||||
/// - icon: The page's icon.
|
||||
public init(_ title: String, icon: Icon) {
|
||||
init(_ title: String, icon: Icon) {
|
||||
self.title = title
|
||||
self.icon = icon
|
||||
}
|
||||
@ -62,7 +62,7 @@ public struct PreferencesDialog: AdwaitaWidget {
|
||||
/// - Parameter data: The widget data.
|
||||
/// - Returns: The preferences page pointer and the groups view storages.
|
||||
func gtkPreferencesPage(data: WidgetData) -> (OpaquePointer?, [ViewStorage]) {
|
||||
let page = Core.PreferencesPage()
|
||||
let page = Adwaita.PreferencesPage()
|
||||
.title(title)
|
||||
.iconName(icon.string)
|
||||
.storage(data: data.noModifiers, type: AdwaitaMainView.self)
|
||||
@ -120,7 +120,7 @@ public struct PreferencesDialog: AdwaitaWidget {
|
||||
/// Get the GTk preferences group.
|
||||
/// - Parameter data: The widget data.
|
||||
/// - Returns: The preferences group.
|
||||
func group(data: WidgetData) -> Core.PreferencesGroup {
|
||||
func group(data: WidgetData) -> Adwaita.PreferencesGroup {
|
||||
.init()
|
||||
.title(title)
|
||||
.description(description)
|
||||
@ -14,4 +14,11 @@ extension ActionRow {
|
||||
self = self.title(title)
|
||||
}
|
||||
|
||||
/// Deemphasize the row title and emphasize the subtitle.
|
||||
/// - Parameter active: Whether the style is currently applied.
|
||||
/// - Returns: A view.
|
||||
public func property(_ active: Bool = true) -> AnyView {
|
||||
style("property", active: active)
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user