@@ -47,7 +47,7 @@ public protocol AppBackend: Sendable {
4747 associatedtype Menu
4848 associatedtype Alert
4949 associatedtype Path
50- associatedtype Sheet : SheetImplementation
50+ associatedtype Sheet
5151
5252 /// Creates an instance of the backend.
5353 init ( )
@@ -604,12 +604,12 @@ public protocol AppBackend: Sendable {
604604 /// ``showAlert(_:window:responseHandler:)``.
605605 func dismissAlert( _ alert: Alert , window: Window ? )
606606
607- /// Creates a sheet object (without showing it yet). Sheets contain View Content .
608- /// They optionally execute provied code on dismiss and
607+ /// Creates a sheet object (without showing it yet). Sheets contain view content .
608+ /// They optionally execute provided code on dismiss and
609609 /// prevent users from interacting with the parent window until dimissed.
610610 func createSheet( ) -> Sheet
611611
612- /// Updates the content and appearance of a sheet
612+ /// Updates the content and appearance of a sheet.
613613 func updateSheet(
614614 _ sheet: Sheet ,
615615 content: Widget ,
@@ -633,6 +633,9 @@ public protocol AppBackend: Sendable {
633633 /// Gets used by the SCUI sheet implementation to close a sheet.
634634 func dismissSheet( _ sheet: Sheet , window: Window ? )
635635
636+ /// Get the dimensions of a sheet
637+ func sizeOf( _ sheet: Sheet ) -> SIMD2 < Int >
638+
636639 /// Sets the corner radius for a sheet presentation.
637640 ///
638641 /// This method is called when the sheet content has a `presentationCornerRadius` modifier
@@ -806,10 +809,6 @@ extension AppBackend {
806809 }
807810}
808811
809- public protocol SheetImplementation {
810- var sheetSize : SIMD2 < Int > { get }
811- }
812-
813812extension AppBackend {
814813 /// Used by placeholder implementations of backend methods.
815814 private func todo( _ function: String = #function) -> Never {
@@ -1273,6 +1272,12 @@ extension AppBackend {
12731272 todo ( )
12741273 }
12751274
1275+ public func sizeOf(
1276+ sheet: Sheet
1277+ ) -> SIMD2 < Int > {
1278+ todo ( )
1279+ }
1280+
12761281 public func showSheet(
12771282 _ sheet: Sheet ,
12781283 window: Window ?
0 commit comments