-
-
Notifications
You must be signed in to change notification settings - Fork 160
/
corefoundation_structs.go
633 lines (552 loc) · 21.6 KB
/
corefoundation_structs.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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
package corefoundation
// A structure that contains program-defined data and callbacks with which you can configure a CFRunLoopTimer’s behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunlooptimercontext?language=objc
type RunLoopTimerContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// Defines the buffer and related fields used for in-line buffer access of characters in CFString objects. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfstringinlinebuffer?language=objc
type StringInlineBuffer struct {
Buffer [64]uint16
TheString uintptr
DirectUniCharBuffer *uint16
DirectCStringBuffer *int8
RangeToBuffer Range
BufferedRangeStart int64
BufferedRangeEnd int64
}
// A reference to a CFNull object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfnullref?language=objc
type NullRef uintptr
// A reference to a CFBoolean object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbooleanref?language=objc
type BooleanRef uintptr
// Structure used to represent a point in time using the Gregorian calendar. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfgregoriandate?language=objc
type GregorianDate struct {
Year int32
Month int8
Day int8
Hour int8
Minute int8
Second float64
}
// Contains information about an element attribute definition. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlattributedeclarationinfo?language=objc
type XMLAttributeDeclarationInfo struct {
AttributeName uintptr
TypeString uintptr
DefaultString uintptr
}
// Contains version information and function pointers to callbacks needed when parsing XML. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlparsercallbacks?language=objc
type XMLParserCallBacks struct {
Version int64
CreateXMLStructure uintptr
AddChild uintptr
EndXMLStructure uintptr
ResolveExternalEntity uintptr
HandleError uintptr
}
// Contains the system and public IDs for an external entity reference. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlexternalid?language=objc
type XMLExternalID struct {
SystemID uintptr
PublicID uintptr
}
// A reference to a CFStringTokenizer object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfstringtokenizerref?language=objc
type StringTokenizerRef uintptr
// Defines a structure for the context of a CFFileDescriptor. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cffiledescriptorcontext?language=objc
type FileDescriptorContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// A reference to a CFCalendar object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfcalendarref?language=objc
type CalendarRef uintptr
// Structure used to represent a time interval in Gregorian units. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfgregorianunits?language=objc
type GregorianUnits struct {
Years int32
Months int32
Days int32
Hours int32
Minutes int32
Seconds float64
}
// A reference to a CFAttributedString object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfattributedstringref?language=objc
type AttributedStringRef uintptr
// A reference to a CFURL object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfurlref?language=objc
type URLRef uintptr
// A reference to an CFFileDescriptor object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cffiledescriptorref?language=objc
type FileDescriptorRef uintptr
// A reference to an immutable character set object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfcharactersetref?language=objc
type CharacterSetRef uintptr
// Encapsulates a file system object’s security information in a Core Foundation object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cffilesecurityref?language=objc
type FileSecurityRef uintptr
// Contains the source URL and text encoding information for the XML document. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmldocumentinfo?language=objc
type XMLDocumentInfo struct {
SourceURL uintptr
Encoding uint32
Pad_cgo_0 [4]byte
}
// A reference to a CFTree object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cftreeref?language=objc
type TreeRef uintptr
// A structure that contains program-defined data and callbacks with which you can configure a CFRunLoopObserver object’s behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunloopobservercontext?language=objc
type RunLoopObserverContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// A structure that fully specifies the communication protocol and connection address of a CFSocket object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfsocketsignature?language=objc
type SocketSignature struct {
ProtocolFamily int32
SocketType int32
Protocol int32
Address uintptr
}
// Structure holding a 64-bit float value in a platform-independentbyte order. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfswappedfloat64?language=objc
type SwappedFloat64 struct {
V uint64
}
// Contains the text of the processing instruction. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlprocessinginstructioninfo?language=objc
type XMLProcessingInstructionInfo struct {
DataString uintptr
}
// A reference to an immutable set object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfsetref?language=objc
type SetRef uintptr
// Contains a description of the element type. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlelementtypedeclarationinfo?language=objc
type XMLElementTypeDeclarationInfo struct {
ContentDescription uintptr
}
// Structure containing program-defined data and callbacks for a CFTree object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cftreecontext?language=objc
type TreeContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// Contains information describing an XML entity. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlentityinfo?language=objc
type XMLEntityInfo struct {
EntityType uint64
ReplacementText uintptr
EntityID XMLExternalID
NotationName uintptr
}
// Not used. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbinaryheapcomparecontext?language=objc
type BinaryHeapCompareContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// Structure containing the callbacks of a CFArray. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfarraycallbacks?language=objc
type ArrayCallBacks struct {
Version int64
Retain uintptr
Release uintptr
CopyDescription uintptr
Equal uintptr
}
// A structure that defines the context or operating environment for an allocator (CFAllocator) object. Every Core Foundation allocator object must have a context defined for it. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfallocatorcontext?language=objc
type AllocatorContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
Allocate uintptr
Reallocate uintptr
Deallocate uintptr
PreferredSize uintptr
}
// A reference to a user notification object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfusernotificationref?language=objc
type UserNotificationRef uintptr
// A reference to an immutable CFDate object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfdateref?language=objc
type DateRef uintptr
// A reference to a CFString object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfstringref?language=objc
type StringRef uintptr
// A reference to a run loop object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunloopref?language=objc
type RunLoopRef uintptr
// The structure returned by [corefoundation/cfreadstreamgeterror] and [corefoundation/cfwritestreamgeterror]. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfstreamerror?language=objc
type StreamError struct {
Domain int64
Error int32
Pad_cgo_0 [4]byte
}
// Structure holding a 32-bit float value in a platform-independentbyte order. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfswappedfloat32?language=objc
type SwappedFloat32 struct {
V uint32
}
// This structure contains the callbacks used to retain, release, describe, and compare the values of a CFSet object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfsetcallbacks?language=objc
type SetCallBacks struct {
Version int64
Retain uintptr
Release uintptr
CopyDescription uintptr
Equal uintptr
Hash uintptr
}
// A reference to a writable stream object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfwritestreamref?language=objc
type WriteStreamRef uintptr
// Contains the external ID of the notation. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlnotationinfo?language=objc
type XMLNotationInfo struct {
ExternalID XMLExternalID
}
// A reference to a CFAllocator object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfallocatorref?language=objc
type AllocatorRef uintptr
// Not recommended. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfplugininstanceref?language=objc
type PlugInInstanceRef uintptr
// Contains the external ID of the DTD. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmldocumenttypeinfo?language=objc
type XMLDocumentTypeInfo struct {
ExternalID XMLExternalID
}
// This structure contains the callbacks used to retain, release, describe, and compare the values of a CFBag object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbagcallbacks?language=objc
type BagCallBacks struct {
Version int64
Retain uintptr
Release uintptr
CopyDescription uintptr
Equal uintptr
Hash uintptr
}
// A reference to a run loop timer object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunlooptimerref?language=objc
type RunLoopTimerRef uintptr
// A reference to a CFLocale object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cflocaleref?language=objc
type LocaleRef uintptr
// A reference to an immutable bag object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbagref?language=objc
type BagRef uintptr
// A reference to a CFSocket object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfsocketref?language=objc
type SocketRef uintptr
// A reference to an immutable dictionary object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfdictionaryref?language=objc
type DictionaryRef uintptr
// A 128-bit struct that represents a UUID as raw bytes. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfuuidbytes?language=objc
type UUIDBytes struct {
Byte0 uint8
Byte1 uint8
Byte2 uint8
Byte3 uint8
Byte4 uint8
Byte5 uint8
Byte6 uint8
Byte7 uint8
Byte8 uint8
Byte9 uint8
Byte10 uint8
Byte11 uint8
Byte12 uint8
Byte13 uint8
Byte14 uint8
Byte15 uint8
}
// This structure contains the callbacks used to retain, release, describe, and compare the values in a dictionary. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfdictionaryvaluecallbacks?language=objc
type DictionaryValueCallBacks struct {
Version int64
Retain uintptr
Release uintptr
CopyDescription uintptr
Equal uintptr
}
// A reference to a CFDateFormatter object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfdateformatterref?language=objc
type DateFormatterRef uintptr
// Contains version information and function pointers to callbacks used when handling a program-defined context. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlparsercontext?language=objc
type XMLParserContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// This structure contains the callbacks used to retain, release, describe, and compare the keys in a dictionary. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfdictionarykeycallbacks?language=objc
type DictionaryKeyCallBacks struct {
Version int64
Retain uintptr
Release uintptr
CopyDescription uintptr
Equal uintptr
Hash uintptr
}
// A structure that contains program-defined data and callbacks with which you can configure a CFMachPort object’s behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfmachportcontext?language=objc
type MachPortContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// A structure that contains program-defined data and callbacks with which you can configure a version 0 CFRunLoopSource’s behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunloopsourcecontext?language=objc
type RunLoopSourceContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
Equal uintptr
Hash uintptr
Schedule uintptr
Cancel uintptr
Perform uintptr
}
// Contains information describing an XML entity reference. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlentityreferenceinfo?language=objc
type XMLEntityReferenceInfo struct {
EntityType uint64
}
// A reference to a CFNumberFormatter object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfnumberformatterref?language=objc
type NumberFormatterRef uintptr
// A reference to a CFNumber object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfnumberref?language=objc
type NumberRef uintptr
// A reference to an immutable CFData object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfdataref?language=objc
type DataRef uintptr
// A reference to a message port object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfmessageportref?language=objc
type MessagePortRef uintptr
// A reference to a CFURLEnumerator object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfurlenumeratorref?language=objc
type URLEnumeratorRef uintptr
// The type of a reference to a CFNotificationCenter. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfnotificationcenterref?language=objc
type NotificationCenterRef uintptr
// Contains a list of the attributes associated with an element. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlattributelistdeclarationinfo?language=objc
type XMLAttributeListDeclarationInfo struct {
NumberOfAttributes int64
Attributes *XMLAttributeDeclarationInfo
}
// Structure containing the callbacks for values for a CFBinaryHeap object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbinaryheapcallbacks?language=objc
type BinaryHeapCallBacks struct {
Version int64
Retain uintptr
Release uintptr
CopyDescription uintptr
Compare uintptr
}
// A reference to a binary heap object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbinaryheapref?language=objc
type BinaryHeapRef uintptr
// A structure that contains program-defined data and callbacks with which you can configure a version 1 CFRunLoopSource’s behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunloopsourcecontext1?language=objc
type RunLoopSourceContext1 struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
Equal uintptr
Hash uintptr
GetPort uintptr
Perform uintptr
}
// A reference to a CFMachPort object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfmachportref?language=objc
type MachPortRef uintptr
// A reference to a CFError object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cferrorref?language=objc
type ErrorRef uintptr
// A reference to a CFUUID object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfuuidref?language=objc
type UUIDRef uintptr
// A reference to a readable stream object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfreadstreamref?language=objc
type ReadStreamRef uintptr
// A structure that contains program-defined data and callbacks with which you can configure a CFSocket object’s behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfsocketcontext?language=objc
type SocketContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// A reference to an immutable bit vector object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbitvectorref?language=objc
type BitVectorRef uintptr
// A structure that contains program-defined data and callbacks with which you can configure a stream’s client behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfstreamclientcontext?language=objc
type StreamClientContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// A structure that contains program-defined data and callbacks with which you can configure a CFMessagePort object’s behavior. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfmessageportcontext?language=objc
type MessagePortContext struct {
Version int64
Info uintptr
Retain uintptr
Release uintptr
CopyDescription uintptr
}
// Contains a list of element attributes packaged as CFDictionary key/value pairs. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfxmlelementinfo?language=objc
type XMLElementInfo struct {
Attributes uintptr
AttributeOrder uintptr
IsEmpty uint8
X_reserved [3]int8
Pad_cgo_0 [4]byte
}
// A reference to a run loop source object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunloopsourceref?language=objc
type RunLoopSourceRef uintptr
// A reference to a run loop observer object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrunloopobserverref?language=objc
type RunLoopObserverRef uintptr
// A reference to a CFBundle object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfbundleref?language=objc
type BundleRef uintptr
// A reference to an immutable array object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfarrayref?language=objc
type ArrayRef uintptr
// A structure representing a range of sequential items in a container, such as characters in a buffer or elements in a collection. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cfrange?language=objc
type Range struct {
Location int64
Length int64
}
// A reference to a CFTimeZone object. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/corefoundation/cftimezoneref?language=objc
type TimeZoneRef uintptr