forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage_based_request.gen.go
86 lines (70 loc) · 2.79 KB
/
image_based_request.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
// Code generated by DarwinKit. DO NOT EDIT.
package vision
import (
"unsafe"
"github.com/progrium/macdriver/macos/coregraphics"
"github.com/progrium/macdriver/objc"
)
// The class instance for the [ImageBasedRequest] class.
var ImageBasedRequestClass = _ImageBasedRequestClass{objc.GetClass("VNImageBasedRequest")}
type _ImageBasedRequestClass struct {
objc.Class
}
// An interface definition for the [ImageBasedRequest] class.
type IImageBasedRequest interface {
IRequest
RegionOfInterest() coregraphics.Rect
SetRegionOfInterest(value coregraphics.Rect)
}
// The abstract superclass for image analysis requests that focus on a specific part of an image. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagebasedrequest?language=objc
type ImageBasedRequest struct {
Request
}
func ImageBasedRequestFrom(ptr unsafe.Pointer) ImageBasedRequest {
return ImageBasedRequest{
Request: RequestFrom(ptr),
}
}
func (ic _ImageBasedRequestClass) Alloc() ImageBasedRequest {
rv := objc.Call[ImageBasedRequest](ic, objc.Sel("alloc"))
return rv
}
func (ic _ImageBasedRequestClass) New() ImageBasedRequest {
rv := objc.Call[ImageBasedRequest](ic, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewImageBasedRequest() ImageBasedRequest {
return ImageBasedRequestClass.New()
}
func (i_ ImageBasedRequest) Init() ImageBasedRequest {
rv := objc.Call[ImageBasedRequest](i_, objc.Sel("init"))
return rv
}
func (i_ ImageBasedRequest) InitWithCompletionHandler(completionHandler RequestCompletionHandler) ImageBasedRequest {
rv := objc.Call[ImageBasedRequest](i_, objc.Sel("initWithCompletionHandler:"), completionHandler)
return rv
}
// Creates a new Vision request with an optional completion handler. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnrequest/2875416-initwithcompletionhandler?language=objc
func NewImageBasedRequestWithCompletionHandler(completionHandler RequestCompletionHandler) ImageBasedRequest {
instance := ImageBasedRequestClass.Alloc().InitWithCompletionHandler(completionHandler)
instance.Autorelease()
return instance
}
// The region of the image in which Vision will perform the request. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagebasedrequest/2877482-regionofinterest?language=objc
func (i_ ImageBasedRequest) RegionOfInterest() coregraphics.Rect {
rv := objc.Call[coregraphics.Rect](i_, objc.Sel("regionOfInterest"))
return rv
}
// The region of the image in which Vision will perform the request. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnimagebasedrequest/2877482-regionofinterest?language=objc
func (i_ ImageBasedRequest) SetRegionOfInterest(value coregraphics.Rect) {
objc.Call[objc.Void](i_, objc.Sel("setRegionOfInterest:"), value)
}