forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathio_surface.gen.go
350 lines (304 loc) · 11.1 KB
/
io_surface.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
// Code generated by DarwinKit. DO NOT EDIT.
package iosurface
import (
"unsafe"
"github.com/progrium/darwinkit/objc"
)
// The class instance for the [IOSurface] class.
var IOSurfaceClass = _IOSurfaceClass{objc.GetClass("IOSurface")}
type _IOSurfaceClass struct {
objc.Class
}
// An interface definition for the [IOSurface] class.
type IIOSurface interface {
objc.IObject
WidthOfPlaneAtIndex(planeIndex uint) int
RemoveAttachmentForKey(key string)
DecrementUseCount()
SetAllAttachments(dict map[string]objc.IObject)
SetPurgeableOldState(newState PurgeabilityState, oldState *PurgeabilityState) int
BaseAddressOfPlaneAtIndex(planeIndex uint) unsafe.Pointer
UnlockWithOptionsSeed(options LockOptions, seed *uint32) int
ElementWidthOfPlaneAtIndex(planeIndex uint) int
AllAttachments() map[string]objc.Object
SetAttachmentForKey(anObject objc.IObject, key string)
RemoveAllAttachments()
BytesPerRowOfPlaneAtIndex(planeIndex uint) int
IncrementUseCount()
ElementHeightOfPlaneAtIndex(planeIndex uint) int
AttachmentForKey(key string) objc.Object
HeightOfPlaneAtIndex(planeIndex uint) int
LockWithOptionsSeed(options LockOptions, seed *uint32) int
BytesPerElementOfPlaneAtIndex(planeIndex uint) int
Width() int
ElementWidth() int
Seed() uint32
ElementHeight() int
PixelFormat() uint
Height() int
LocalUseCount() int32
BytesPerElement() int
AllowsPixelSizeCasting() bool
AllocationSize() int
BaseAddress() unsafe.Pointer
BytesPerRow() int
PlaneCount() uint
IsInUse() bool
}
// Data type representing an IOSurface opaque object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface?language=objc
type IOSurface struct {
objc.Object
}
func IOSurfaceFrom(ptr unsafe.Pointer) IOSurface {
return IOSurface{
Object: objc.ObjectFrom(ptr),
}
}
func (i_ IOSurface) InitWithProperties(properties map[PropertyKey]objc.IObject) IOSurface {
rv := objc.Call[IOSurface](i_, objc.Sel("initWithProperties:"), properties)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092523-initwithproperties?language=objc
func NewIOSurfaceWithProperties(properties map[PropertyKey]objc.IObject) IOSurface {
instance := IOSurfaceClass.Alloc().InitWithProperties(properties)
instance.Autorelease()
return instance
}
func (ic _IOSurfaceClass) Alloc() IOSurface {
rv := objc.Call[IOSurface](ic, objc.Sel("alloc"))
return rv
}
func (ic _IOSurfaceClass) New() IOSurface {
rv := objc.Call[IOSurface](ic, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewIOSurface() IOSurface {
return IOSurfaceClass.New()
}
func (i_ IOSurface) Init() IOSurface {
rv := objc.Call[IOSurface](i_, objc.Sel("init"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092520-widthofplaneatindex?language=objc
func (i_ IOSurface) WidthOfPlaneAtIndex(planeIndex uint) int {
rv := objc.Call[int](i_, objc.Sel("widthOfPlaneAtIndex:"), planeIndex)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092541-removeattachmentforkey?language=objc
func (i_ IOSurface) RemoveAttachmentForKey(key string) {
objc.Call[objc.Void](i_, objc.Sel("removeAttachmentForKey:"), key)
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092538-decrementusecount?language=objc
func (i_ IOSurface) DecrementUseCount() {
objc.Call[objc.Void](i_, objc.Sel("decrementUseCount"))
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092532-setallattachments?language=objc
func (i_ IOSurface) SetAllAttachments(dict map[string]objc.IObject) {
objc.Call[objc.Void](i_, objc.Sel("setAllAttachments:"), dict)
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2870085-setpurgeable?language=objc
func (i_ IOSurface) SetPurgeableOldState(newState PurgeabilityState, oldState *PurgeabilityState) int {
rv := objc.Call[int](i_, objc.Sel("setPurgeable:oldState:"), newState, oldState)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092494-baseaddressofplaneatindex?language=objc
func (i_ IOSurface) BaseAddressOfPlaneAtIndex(planeIndex uint) unsafe.Pointer {
rv := objc.Call[unsafe.Pointer](i_, objc.Sel("baseAddressOfPlaneAtIndex:"), planeIndex)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092530-unlockwithoptions?language=objc
func (i_ IOSurface) UnlockWithOptionsSeed(options LockOptions, seed *uint32) int {
rv := objc.Call[int](i_, objc.Sel("unlockWithOptions:seed:"), options, seed)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092498-elementwidthofplaneatindex?language=objc
func (i_ IOSurface) ElementWidthOfPlaneAtIndex(planeIndex uint) int {
rv := objc.Call[int](i_, objc.Sel("elementWidthOfPlaneAtIndex:"), planeIndex)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092487-allattachments?language=objc
func (i_ IOSurface) AllAttachments() map[string]objc.Object {
rv := objc.Call[map[string]objc.Object](i_, objc.Sel("allAttachments"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092540-setattachment?language=objc
func (i_ IOSurface) SetAttachmentForKey(anObject objc.IObject, key string) {
objc.Call[objc.Void](i_, objc.Sel("setAttachment:forKey:"), anObject, key)
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092490-removeallattachments?language=objc
func (i_ IOSurface) RemoveAllAttachments() {
objc.Call[objc.Void](i_, objc.Sel("removeAllAttachments"))
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092497-bytesperrowofplaneatindex?language=objc
func (i_ IOSurface) BytesPerRowOfPlaneAtIndex(planeIndex uint) int {
rv := objc.Call[int](i_, objc.Sel("bytesPerRowOfPlaneAtIndex:"), planeIndex)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092506-incrementusecount?language=objc
func (i_ IOSurface) IncrementUseCount() {
objc.Call[objc.Void](i_, objc.Sel("incrementUseCount"))
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092515-elementheightofplaneatindex?language=objc
func (i_ IOSurface) ElementHeightOfPlaneAtIndex(planeIndex uint) int {
rv := objc.Call[int](i_, objc.Sel("elementHeightOfPlaneAtIndex:"), planeIndex)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092535-attachmentforkey?language=objc
func (i_ IOSurface) AttachmentForKey(key string) objc.Object {
rv := objc.Call[objc.Object](i_, objc.Sel("attachmentForKey:"), key)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092493-heightofplaneatindex?language=objc
func (i_ IOSurface) HeightOfPlaneAtIndex(planeIndex uint) int {
rv := objc.Call[int](i_, objc.Sel("heightOfPlaneAtIndex:"), planeIndex)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092522-lockwithoptions?language=objc
func (i_ IOSurface) LockWithOptionsSeed(options LockOptions, seed *uint32) int {
rv := objc.Call[int](i_, objc.Sel("lockWithOptions:seed:"), options, seed)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092511-bytesperelementofplaneatindex?language=objc
func (i_ IOSurface) BytesPerElementOfPlaneAtIndex(planeIndex uint) int {
rv := objc.Call[int](i_, objc.Sel("bytesPerElementOfPlaneAtIndex:"), planeIndex)
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092516-width?language=objc
func (i_ IOSurface) Width() int {
rv := objc.Call[int](i_, objc.Sel("width"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092514-elementwidth?language=objc
func (i_ IOSurface) ElementWidth() int {
rv := objc.Call[int](i_, objc.Sel("elementWidth"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092533-seed?language=objc
func (i_ IOSurface) Seed() uint32 {
rv := objc.Call[uint32](i_, objc.Sel("seed"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092539-elementheight?language=objc
func (i_ IOSurface) ElementHeight() int {
rv := objc.Call[int](i_, objc.Sel("elementHeight"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092537-pixelformat?language=objc
func (i_ IOSurface) PixelFormat() uint {
rv := objc.Call[uint](i_, objc.Sel("pixelFormat"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092501-height?language=objc
func (i_ IOSurface) Height() int {
rv := objc.Call[int](i_, objc.Sel("height"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092529-localusecount?language=objc
func (i_ IOSurface) LocalUseCount() int32 {
rv := objc.Call[int32](i_, objc.Sel("localUseCount"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092503-bytesperelement?language=objc
func (i_ IOSurface) BytesPerElement() int {
rv := objc.Call[int](i_, objc.Sel("bytesPerElement"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092536-allowspixelsizecasting?language=objc
func (i_ IOSurface) AllowsPixelSizeCasting() bool {
rv := objc.Call[bool](i_, objc.Sel("allowsPixelSizeCasting"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092534-allocationsize?language=objc
func (i_ IOSurface) AllocationSize() int {
rv := objc.Call[int](i_, objc.Sel("allocationSize"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092525-baseaddress?language=objc
func (i_ IOSurface) BaseAddress() unsafe.Pointer {
rv := objc.Call[unsafe.Pointer](i_, objc.Sel("baseAddress"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092502-bytesperrow?language=objc
func (i_ IOSurface) BytesPerRow() int {
rv := objc.Call[int](i_, objc.Sel("bytesPerRow"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092508-planecount?language=objc
func (i_ IOSurface) PlaneCount() uint {
rv := objc.Call[uint](i_, objc.Sel("planeCount"))
return rv
}
// [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurface/2092504-inuse?language=objc
func (i_ IOSurface) IsInUse() bool {
rv := objc.Call[bool](i_, objc.Sel("isInUse"))
return rv
}