Skip to content

ServiceExtensions watchOS xcode15.3 b1

Alex Soto edited this page Jan 27, 2024 · 1 revision

#ServiceExtensions.framework

diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEContextMenuConfiguration.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEContextMenuConfiguration.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEContextMenuConfiguration.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEContextMenuConfiguration.h	2024-01-19 04:17:26
@@ -0,0 +1,46 @@
+//
+//  BEContextMenuConfiguration.h
+//  ServiceExtensions
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <ServiceExtensions/SEMacros.h>
+
+#if SERVICEEXTENSIONS_HAS_UIVIEW
+#import <UIKit/UIContextMenuConfiguration.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+/**
+ *  A specialized `UIContextMenuConfiguration` object to defer a context menu presentation when the
+ *  when the context menu gestures are first recognized and a possible menu presentation is not immediately known.
+ */
+SERVICEEXTENSIONS_EXTERN API_AVAILABLE(ios(17.4)) API_UNAVAILABLE(tvos, visionos) API_UNAVAILABLE(watchos) NS_SWIFT_UI_ACTOR
+@interface BEContextMenuConfiguration : UIContextMenuConfiguration
+
+/// Fulfills the configuration with a concrete configuration. Once fulfilled, the context menu presentation will begin.
+/// You should call this method as soon as you have determined that a menu presentation is possible for the configuration, as to
+/// minimize the delay between the context menu gesture's recognition and the menu's presentation. If no menu presentation is possible,
+/// fulfill with a `nil` configuration.
+///
+/// There is a system-defined timeout before the configuration is cancelled, where no menu presents. This method returns `YES` if the
+/// configuration did successfully prepare, and `NO` otherwise.
+///
+/// @NOTE: The fulfilled configuration is used by `UIContextMenuInteractionDelegate` when referencing any `UIContextMenuConfiguration`,
+/// rather than this object.
+- (BOOL)fulfillUsingConfiguration:(nullable UIContextMenuConfiguration *)configuration;
+
+/// Creates a new configuration for the context menu interaction.
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
+
+/// For a concrete configuration, use the parent `UIContextMenuConfiguration` class instead.
++ (instancetype)configurationWithIdentifier:(nullable id<NSCopying>)identifier
+                            previewProvider:(nullable UIContextMenuContentPreviewProvider)previewProvider
+                             actionProvider:(nullable UIContextMenuActionProvider)actionProvider NS_UNAVAILABLE;
+
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+
+#endif // SERVICEEXTENSIONS_HAS_UIVIEW
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEDragInteraction.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEDragInteraction.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEDragInteraction.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEDragInteraction.h	2024-01-19 04:17:26
@@ -0,0 +1,63 @@
+//
+//  BEDragInteraction.h
+//  ServiceExtensions
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <ServiceExtensions/SEMacros.h>
+
+#if SERVICEEXTENSIONS_HAS_UIVIEW
+#import <UIKit/UIDragInteraction.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+@class BEDragInteraction;
+
+API_AVAILABLE(ios(17.4)) API_UNAVAILABLE(visionos) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
+@protocol BEDragInteractionDelegate <UIDragInteractionDelegate>
+
+@optional
+
+/**
+ *  Called when the drag interaction has begun, to allow the delegate to prepare for the drag session before
+ *  the system requests drag items through `-dragInteraction:itemsForBeginningSession:`.
+ *
+ *  You should call the `completion` block as soon as the drag session is prepared, as to minimize the delay
+ *  from the user interaction from the drag gesture. There is a system-defined timeout before the drag session is
+ *  failed if the `completion` is not called in time. The `completion` block returns `YES` if the drag session did
+ *  prepare successfully prepare, and `NO` otherwise, to allow clients to perform any clean-up if necessary.
+ */
+- (void)dragInteraction:(BEDragInteraction *)dragInteraction prepareDragSession:(id<UIDragSession>)session completion:(BOOL(^)(void))completion;
+
+/**
+ *  The asynchronous counterpart to `-dragInteraction:itemsForAddingToSession:withTouchAtPoint:` to allow
+ *  touches on this view to add items to an existing drag session. Please refer to the aforementioned delegate method for its full
+ *  documentation.
+ *
+ *  If this method is implemented, then the `UIDragInteractionDelegate` counterpart method will no longer be called.
+ *
+ *  You should call the `completion` block as soon as the items are ready. There is a system-defined
+ *  timeout before the system will treat the delegate call as returning an empty array. The `completion` block
+ *  returns `YES` if the drag session did add items to the session successfully, and `NO` otherwise, to allow
+ *  clients to perform any clean-up if necessary.
+ */
+- (void)dragInteraction:(BEDragInteraction *)dragInteraction itemsForAddingToSession:(id<UIDragSession>)session forTouchAtPoint:(CGPoint)point completion:(BOOL(^)(NSArray<UIDragItem *> *))completion;
+
+@end
+
+/// A `UIDragInteraction` subclass with features specific to browsers to enable asynchronous preparations and behaviours.
+SERVICEEXTENSIONS_EXTERN API_AVAILABLE(ios(17.4)) API_UNAVAILABLE(visionos) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
+@interface BEDragInteraction: UIDragInteraction
+
+/// The object that manages the drag interaction lifecycle.
+@property (nonatomic, readonly, weak, nullable) id<BEDragInteractionDelegate> delegate;
+
+/// Creates an drag interaction with the specified delegate.
+- (instancetype)initWithDelegate:(id<BEDragInteractionDelegate>)delegate NS_DESIGNATED_INITIALIZER;
+
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+
+#endif // SERVICEEXTENSIONS_HAS_UIVIEW
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEScrollView.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEScrollView.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEScrollView.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/BEScrollView.h	2024-01-19 04:17:26
@@ -0,0 +1,87 @@
+//
+//  BEScrollView.h
+//  ServiceExtensions
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <ServiceExtensions/SEMacros.h>
+
+#if SERVICEEXTENSIONS_HAS_UIVIEW
+
+#import <UIKit/UIKit.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+@class BEScrollView, BEScrollViewScrollUpdate;
+
+
+SERVICEEXTENSIONS_EXPORT API_AVAILABLE(ios(17.4)) NS_SWIFT_UI_ACTOR
+@protocol BEScrollViewDelegate <UIScrollViewDelegate>
+
+@optional
+
+// If implemented, scroll updates will be passed to this delegate method before being handled by
+// the scroll view. The delegate may do some work, then must asynchronously call the completion block on the main queue.
+// This method will be called multiple times, and the delegate must call the completions in order.
+//
+// Extract information from `scrollUpdate` immediately, since its properties may change later,
+// and it's only safe to access on the main queue.
+//
+// Call the completion with `handled` = YES to indicate that you handled the scroll event and
+// don't want BEScrollView to react to the scroll event.
+// Pass `handled` = NO to have the event be handled in the normal way (just delayed).
+- (void)scrollView:(BEScrollView *)scrollView handleScrollUpdate:(BEScrollViewScrollUpdate *)scrollUpdate completion:(void (^)(BOOL handled))completion;
+
+// In order to implement CSS rendering, it may be necessary to make two scroll views siblings in the view tree that are nested in the DOM.
+// This method may be used to specify that a sibling scroll view should be considered the parent of another, for the purpose of gesture interaction and scroll transfer.
+// The parent is expected to be earlier in an in-order traversal of the view tree, since a parent would normally be visually underneath its child.
+// Return nil for the default behavior of traversing up the view tree to find a parent scroll view.
+- (nullable BEScrollView *)parentScrollViewForScrollView:(BEScrollView *)scrollView;
+
+@end
+
+
+// A scroll view with features specific to browsers.
+SERVICEEXTENSIONS_EXPORT API_AVAILABLE(ios(17.4)) NS_SWIFT_UI_ACTOR
+@interface BEScrollView : UIScrollView
+
+@property (nonatomic, weak, nullable) id<BEScrollViewDelegate> delegate;
+
+@end
+
+
+// Phases of a BEScrollViewScrollUpdate.
+typedef NS_ENUM(NSInteger, BEScrollViewScrollUpdatePhase) {
+    BEScrollViewScrollUpdatePhaseBegan,     // Whenever a gesture scroll has physically started.
+    BEScrollViewScrollUpdatePhaseChanged,   // Whenever a gesture scroll has changed.
+    BEScrollViewScrollUpdatePhaseEnded,     // Whenever a gesture scroll physically ends.
+    BEScrollViewScrollUpdatePhaseCancelled, // Whenever a gesture scroll doesn't end but the system stops tracking.
+} NS_SWIFT_NAME(BEScrollViewScrollUpdate.Phase) API_AVAILABLE(ios(17.4));
+
+
+// An update from a scroll view issued during a scroll event (e.g. trackpad or mouse wheel) or deceleration after a scroll event.
+SERVICEEXTENSIONS_EXPORT API_AVAILABLE(ios(17.4)) NS_SWIFT_UI_ACTOR
+@interface BEScrollViewScrollUpdate : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+// The time when the update occurred, in seconds since system startup.
+@property (nonatomic, readonly) NSTimeInterval timestamp;
+
+// The phase of the update.
+@property (nonatomic, readonly) BEScrollViewScrollUpdatePhase phase;
+
+// The location of the pointer where the scroll occurred in the coordinate space of the specified view. Specify nil to indicate the window.
+- (CGPoint)locationInView:(nullable UIView *)view;
+
+// The scroll delta in the coordinate space of the specified view. Specify nil to indicate the window.
+- (CGPoint)translationInView:(nullable UIView *)view;
+
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+
+#endif // SERVICEEXTENSIONS_HAS_UIVIEW
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/SEMacros.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/SEMacros.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/SEMacros.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/SEMacros.h	2024-01-19 04:17:26
@@ -0,0 +1,8 @@
+//
+//  SEMacros.h
+//  ServiceExtensionsCore
+//
+//  Created by Alex Carter on 8/17/23.
+//
+
+#import <ServiceExtensionsCore/SEMacros.h>
diff -ruN /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/ServiceExtensions.h /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/ServiceExtensions.h
--- /Applications/Xcode_15.2.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/ServiceExtensions.h	1969-12-31 19:00:00
+++ /Applications/Xcode_15.3.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/ServiceExtensions.framework/Headers/ServiceExtensions.h	2024-01-19 04:17:25
@@ -0,0 +1,14 @@
+//
+//  ServiceExtensions.h
+//  ServiceExtensions
+//
+//  Created by Alex Carter on 6/29/23.
+//
+
+#import <Foundation/Foundation.h>
+#import <ServiceExtensionsCore/ServiceExtensionsCore.h>
+
+#import <ServiceExtensions/SEMacros.h>
+#import <ServiceExtensions/BEContextMenuConfiguration.h>
+#import <ServiceExtensions/BEDragInteraction.h>
+#import <ServiceExtensions/BEScrollView.h>
Clone this wiki locally