forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontext.gen.go
465 lines (405 loc) · 28.7 KB
/
context.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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
// Code generated by DarwinKit. DO NOT EDIT.
package coreimage
import (
"unsafe"
"github.com/progrium/macdriver/macos/coregraphics"
"github.com/progrium/macdriver/macos/corevideo"
"github.com/progrium/macdriver/macos/foundation"
"github.com/progrium/macdriver/macos/imageio"
"github.com/progrium/macdriver/macos/iosurface"
"github.com/progrium/macdriver/macos/metal"
"github.com/progrium/macdriver/objc"
)
// The class instance for the [Context] class.
var ContextClass = _ContextClass{objc.GetClass("CIContext")}
type _ContextClass struct {
objc.Class
}
// An interface definition for the [Context] class.
type IContext interface {
objc.IObject
RenderToIOSurfaceBoundsColorSpace(image IImage, surface iosurface.Ref, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef)
ReclaimResources()
DepthBlurEffectFilterForImageDisparityImagePortraitEffectsMatteOrientationOptions(image IImage, disparityImage IImage, portraitEffectsMatte IImage, orientation imageio.ImagePropertyOrientation, options foundation.Dictionary) Filter
RenderToMTLTextureCommandBufferBoundsColorSpace(image IImage, texture metal.PTexture, commandBuffer metal.PCommandBuffer, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef)
RenderToMTLTextureObjectCommandBufferObjectBoundsColorSpace(image IImage, textureObject objc.IObject, commandBufferObject objc.IObject, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef)
DepthBlurEffectFilterForImageURLOptions(url foundation.IURL, options foundation.Dictionary) Filter
WriteTIFFRepresentationOfImageToURLFormatColorSpaceOptionsError(image IImage, url foundation.IURL, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool
DepthBlurEffectFilterForImageDisparityImagePortraitEffectsMatteHairSemanticSegmentationGlassesMatteGainMapOrientationOptions(image IImage, disparityImage IImage, portraitEffectsMatte IImage, hairSemanticSegmentation IImage, glassesMatte IImage, gainMap IImage, orientation imageio.ImagePropertyOrientation, options foundation.Dictionary) Filter
WritePNGRepresentationOfImageToURLFormatColorSpaceOptionsError(image IImage, url foundation.IURL, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool
WriteJPEGRepresentationOfImageToURLColorSpaceOptionsError(image IImage, url foundation.IURL, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool
StartTaskToRenderFromRectToDestinationAtPointError(image IImage, fromRect coregraphics.Rect, destination IRenderDestination, atPoint coregraphics.Point, error foundation.IError) RenderTask
CreateCGImageFromRectFormatColorSpace(image IImage, fromRect coregraphics.Rect, format Format, colorSpace coregraphics.ColorSpaceRef) coregraphics.ImageRef
DepthBlurEffectFilterForImageDataOptions(data []byte, options foundation.Dictionary) Filter
StartTaskToClearError(destination IRenderDestination, error foundation.IError) RenderTask
HEIFRepresentationOfImageFormatColorSpaceOptions(image IImage, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte
DepthBlurEffectFilterForImageDisparityImagePortraitEffectsMatteHairSemanticSegmentationOrientationOptions(image IImage, disparityImage IImage, portraitEffectsMatte IImage, hairSemanticSegmentation IImage, orientation imageio.ImagePropertyOrientation, options foundation.Dictionary) Filter
JPEGRepresentationOfImageColorSpaceOptions(image IImage, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte
TIFFRepresentationOfImageFormatColorSpaceOptions(image IImage, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte
CreateCGImageFromRect(image IImage, fromRect coregraphics.Rect) coregraphics.ImageRef
CreateCGImageFromRectFormatColorSpaceDeferred(image IImage, fromRect coregraphics.Rect, format Format, colorSpace coregraphics.ColorSpaceRef, deferred bool) coregraphics.ImageRef
RenderToCVPixelBuffer(image IImage, buffer corevideo.PixelBufferRef)
PrepareRenderFromRectToDestinationAtPointError(image IImage, fromRect coregraphics.Rect, destination IRenderDestination, atPoint coregraphics.Point, error foundation.IError) bool
WriteHEIFRepresentationOfImageToURLFormatColorSpaceOptionsError(image IImage, url foundation.IURL, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool
PNGRepresentationOfImageFormatColorSpaceOptions(image IImage, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte
RenderToCVPixelBufferBoundsColorSpace(image IImage, buffer corevideo.PixelBufferRef, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef)
StartTaskToRenderToDestinationError(image IImage, destination IRenderDestination, error foundation.IError) RenderTask
ClearCaches()
WriteHEIF10RepresentationOfImageToURLColorSpaceOptionsError(image IImage, url foundation.IURL, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool
HEIF10RepresentationOfImageColorSpaceOptionsError(image IImage, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) []byte
DrawImageInRectFromRect(image IImage, inRect coregraphics.Rect, fromRect coregraphics.Rect)
WorkingFormat() Format
WorkingColorSpace() coregraphics.ColorSpaceRef
}
// An evaluation context for rendering image processing results and performing image analysis. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext?language=objc
type Context struct {
objc.Object
}
func ContextFrom(ptr unsafe.Pointer) Context {
return Context{
Object: objc.ObjectFrom(ptr),
}
}
func (c_ Context) Init() Context {
rv := objc.Call[Context](c_, objc.Sel("init"))
return rv
}
func (c_ Context) InitWithOptions(options map[ContextOption]objc.IObject) Context {
rv := objc.Call[Context](c_, objc.Sel("initWithOptions:"), options)
return rv
}
// Initializes a context without a specific rendering destination, using the specified options. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1438261-initwithoptions?language=objc
func NewContextWithOptions(options map[ContextOption]objc.IObject) Context {
instance := ContextClass.Alloc().InitWithOptions(options)
instance.Autorelease()
return instance
}
func (cc _ContextClass) Alloc() Context {
rv := objc.Call[Context](cc, objc.Sel("alloc"))
return rv
}
func (cc _ContextClass) New() Context {
rv := objc.Call[Context](cc, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewContext() Context {
return ContextClass.New()
}
// Renders a region of an image into an IOSurface object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437778-render?language=objc
func (c_ Context) RenderToIOSurfaceBoundsColorSpace(image IImage, surface iosurface.Ref, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef) {
objc.Call[objc.Void](c_, objc.Sel("render:toIOSurface:bounds:colorSpace:"), objc.Ptr(image), surface, bounds, colorSpace)
}
// Runs the garbage collector to reclaim any resources that the context no longer requires. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437967-reclaimresources?language=objc
func (c_ Context) ReclaimResources() {
objc.Call[objc.Void](c_, objc.Sel("reclaimResources"))
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3019315-depthblureffectfilterforimage?language=objc
func (c_ Context) DepthBlurEffectFilterForImageDisparityImagePortraitEffectsMatteOrientationOptions(image IImage, disparityImage IImage, portraitEffectsMatte IImage, orientation imageio.ImagePropertyOrientation, options foundation.Dictionary) Filter {
rv := objc.Call[Filter](c_, objc.Sel("depthBlurEffectFilterForImage:disparityImage:portraitEffectsMatte:orientation:options:"), objc.Ptr(image), objc.Ptr(disparityImage), objc.Ptr(portraitEffectsMatte), orientation, options)
return rv
}
// Creates a Core Image context from a Quartz context, using the specified options. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437864-contextwithcgcontext?language=objc
func (cc _ContextClass) ContextWithCGContextOptions(cgctx coregraphics.ContextRef, options map[ContextOption]objc.IObject) Context {
rv := objc.Call[Context](cc, objc.Sel("contextWithCGContext:options:"), cgctx, options)
return rv
}
// Creates a Core Image context from a Quartz context, using the specified options. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437864-contextwithcgcontext?language=objc
func Context_ContextWithCGContextOptions(cgctx coregraphics.ContextRef, options map[ContextOption]objc.IObject) Context {
return ContextClass.ContextWithCGContextOptions(cgctx, options)
}
// Renders a region of an image to a Metal texture. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1438026-render?language=objc
func (c_ Context) RenderToMTLTextureCommandBufferBoundsColorSpace(image IImage, texture metal.PTexture, commandBuffer metal.PCommandBuffer, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef) {
po1 := objc.WrapAsProtocol("MTLTexture", texture)
po2 := objc.WrapAsProtocol("MTLCommandBuffer", commandBuffer)
objc.Call[objc.Void](c_, objc.Sel("render:toMTLTexture:commandBuffer:bounds:colorSpace:"), objc.Ptr(image), po1, po2, bounds, colorSpace)
}
// Renders a region of an image to a Metal texture. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1438026-render?language=objc
func (c_ Context) RenderToMTLTextureObjectCommandBufferObjectBoundsColorSpace(image IImage, textureObject objc.IObject, commandBufferObject objc.IObject, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef) {
objc.Call[objc.Void](c_, objc.Sel("render:toMTLTexture:commandBuffer:bounds:colorSpace:"), objc.Ptr(image), objc.Ptr(textureObject), objc.Ptr(commandBufferObject), bounds, colorSpace)
}
// Creates a Core Image context using the specified Metal device and options. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437711-contextwithmtldevice?language=objc
func (cc _ContextClass) ContextWithMTLDeviceOptions(device metal.PDevice, options map[ContextOption]objc.IObject) Context {
po0 := objc.WrapAsProtocol("MTLDevice", device)
rv := objc.Call[Context](cc, objc.Sel("contextWithMTLDevice:options:"), po0, options)
return rv
}
// Creates a Core Image context using the specified Metal device and options. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437711-contextwithmtldevice?language=objc
func Context_ContextWithMTLDeviceOptions(device metal.PDevice, options map[ContextOption]objc.IObject) Context {
return ContextClass.ContextWithMTLDeviceOptions(device, options)
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3019316-depthblureffectfilterforimageurl?language=objc
func (c_ Context) DepthBlurEffectFilterForImageURLOptions(url foundation.IURL, options foundation.Dictionary) Filter {
rv := objc.Call[Filter](c_, objc.Sel("depthBlurEffectFilterForImageURL:options:"), objc.Ptr(url), options)
return rv
}
// Renders the image and exports the resulting image data as a file in TIFF format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642213-writetiffrepresentationofimage?language=objc
func (c_ Context) WriteTIFFRepresentationOfImageToURLFormatColorSpaceOptionsError(image IImage, url foundation.IURL, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool {
rv := objc.Call[bool](c_, objc.Sel("writeTIFFRepresentationOfImage:toURL:format:colorSpace:options:error:"), objc.Ptr(image), objc.Ptr(url), format, colorSpace, options, objc.Ptr(errorPtr))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3600105-depthblureffectfilterforimage?language=objc
func (c_ Context) DepthBlurEffectFilterForImageDisparityImagePortraitEffectsMatteHairSemanticSegmentationGlassesMatteGainMapOrientationOptions(image IImage, disparityImage IImage, portraitEffectsMatte IImage, hairSemanticSegmentation IImage, glassesMatte IImage, gainMap IImage, orientation imageio.ImagePropertyOrientation, options foundation.Dictionary) Filter {
rv := objc.Call[Filter](c_, objc.Sel("depthBlurEffectFilterForImage:disparityImage:portraitEffectsMatte:hairSemanticSegmentation:glassesMatte:gainMap:orientation:options:"), objc.Ptr(image), objc.Ptr(disparityImage), objc.Ptr(portraitEffectsMatte), objc.Ptr(hairSemanticSegmentation), objc.Ptr(glassesMatte), objc.Ptr(gainMap), orientation, options)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3365984-contextwithmtlcommandqueue?language=objc
func (cc _ContextClass) ContextWithMTLCommandQueue(commandQueue metal.PCommandQueue) Context {
po0 := objc.WrapAsProtocol("MTLCommandQueue", commandQueue)
rv := objc.Call[Context](cc, objc.Sel("contextWithMTLCommandQueue:"), po0)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3365984-contextwithmtlcommandqueue?language=objc
func Context_ContextWithMTLCommandQueue(commandQueue metal.PCommandQueue) Context {
return ContextClass.ContextWithMTLCommandQueue(commandQueue)
}
// Renders the image and exports the resulting image data as a file in PNG format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2866197-writepngrepresentationofimage?language=objc
func (c_ Context) WritePNGRepresentationOfImageToURLFormatColorSpaceOptionsError(image IImage, url foundation.IURL, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool {
rv := objc.Call[bool](c_, objc.Sel("writePNGRepresentationOfImage:toURL:format:colorSpace:options:error:"), objc.Ptr(image), objc.Ptr(url), format, colorSpace, options, objc.Ptr(errorPtr))
return rv
}
// Renders the image and exports the resulting image data as a file in JPEG format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642218-writejpegrepresentationofimage?language=objc
func (c_ Context) WriteJPEGRepresentationOfImageToURLColorSpaceOptionsError(image IImage, url foundation.IURL, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool {
rv := objc.Call[bool](c_, objc.Sel("writeJPEGRepresentationOfImage:toURL:colorSpace:options:error:"), objc.Ptr(image), objc.Ptr(url), colorSpace, options, objc.Ptr(errorPtr))
return rv
}
// Creates a Core Image context using the specified Metal device. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437609-contextwithmtldevice?language=objc
func (cc _ContextClass) ContextWithMTLDevice(device metal.PDevice) Context {
po0 := objc.WrapAsProtocol("MTLDevice", device)
rv := objc.Call[Context](cc, objc.Sel("contextWithMTLDevice:"), po0)
return rv
}
// Creates a Core Image context using the specified Metal device. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437609-contextwithmtldevice?language=objc
func Context_ContextWithMTLDevice(device metal.PDevice) Context {
return ContextClass.ContextWithMTLDevice(device)
}
// Renders a portion of an image to a point in the destination. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2875448-starttasktorender?language=objc
func (c_ Context) StartTaskToRenderFromRectToDestinationAtPointError(image IImage, fromRect coregraphics.Rect, destination IRenderDestination, atPoint coregraphics.Point, error foundation.IError) RenderTask {
rv := objc.Call[RenderTask](c_, objc.Sel("startTaskToRender:fromRect:toDestination:atPoint:error:"), objc.Ptr(image), fromRect, objc.Ptr(destination), atPoint, objc.Ptr(error))
return rv
}
// Creates a Quartz 2D image from a region of a Core Image image object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437978-createcgimage?language=objc
func (c_ Context) CreateCGImageFromRectFormatColorSpace(image IImage, fromRect coregraphics.Rect, format Format, colorSpace coregraphics.ColorSpaceRef) coregraphics.ImageRef {
rv := objc.Call[coregraphics.ImageRef](c_, objc.Sel("createCGImage:fromRect:format:colorSpace:"), objc.Ptr(image), fromRect, format, colorSpace)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3020629-depthblureffectfilterforimagedat?language=objc
func (c_ Context) DepthBlurEffectFilterForImageDataOptions(data []byte, options foundation.Dictionary) Filter {
rv := objc.Call[Filter](c_, objc.Sel("depthBlurEffectFilterForImageData:options:"), data, options)
return rv
}
// Fills the entire destination with black or clear depending on its [coreimage/cirenderdestination/alphamode]. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2875450-starttasktoclear?language=objc
func (c_ Context) StartTaskToClearError(destination IRenderDestination, error foundation.IError) RenderTask {
rv := objc.Call[RenderTask](c_, objc.Sel("startTaskToClear:error:"), objc.Ptr(destination), objc.Ptr(error))
return rv
}
// Renders the image and exports the resulting image data in HEIF format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2902269-heifrepresentationofimage?language=objc
func (c_ Context) HEIFRepresentationOfImageFormatColorSpaceOptions(image IImage, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte {
rv := objc.Call[[]byte](c_, objc.Sel("HEIFRepresentationOfImage:format:colorSpace:options:"), objc.Ptr(image), format, colorSpace, options)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3228045-depthblureffectfilterforimage?language=objc
func (c_ Context) DepthBlurEffectFilterForImageDisparityImagePortraitEffectsMatteHairSemanticSegmentationOrientationOptions(image IImage, disparityImage IImage, portraitEffectsMatte IImage, hairSemanticSegmentation IImage, orientation imageio.ImagePropertyOrientation, options foundation.Dictionary) Filter {
rv := objc.Call[Filter](c_, objc.Sel("depthBlurEffectFilterForImage:disparityImage:portraitEffectsMatte:hairSemanticSegmentation:orientation:options:"), objc.Ptr(image), objc.Ptr(disparityImage), objc.Ptr(portraitEffectsMatte), objc.Ptr(hairSemanticSegmentation), orientation, options)
return rv
}
// Renders the image and exports the resulting image data in JPEG format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642214-jpegrepresentationofimage?language=objc
func (c_ Context) JPEGRepresentationOfImageColorSpaceOptions(image IImage, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte {
rv := objc.Call[[]byte](c_, objc.Sel("JPEGRepresentationOfImage:colorSpace:options:"), objc.Ptr(image), colorSpace, options)
return rv
}
// Renders the image and exports the resulting image data in TIFF format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642220-tiffrepresentationofimage?language=objc
func (c_ Context) TIFFRepresentationOfImageFormatColorSpaceOptions(image IImage, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte {
rv := objc.Call[[]byte](c_, objc.Sel("TIFFRepresentationOfImage:format:colorSpace:options:"), objc.Ptr(image), format, colorSpace, options)
return rv
}
// Creates a Quartz 2D image from a region of a Core Image image object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437784-createcgimage?language=objc
func (c_ Context) CreateCGImageFromRect(image IImage, fromRect coregraphics.Rect) coregraphics.ImageRef {
rv := objc.Call[coregraphics.ImageRef](c_, objc.Sel("createCGImage:fromRect:"), objc.Ptr(image), fromRect)
return rv
}
// Creates a Quartz 2D image from a region of a Core Image image object with deferred rendering. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642211-createcgimage?language=objc
func (c_ Context) CreateCGImageFromRectFormatColorSpaceDeferred(image IImage, fromRect coregraphics.Rect, format Format, colorSpace coregraphics.ColorSpaceRef, deferred bool) coregraphics.ImageRef {
rv := objc.Call[coregraphics.ImageRef](c_, objc.Sel("createCGImage:fromRect:format:colorSpace:deferred:"), objc.Ptr(image), fromRect, format, colorSpace, deferred)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3365985-contextwithmtlcommandqueue?language=objc
func (cc _ContextClass) ContextWithMTLCommandQueueOptions(commandQueue metal.PCommandQueue, options map[ContextOption]objc.IObject) Context {
po0 := objc.WrapAsProtocol("MTLCommandQueue", commandQueue)
rv := objc.Call[Context](cc, objc.Sel("contextWithMTLCommandQueue:options:"), po0, options)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3365985-contextwithmtlcommandqueue?language=objc
func Context_ContextWithMTLCommandQueueOptions(commandQueue metal.PCommandQueue, options map[ContextOption]objc.IObject) Context {
return ContextClass.ContextWithMTLCommandQueueOptions(commandQueue, options)
}
// Renders an image into a pixel buffer. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437853-render?language=objc
func (c_ Context) RenderToCVPixelBuffer(image IImage, buffer corevideo.PixelBufferRef) {
objc.Call[objc.Void](c_, objc.Sel("render:toCVPixelBuffer:"), objc.Ptr(image), buffer)
}
// An optional call to warm up a CIContext so that subsequent calls to render with the same arguments run more efficiently. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2875428-preparerender?language=objc
func (c_ Context) PrepareRenderFromRectToDestinationAtPointError(image IImage, fromRect coregraphics.Rect, destination IRenderDestination, atPoint coregraphics.Point, error foundation.IError) bool {
rv := objc.Call[bool](c_, objc.Sel("prepareRender:fromRect:toDestination:atPoint:error:"), objc.Ptr(image), fromRect, objc.Ptr(destination), atPoint, objc.Ptr(error))
return rv
}
// Renders the image and exports the resulting image data as a file in HEIF format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2902266-writeheifrepresentationofimage?language=objc
func (c_ Context) WriteHEIFRepresentationOfImageToURLFormatColorSpaceOptionsError(image IImage, url foundation.IURL, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool {
rv := objc.Call[bool](c_, objc.Sel("writeHEIFRepresentationOfImage:toURL:format:colorSpace:options:error:"), objc.Ptr(image), objc.Ptr(url), format, colorSpace, options, objc.Ptr(errorPtr))
return rv
}
// Renders the image and exports the resulting image data in PNG format. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2866196-pngrepresentationofimage?language=objc
func (c_ Context) PNGRepresentationOfImageFormatColorSpaceOptions(image IImage, format Format, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject) []byte {
rv := objc.Call[[]byte](c_, objc.Sel("PNGRepresentationOfImage:format:colorSpace:options:"), objc.Ptr(image), format, colorSpace, options)
return rv
}
// Returns the number of GPUs not currently driving a display. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437817-offlinegpucount?language=objc
func (cc _ContextClass) OfflineGPUCount() int {
rv := objc.Call[int](cc, objc.Sel("offlineGPUCount"))
return rv
}
// Returns the number of GPUs not currently driving a display. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437817-offlinegpucount?language=objc
func Context_OfflineGPUCount() int {
return ContextClass.OfflineGPUCount()
}
// Renders a region of an image into a pixel buffer. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437835-render?language=objc
func (c_ Context) RenderToCVPixelBufferBoundsColorSpace(image IImage, buffer corevideo.PixelBufferRef, bounds coregraphics.Rect, colorSpace coregraphics.ColorSpaceRef) {
objc.Call[objc.Void](c_, objc.Sel("render:toCVPixelBuffer:bounds:colorSpace:"), objc.Ptr(image), buffer, bounds, colorSpace)
}
// Renders an image to a destination so that point (0, 0) of the image maps to point (0, 0) of the destination. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/2875429-starttasktorender?language=objc
func (c_ Context) StartTaskToRenderToDestinationError(image IImage, destination IRenderDestination, error foundation.IError) RenderTask {
rv := objc.Call[RenderTask](c_, objc.Sel("startTaskToRender:toDestination:error:"), objc.Ptr(image), objc.Ptr(destination), objc.Ptr(error))
return rv
}
// Frees any cached data, such as temporary images, associated with the context and runs the garbage collector. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437790-clearcaches?language=objc
func (c_ Context) ClearCaches() {
objc.Call[objc.Void](c_, objc.Sel("clearCaches"))
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3762900-writeheif10representationofimage?language=objc
func (c_ Context) WriteHEIF10RepresentationOfImageToURLColorSpaceOptionsError(image IImage, url foundation.IURL, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) bool {
rv := objc.Call[bool](c_, objc.Sel("writeHEIF10RepresentationOfImage:toURL:colorSpace:options:error:"), objc.Ptr(image), objc.Ptr(url), colorSpace, options, objc.Ptr(errorPtr))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/3762899-heif10representationofimage?language=objc
func (c_ Context) HEIF10RepresentationOfImageColorSpaceOptionsError(image IImage, colorSpace coregraphics.ColorSpaceRef, options map[ImageRepresentationOption]objc.IObject, errorPtr foundation.IError) []byte {
rv := objc.Call[[]byte](c_, objc.Sel("HEIF10RepresentationOfImage:colorSpace:options:error:"), objc.Ptr(image), colorSpace, options, objc.Ptr(errorPtr))
return rv
}
// Creates a context without a specific rendering destination, using default options. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642219-context?language=objc
func (cc _ContextClass) Context() Context {
rv := objc.Call[Context](cc, objc.Sel("context"))
return rv
}
// Creates a context without a specific rendering destination, using default options. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642219-context?language=objc
func Context_Context() Context {
return ContextClass.Context()
}
// Renders a region of an image to a rectangle in the context destination. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1437786-drawimage?language=objc
func (c_ Context) DrawImageInRectFromRect(image IImage, inRect coregraphics.Rect, fromRect coregraphics.Rect) {
objc.Call[objc.Void](c_, objc.Sel("drawImage:inRect:fromRect:"), objc.Ptr(image), inRect, fromRect)
}
// The working pixel format of the Core Image context. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1642215-workingformat?language=objc
func (c_ Context) WorkingFormat() Format {
rv := objc.Call[Format](c_, objc.Sel("workingFormat"))
return rv
}
// The working color space of the Core Image context. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/coreimage/cicontext/1438061-workingcolorspace?language=objc
func (c_ Context) WorkingColorSpace() coregraphics.ColorSpaceRef {
rv := objc.Call[coregraphics.ColorSpaceRef](c_, objc.Sel("workingColorSpace"))
return rv
}