1
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
- // Autogenerated from Pigeon (v22.7.0 ), do not edit directly.
4
+ // Autogenerated from Pigeon (v22.4.2 ), do not edit directly.
5
5
// See also: https://pub.dev/packages/pigeon
6
6
7
7
#import < Foundation/Foundation.h>
@@ -28,23 +28,6 @@ typedef NS_ENUM(NSUInteger, FCPPlatformCameraLensDirection) {
28
28
- (instancetype )initWithValue : (FCPPlatformCameraLensDirection)value ;
29
29
@end
30
30
31
- typedef NS_ENUM (NSUInteger , FCPPlatformCameraLensType) {
32
- // / A built-in wide-angle camera device type.
33
- FCPPlatformCameraLensTypeWide = 0 ,
34
- // / A built-in camera device type with a longer focal length than a wide-angle camera.
35
- FCPPlatformCameraLensTypeTelephoto = 1 ,
36
- // / A built-in camera device type with a shorter focal length than a wide-angle camera.
37
- FCPPlatformCameraLensTypeUltraWide = 2 ,
38
- // / Unknown camera device type.
39
- FCPPlatformCameraLensTypeUnknown = 3 ,
40
- };
41
-
42
- // / Wrapper for FCPPlatformCameraLensType to allow for nullability.
43
- @interface FCPPlatformCameraLensTypeBox : NSObject
44
- @property (nonatomic , assign ) FCPPlatformCameraLensType value;
45
- - (instancetype )initWithValue : (FCPPlatformCameraLensType)value ;
46
- @end
47
-
48
31
typedef NS_ENUM (NSUInteger , FCPPlatformDeviceOrientation) {
49
32
FCPPlatformDeviceOrientationPortraitUp = 0 ,
50
33
FCPPlatformDeviceOrientationLandscapeLeft = 1 ,
@@ -141,79 +124,79 @@ typedef NS_ENUM(NSUInteger, FCPPlatformResolutionPreset) {
141
124
// / `init` unavailable to enforce nonnull fields, see the `make` class method.
142
125
- (instancetype )init NS_UNAVAILABLE;
143
126
+ (instancetype )makeWithName : (NSString *)name
144
- lensDirection : (FCPPlatformCameraLensDirection)lensDirection
145
- lensType : (FCPPlatformCameraLensType)lensType ;
127
+ lensDirection : (FCPPlatformCameraLensDirection)lensDirection ;
146
128
// / The name of the camera device.
147
- @property (nonatomic , copy ) NSString * name;
129
+ @property (nonatomic , copy ) NSString *name;
148
130
// / The direction the camera is facing.
149
131
@property (nonatomic , assign ) FCPPlatformCameraLensDirection lensDirection;
150
- // / The type of the camera lens.
151
- @property (nonatomic , assign ) FCPPlatformCameraLensType lensType;
152
132
@end
153
133
154
134
@interface FCPPlatformCameraState : NSObject
155
135
// / `init` unavailable to enforce nonnull fields, see the `make` class method.
156
136
- (instancetype )init NS_UNAVAILABLE;
157
137
+ (instancetype )makeWithPreviewSize : (FCPPlatformSize *)previewSize
158
- exposureMode : (FCPPlatformExposureMode)exposureMode
159
- focusMode : (FCPPlatformFocusMode)focusMode
160
- exposurePointSupported : (BOOL )exposurePointSupported
161
- focusPointSupported : (BOOL )focusPointSupported ;
138
+ exposureMode : (FCPPlatformExposureMode)exposureMode
139
+ focusMode : (FCPPlatformFocusMode)focusMode
140
+ exposurePointSupported : (BOOL )exposurePointSupported
141
+ focusPointSupported : (BOOL )focusPointSupported ;
162
142
// / The size of the preview, in pixels.
163
- @property (nonatomic , strong ) FCPPlatformSize * previewSize;
143
+ @property (nonatomic , strong ) FCPPlatformSize *previewSize;
164
144
// / The default exposure mode
165
145
@property (nonatomic , assign ) FCPPlatformExposureMode exposureMode;
166
146
// / The default focus mode
167
147
@property (nonatomic , assign ) FCPPlatformFocusMode focusMode;
168
148
// / Whether setting exposure points is supported.
169
- @property (nonatomic , assign ) BOOL exposurePointSupported;
149
+ @property (nonatomic , assign ) BOOL exposurePointSupported;
170
150
// / Whether setting focus points is supported.
171
- @property (nonatomic , assign ) BOOL focusPointSupported;
151
+ @property (nonatomic , assign ) BOOL focusPointSupported;
172
152
@end
173
153
174
154
@interface FCPPlatformMediaSettings : NSObject
175
155
// / `init` unavailable to enforce nonnull fields, see the `make` class method.
176
156
- (instancetype )init NS_UNAVAILABLE;
177
157
+ (instancetype )makeWithResolutionPreset : (FCPPlatformResolutionPreset)resolutionPreset
178
- framesPerSecond : (nullable NSNumber *)framesPerSecond
179
- videoBitrate : (nullable NSNumber *)videoBitrate
180
- audioBitrate : (nullable NSNumber *)audioBitrate
181
- enableAudio : (BOOL )enableAudio ;
158
+ framesPerSecond : (nullable NSNumber *)framesPerSecond
159
+ videoBitrate : (nullable NSNumber *)videoBitrate
160
+ audioBitrate : (nullable NSNumber *)audioBitrate
161
+ enableAudio : (BOOL )enableAudio ;
182
162
@property (nonatomic , assign ) FCPPlatformResolutionPreset resolutionPreset;
183
- @property (nonatomic , strong , nullable ) NSNumber * framesPerSecond;
184
- @property (nonatomic , strong , nullable ) NSNumber * videoBitrate;
185
- @property (nonatomic , strong , nullable ) NSNumber * audioBitrate;
186
- @property (nonatomic , assign ) BOOL enableAudio;
163
+ @property (nonatomic , strong , nullable ) NSNumber *framesPerSecond;
164
+ @property (nonatomic , strong , nullable ) NSNumber *videoBitrate;
165
+ @property (nonatomic , strong , nullable ) NSNumber *audioBitrate;
166
+ @property (nonatomic , assign ) BOOL enableAudio;
187
167
@end
188
168
189
169
@interface FCPPlatformPoint : NSObject
190
170
// / `init` unavailable to enforce nonnull fields, see the `make` class method.
191
171
- (instancetype )init NS_UNAVAILABLE;
192
- + (instancetype )makeWithX : (double )x
193
- y : (double )y ;
194
- @property (nonatomic , assign ) double x;
195
- @property (nonatomic , assign ) double y;
172
+ + (instancetype )makeWithX : (double )x y : (double )y ;
173
+ @property (nonatomic , assign ) double x;
174
+ @property (nonatomic , assign ) double y;
196
175
@end
197
176
198
177
@interface FCPPlatformSize : NSObject
199
178
// / `init` unavailable to enforce nonnull fields, see the `make` class method.
200
179
- (instancetype )init NS_UNAVAILABLE;
201
- + (instancetype )makeWithWidth : (double )width
202
- height : (double )height ;
203
- @property (nonatomic , assign ) double width;
204
- @property (nonatomic , assign ) double height;
180
+ + (instancetype )makeWithWidth : (double )width height : (double )height ;
181
+ @property (nonatomic , assign ) double width;
182
+ @property (nonatomic , assign ) double height;
205
183
@end
206
184
207
185
// / The codec used by all APIs.
208
186
NSObject <FlutterMessageCodec> *FCPGetMessagesCodec (void );
209
187
210
188
@protocol FCPCameraApi
211
189
// / Returns the list of available cameras.
212
- - (void )availableCamerasWithCompletion : (void (^)(NSArray <FCPPlatformCameraDescription *> *_Nullable, FlutterError *_Nullable))completion ;
190
+ - (void )availableCamerasWithCompletion : (void (^)(NSArray <FCPPlatformCameraDescription *> *_Nullable,
191
+ FlutterError *_Nullable))completion ;
213
192
// / Create a new camera with the given settings, and returns its ID.
214
- - (void )createCameraWithName : (NSString *)cameraName settings : (FCPPlatformMediaSettings *)settings completion : (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion ;
193
+ - (void )createCameraWithName : (NSString *)cameraName
194
+ settings : (FCPPlatformMediaSettings *)settings
195
+ completion : (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion ;
215
196
// / Initializes the camera with the given ID.
216
- - (void )initializeCamera : (NSInteger )cameraId withImageFormat : (FCPPlatformImageFormatGroup)imageFormat completion : (void (^)(FlutterError *_Nullable))completion ;
197
+ - (void )initializeCamera : (NSInteger )cameraId
198
+ withImageFormat : (FCPPlatformImageFormatGroup)imageFormat
199
+ completion : (void (^)(FlutterError *_Nullable))completion ;
217
200
// / Begins streaming frames from the camera.
218
201
- (void )startImageStreamWithCompletion : (void (^)(FlutterError *_Nullable))completion ;
219
202
// / Stops streaming frames from the camera.
@@ -227,44 +210,53 @@ NSObject<FlutterMessageCodec> *FCPGetMessagesCodec(void);
227
210
// / and any associated resources can be cleaned up.
228
211
- (void )disposeCamera : (NSInteger )cameraId completion : (void (^)(FlutterError *_Nullable))completion ;
229
212
// / Locks the camera capture to the current device orientation.
230
- - (void )lockCaptureOrientation : (FCPPlatformDeviceOrientation)orientation completion : (void (^)(FlutterError *_Nullable))completion ;
213
+ - (void )lockCaptureOrientation : (FCPPlatformDeviceOrientation)orientation
214
+ completion : (void (^)(FlutterError *_Nullable))completion ;
231
215
// / Unlocks camera capture orientation, allowing it to automatically adapt to
232
216
// / device orientation.
233
217
- (void )unlockCaptureOrientationWithCompletion : (void (^)(FlutterError *_Nullable))completion ;
234
218
// / Takes a picture with the current settings, and returns the path to the
235
219
// / resulting file.
236
- - (void )takePictureWithCompletion : (void (^)(NSString *_Nullable, FlutterError *_Nullable))completion ;
220
+ - (void )takePictureWithCompletion : (void (^)(NSString *_Nullable,
221
+ FlutterError *_Nullable))completion ;
237
222
// / Does any preprocessing necessary before beginning to record video.
238
223
- (void )prepareForVideoRecordingWithCompletion : (void (^)(FlutterError *_Nullable))completion ;
239
224
// / Begins recording video, optionally enabling streaming to Dart at the same
240
225
// / time.
241
- - (void )startVideoRecordingWithStreaming : (BOOL )enableStream completion : (void (^)(FlutterError *_Nullable))completion ;
226
+ - (void )startVideoRecordingWithStreaming : (BOOL )enableStream
227
+ completion : (void (^)(FlutterError *_Nullable))completion ;
242
228
// / Stops recording video, and results the path to the resulting file.
243
- - (void )stopVideoRecordingWithCompletion : (void (^)(NSString *_Nullable, FlutterError *_Nullable))completion ;
229
+ - (void )stopVideoRecordingWithCompletion : (void (^)(NSString *_Nullable,
230
+ FlutterError *_Nullable))completion ;
244
231
// / Pauses video recording.
245
232
- (void )pauseVideoRecordingWithCompletion : (void (^)(FlutterError *_Nullable))completion ;
246
233
// / Resumes a previously paused video recording.
247
234
- (void )resumeVideoRecordingWithCompletion : (void (^)(FlutterError *_Nullable))completion ;
248
235
// / Switches the camera to the given flash mode.
249
- - (void )setFlashMode : (FCPPlatformFlashMode)mode completion : (void (^)(FlutterError *_Nullable))completion ;
236
+ - (void )setFlashMode : (FCPPlatformFlashMode)mode
237
+ completion : (void (^)(FlutterError *_Nullable))completion ;
250
238
// / Switches the camera to the given exposure mode.
251
- - (void )setExposureMode : (FCPPlatformExposureMode)mode completion : (void (^)(FlutterError *_Nullable))completion ;
239
+ - (void )setExposureMode : (FCPPlatformExposureMode)mode
240
+ completion : (void (^)(FlutterError *_Nullable))completion ;
252
241
// / Anchors auto-exposure to the given point in (0,1) coordinate space.
253
242
// /
254
243
// / A null value resets to the default exposure point.
255
- - (void )setExposurePoint : (nullable FCPPlatformPoint *)point completion : (void (^)(FlutterError *_Nullable))completion ;
244
+ - (void )setExposurePoint : (nullable FCPPlatformPoint *)point
245
+ completion : (void (^)(FlutterError *_Nullable))completion ;
256
246
// / Returns the minimum exposure offset supported by the camera.
257
247
- (void )getMinimumExposureOffset : (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion ;
258
248
// / Returns the maximum exposure offset supported by the camera.
259
249
- (void )getMaximumExposureOffset : (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion ;
260
250
// / Sets the exposure offset manually to the given value.
261
251
- (void )setExposureOffset : (double )offset completion : (void (^)(FlutterError *_Nullable))completion ;
262
252
// / Switches the camera to the given focus mode.
263
- - (void )setFocusMode : (FCPPlatformFocusMode)mode completion : (void (^)(FlutterError *_Nullable))completion ;
253
+ - (void )setFocusMode : (FCPPlatformFocusMode)mode
254
+ completion : (void (^)(FlutterError *_Nullable))completion ;
264
255
// / Anchors auto-focus to the given point in (0,1) coordinate space.
265
256
// /
266
257
// / A null value resets to the default focus point.
267
- - (void )setFocusPoint : (nullable FCPPlatformPoint *)point completion : (void (^)(FlutterError *_Nullable))completion ;
258
+ - (void )setFocusPoint : (nullable FCPPlatformPoint *)point
259
+ completion : (void (^)(FlutterError *_Nullable))completion ;
268
260
// / Returns the minimum zoom level supported by the camera.
269
261
- (void )getMinimumZoomLevel : (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion ;
270
262
// / Returns the maximum zoom level supported by the camera.
@@ -278,33 +270,40 @@ NSObject<FlutterMessageCodec> *FCPGetMessagesCodec(void);
278
270
// / Changes the camera used while recording video.
279
271
// /
280
272
// / This should only be called while video recording is active.
281
- - (void )updateDescriptionWhileRecordingCameraName : (NSString *)cameraName completion : (void (^)(FlutterError *_Nullable))completion ;
273
+ - (void )updateDescriptionWhileRecordingCameraName : (NSString *)cameraName
274
+ completion : (void (^)(FlutterError *_Nullable))completion ;
282
275
// / Sets the file format used for taking pictures.
283
- - (void )setImageFileFormat : (FCPPlatformImageFileFormat)format completion : (void (^)(FlutterError *_Nullable))completion ;
276
+ - (void )setImageFileFormat : (FCPPlatformImageFileFormat)format
277
+ completion : (void (^)(FlutterError *_Nullable))completion ;
284
278
@end
285
279
286
- extern void SetUpFCPCameraApi (id <FlutterBinaryMessenger> binaryMessenger, NSObject <FCPCameraApi> *_Nullable api);
287
-
288
- extern void SetUpFCPCameraApiWithSuffix (id <FlutterBinaryMessenger> binaryMessenger, NSObject <FCPCameraApi> *_Nullable api, NSString *messageChannelSuffix);
280
+ extern void SetUpFCPCameraApi (id <FlutterBinaryMessenger> binaryMessenger,
281
+ NSObject <FCPCameraApi> *_Nullable api);
289
282
283
+ extern void SetUpFCPCameraApiWithSuffix (id <FlutterBinaryMessenger> binaryMessenger,
284
+ NSObject <FCPCameraApi> *_Nullable api,
285
+ NSString *messageChannelSuffix);
290
286
291
287
// / Handler for native callbacks that are not tied to a specific camera ID.
292
288
@interface FCPCameraGlobalEventApi : NSObject
293
289
- (instancetype )initWithBinaryMessenger : (id <FlutterBinaryMessenger>)binaryMessenger ;
294
- - (instancetype )initWithBinaryMessenger : (id <FlutterBinaryMessenger>)binaryMessenger messageChannelSuffix : (nullable NSString *)messageChannelSuffix ;
290
+ - (instancetype )initWithBinaryMessenger : (id <FlutterBinaryMessenger>)binaryMessenger
291
+ messageChannelSuffix : (nullable NSString *)messageChannelSuffix ;
295
292
// / Called when the device's physical orientation changes.
296
- - (void )deviceOrientationChangedOrientation : (FCPPlatformDeviceOrientation)orientation completion : (void (^)(FlutterError *_Nullable))completion ;
293
+ - (void )deviceOrientationChangedOrientation : (FCPPlatformDeviceOrientation)orientation
294
+ completion : (void (^)(FlutterError *_Nullable))completion ;
297
295
@end
298
296
299
-
300
297
// / Handler for native callbacks that are tied to a specific camera ID.
301
298
// /
302
299
// / This is intended to be initialized with the camera ID as a suffix.
303
300
@interface FCPCameraEventApi : NSObject
304
301
- (instancetype )initWithBinaryMessenger : (id <FlutterBinaryMessenger>)binaryMessenger ;
305
- - (instancetype )initWithBinaryMessenger : (id <FlutterBinaryMessenger>)binaryMessenger messageChannelSuffix : (nullable NSString *)messageChannelSuffix ;
302
+ - (instancetype )initWithBinaryMessenger : (id <FlutterBinaryMessenger>)binaryMessenger
303
+ messageChannelSuffix : (nullable NSString *)messageChannelSuffix ;
306
304
// / Called when the camera is inialitized for use.
307
- - (void )initializedWithState : (FCPPlatformCameraState *)initialState completion : (void (^)(FlutterError *_Nullable))completion ;
305
+ - (void )initializedWithState : (FCPPlatformCameraState *)initialState
306
+ completion : (void (^)(FlutterError *_Nullable))completion ;
308
307
// / Called when an error occurs in the camera.
309
308
// /
310
309
// / This should be used for errors that occur outside of the context of
0 commit comments