forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage_request_handler.gen.go
237 lines (200 loc) · 12.1 KB
/
image_request_handler.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
// Code generated by DarwinKit. DO NOT EDIT.
package vision
import (
"unsafe"
"github.com/progrium/macdriver/macos/coregraphics"
"github.com/progrium/macdriver/macos/coreimage"
"github.com/progrium/macdriver/macos/coremedia"
"github.com/progrium/macdriver/macos/corevideo"
"github.com/progrium/macdriver/macos/foundation"
"github.com/progrium/macdriver/macos/imageio"
"github.com/progrium/macdriver/objc"
)
// The class instance for the [ImageRequestHandler] class.
var ImageRequestHandlerClass = _ImageRequestHandlerClass{objc.GetClass("VNImageRequestHandler")}
type _ImageRequestHandlerClass struct {
objc.Class
}
// An interface definition for the [ImageRequestHandler] class.
type IImageRequestHandler interface {
objc.IObject
PerformRequestsError(requests []IRequest, error foundation.IError) bool
}
// An object that processes one or more image analysis requests pertaining to a single image. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler?language=objc
type ImageRequestHandler struct {
objc.Object
}
func ImageRequestHandlerFrom(ptr unsafe.Pointer) ImageRequestHandler {
return ImageRequestHandler{
Object: objc.ObjectFrom(ptr),
}
}
func (i_ ImageRequestHandler) InitWithCGImageOptions(image coregraphics.ImageRef, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCGImage:options:"), image, options)
return rv
}
// Creates a handler to be used for performing requests on Core Graphics images. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2866541-initwithcgimage?language=objc
func NewImageRequestHandlerWithCGImageOptions(image coregraphics.ImageRef, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCGImageOptions(image, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithDataOrientationOptions(imageData []byte, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithData:orientation:options:"), imageData, orientation, options)
return rv
}
// Creates a handler to be used for performing requests on an image of known orientation, contained in an NSData object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2869635-initwithdata?language=objc
func NewImageRequestHandlerWithDataOrientationOptions(imageData []byte, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithDataOrientationOptions(imageData, orientation, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithDataOptions(imageData []byte, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithData:options:"), imageData, options)
return rv
}
// Creates a handler to be used for performing requests on an image contained in an NSData object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2866551-initwithdata?language=objc
func NewImageRequestHandlerWithDataOptions(imageData []byte, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithDataOptions(imageData, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithURLOrientationOptions(imageURL foundation.IURL, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithURL:orientation:options:"), objc.Ptr(imageURL), orientation, options)
return rv
}
// Creates a handler to be used for performing requests on an image with known orientation, at the specified URL. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2869645-initwithurl?language=objc
func NewImageRequestHandlerWithURLOrientationOptions(imageURL foundation.IURL, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithURLOrientationOptions(imageURL, orientation, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithCIImageOptions(image coreimage.IImage, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCIImage:options:"), objc.Ptr(image), options)
return rv
}
// Creates a handler to be used for performing requests on CIImage data. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2866549-initwithciimage?language=objc
func NewImageRequestHandlerWithCIImageOptions(image coreimage.IImage, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCIImageOptions(image, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.SampleBufferRef, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCMSampleBuffer:orientation:options:"), sampleBuffer, orientation, options)
return rv
}
// Creates a request handler that performs requests on an image of a specified orientation contained within a sample buffer. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/3548374-initwithcmsamplebuffer?language=objc
func NewImageRequestHandlerWithCMSampleBufferOrientationOptions(sampleBuffer coremedia.SampleBufferRef, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCMSampleBufferOrientationOptions(sampleBuffer, orientation, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.PixelBufferRef, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCVPixelBuffer:orientation:options:"), pixelBuffer, orientation, options)
return rv
}
// Creates a handler for performing requests on a Core Video pixel buffer of a known orientation. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2880303-initwithcvpixelbuffer?language=objc
func NewImageRequestHandlerWithCVPixelBufferOrientationOptions(pixelBuffer corevideo.PixelBufferRef, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCVPixelBufferOrientationOptions(pixelBuffer, orientation, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithURLOptions(imageURL foundation.IURL, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithURL:options:"), objc.Ptr(imageURL), options)
return rv
}
// Creates a handler to be used for performing requests on an image at the specified URL. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2866553-initwithurl?language=objc
func NewImageRequestHandlerWithURLOptions(imageURL foundation.IURL, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithURLOptions(imageURL, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithCMSampleBufferOptions(sampleBuffer coremedia.SampleBufferRef, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCMSampleBuffer:options:"), sampleBuffer, options)
return rv
}
// Creates a request handler that performs requests on an image contained within a sample buffer. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/3548373-initwithcmsamplebuffer?language=objc
func NewImageRequestHandlerWithCMSampleBufferOptions(sampleBuffer coremedia.SampleBufferRef, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCMSampleBufferOptions(sampleBuffer, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithCIImageOrientationOptions(image coreimage.IImage, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCIImage:orientation:options:"), objc.Ptr(image), orientation, options)
return rv
}
// Creates a handler to be used for performing requests on CIImage data of a known orientation. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2869641-initwithciimage?language=objc
func NewImageRequestHandlerWithCIImageOrientationOptions(image coreimage.IImage, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCIImageOrientationOptions(image, orientation, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithCGImageOrientationOptions(image coregraphics.ImageRef, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCGImage:orientation:options:"), image, orientation, options)
return rv
}
// Creates a handler to be used for performing requests on a Core Graphics image with known orientation. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2869629-initwithcgimage?language=objc
func NewImageRequestHandlerWithCGImageOrientationOptions(image coregraphics.ImageRef, orientation imageio.ImagePropertyOrientation, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCGImageOrientationOptions(image, orientation, options)
instance.Autorelease()
return instance
}
func (i_ ImageRequestHandler) InitWithCVPixelBufferOptions(pixelBuffer corevideo.PixelBufferRef, options map[ImageOption]objc.IObject) ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("initWithCVPixelBuffer:options:"), pixelBuffer, options)
return rv
}
// Creates a handler for performing requests on a Core Video pixel buffer. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2880309-initwithcvpixelbuffer?language=objc
func NewImageRequestHandlerWithCVPixelBufferOptions(pixelBuffer corevideo.PixelBufferRef, options map[ImageOption]objc.IObject) ImageRequestHandler {
instance := ImageRequestHandlerClass.Alloc().InitWithCVPixelBufferOptions(pixelBuffer, options)
instance.Autorelease()
return instance
}
func (ic _ImageRequestHandlerClass) Alloc() ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](ic, objc.Sel("alloc"))
return rv
}
func (ic _ImageRequestHandlerClass) New() ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](ic, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewImageRequestHandler() ImageRequestHandler {
return ImageRequestHandlerClass.New()
}
func (i_ ImageRequestHandler) Init() ImageRequestHandler {
rv := objc.Call[ImageRequestHandler](i_, objc.Sel("init"))
return rv
}
// Schedules Vision requests to perform. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagerequesthandler/2880297-performrequests?language=objc
func (i_ ImageRequestHandler) PerformRequestsError(requests []IRequest, error foundation.IError) bool {
rv := objc.Call[bool](i_, objc.Sel("performRequests:error:"), requests, objc.Ptr(error))
return rv
}