Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FlutterPlatformViews.h 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Copyright 2013 The Flutter Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef FLUTTER_FLUTTERPLATFORMVIEWS_H_
  5. #define FLUTTER_FLUTTERPLATFORMVIEWS_H_
  6. #import <UIKit/UIKit.h>
  7. #import "FlutterCodecs.h"
  8. #import "FlutterMacros.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * Wraps a `UIView` for embedding in the Flutter hierarchy
  12. */
  13. @protocol FlutterPlatformView <NSObject>
  14. /**
  15. * Returns a reference to the `UIView` that is wrapped by this `FlutterPlatformView`.
  16. */
  17. - (UIView*)view;
  18. @end
  19. FLUTTER_EXPORT
  20. @protocol FlutterPlatformViewFactory <NSObject>
  21. /**
  22. * Create a `FlutterPlatformView`.
  23. *
  24. * Implemented by iOS code that expose a `UIView` for embedding in a Flutter app.
  25. *
  26. * The implementation of this method should create a new `UIView` and return it.
  27. *
  28. * @param frame The rectangle for the newly created `UIView` measued in points.
  29. * @param viewId A unique identifier for this `UIView`.
  30. * @param args Parameters for creating the `UIView` sent from the Dart side of the Flutter app.
  31. * If `createArgsCodec` is not implemented, or if no creation arguments were sent from the Dart
  32. * code, this will be null. Otherwise this will be the value sent from the Dart code as decoded by
  33. * `createArgsCodec`.
  34. */
  35. - (NSObject<FlutterPlatformView>*)createWithFrame:(CGRect)frame
  36. viewIdentifier:(int64_t)viewId
  37. arguments:(id _Nullable)args;
  38. /**
  39. * Returns the `FlutterMessageCodec` for decoding the args parameter of `createWithFrame`.
  40. *
  41. * Only needs to be implemented if `createWithFrame` needs an arguments parameter.
  42. */
  43. @optional
  44. - (NSObject<FlutterMessageCodec>*)createArgsCodec;
  45. @end
  46. NS_ASSUME_NONNULL_END
  47. #endif // FLUTTER_FLUTTERPLATFORMVIEWS_H_