diff --git a/.gitignore b/.gitignore index c24c295b..8704a428 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,3 @@ /macos/_examples/webview/webview /macos/_examples/widgets/widgets /macos/_examples/workspace/workspace - diff --git a/generate/modules/modules.go b/generate/modules/modules.go index 40e29e7f..dd9c0b1c 100644 --- a/generate/modules/modules.go +++ b/generate/modules/modules.go @@ -155,7 +155,7 @@ var All = []Module{ {"IOSurface", "IOSurface", "iosurface", "IOSurface/IOSurface.h", []string{"IOSurface", "kIOSurface"}}, {"Metal", "Metal", "metal", "Metal/Metal.h", []string{"MTL"}}, {"MetalKit", "Metal Kit", "metalkit", "MetalKit/MetalKit.h", []string{"MTK"}}, + {"MediaPlayer", "Media Player", "mediaplayer", "MediaPlayer/MediaPlayer.h", []string{"MP"}}, {"MetalPerformanceShadersGraph", "Metal Performance Shaders Graph", "mpsgraph", "MetalPerformanceShadersGraph/MetalPerformanceShadersGraph.h", []string{"MPSGraph"}}, {"MetalPerformanceShaders", "Metal Performance Shaders", "mps", "MetalPerformanceShaders/MetalPerformanceShaders.h", []string{"MPS"}}, - {"MediaPlayer", "Media Player", "mediaplayer", "MediaPlayer/MediaPlayer.h", []string{"MP"}}, } diff --git a/macos/_wip/audiotoolbox/audiotoolbox_structs.go b/macos/_wip/audiotoolbox/audiotoolbox_structs.go new file mode 100644 index 00000000..3b76680d --- /dev/null +++ b/macos/_wip/audiotoolbox/audiotoolbox_structs.go @@ -0,0 +1,1165 @@ +package audiotoolbox + +import ( + "github.com/progrium/macdriver/macos/coreaudiotypes" + "github.com/progrium/macdriver/macos/corefoundation" + "github.com/progrium/macdriver/macos/coremidi" +) + +// A data structure for describing SMPTE (Society of Motion Picture and Television Engineers) time. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofile_smpte_time?language=objc +type File_SMPTE_Time struct { + MHours int8 + MMinutes uint8 + MSeconds uint8 + MFrames uint8 + MSubFrameSampleOffset uint32 +} + +// Used for registering an input callback function with an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aurendercallbackstruct?language=objc +type RenderCallbackStruct struct { + InputProc uintptr + InputProcRefCon uintptr +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitotherplugindesc?language=objc +type UnitOtherPluginDesc struct { + Format uint32 + // TODO: Plugin _Ctype_struct_AudioClassDescription +} + +// The common header for a render event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aurendereventheader?language=objc +type RenderEventHeader struct { + Next *[296]byte + EventSampleTime int64 + EventType uint8 + Reserved uint8 + Pad_cgo_0 [2]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitpresetmas_settings?language=objc +type UnitPresetMAS_Settings struct { + ManufacturerID uint32 + EffectID uint32 + VariantID uint32 + SettingsVersion uint32 + NumberOfSettings uint32 + Settings [1]UnitPresetMAS_SettingData +} + +// A structure specifying the number of leading and trailing empty frames to be inserted. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiocodecprimeinfo?language=objc +type CodecPrimeInfo struct { + LeadingFrames uint32 + TrailingFrames uint32 +} + +// Describes an audio unit preset. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aupresetevent?language=objc +type PresetEvent struct { + Scope uint32 + Element uint32 + Preset uintptr +} + +// An adjustable audio unit attribute such as volume, pitch, or filter cutoff frequency. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparameter?language=objc +type UnitParameter struct { + // TODO: MAudioUnit *_Ctype_struct_ComponentInstanceRecord + MParameterID uint32 + MScope uint32 + MElement uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auhostidentifier?language=objc +type HostIdentifier struct { + HostName corefoundation.StringRef // *_Ctype_struct___CFString + HostVersion NumVersion + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafpackettableheader?language=objc +type FPacketTableHeader struct { + MNumberPackets int64 + MNumberValidFrames int64 + MPrimingFrames int32 + MRemainderFrames int32 + MPacketDescriptions [1]uint8 +} + +// A list of the audio file regions in a file. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofileregionlist?language=objc +type FileRegionList struct { + TimeType uint32 + MNumberRegions uint32 + MRegions [1]FileRegion +} + +// A specifier for the [audiotoolbox/audio_format_property_identifier/kaudioformatproperty_formatlist] property, including the codec to use. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/extendedaudioformatinfo?language=objc +type ExtendedAudioFormatInfo struct { + MASBD coreaudiotypes.StreamBasicDescription // _Ctype_struct_AudioStreamBasicDescription + MMagicCookie uintptr + MMagicCookieSize uint32 + MClassDescription coreaudiotypes.ClassDescription // _Ctype_struct_AudioClassDescription +} + +// A timestamp for scheduled starting of an I/O audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiooutputunitstartattimeparams?language=objc +type OutputUnitStartAtTimeParams struct { + MTimestamp coreaudiotypes.TimeStamp //_Ctype_struct_AudioTimeStamp + MFlags uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audistanceattenuationdata?language=objc +type DistanceAttenuationData struct { + InNumberOfPairs uint32 + // TODO: Pairs [1]_Ctype_struct___0 +} + +// The time- and transport-related callback functions for an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/hostcallbackinfo?language=objc +type HostCallbackInfo struct { + HostUserData uintptr + BeatAndTempoProc uintptr + MusicalTimeLocationProc uintptr + TransportStateProc uintptr + TransportStateProc2 uintptr +} + +// Describes a note-on event with extended parameters. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/extendednoteonevent?language=objc +type ExtendedNoteOnEvent struct { + InstrumentID uint32 + GroupID uint32 + Duration float32 + ExtendedParams MusicDeviceNoteParams +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiopacketrolldistancetranslation?language=objc +type PacketRollDistanceTranslation struct { + MPacket int64 + MRollDistance int64 +} + +// Describes a MIDI system-exclusive (SysEx) message. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/midirawdata?language=objc +type RawData struct { + Length uint32 + Data [1]uint8 + Pad_cgo_0 [3]byte +} + +// An audio unit source-to-destination connection specification. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitconnection?language=objc +type UnitConnection struct { + // TODO: SourceAudioUnit *_Ctype_struct_ComponentInstanceRecord + SourceOutputNumber uint32 + DestInputNumber uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafstringid?language=objc +type FStringID struct { + MStringID uint32 + Pad_cgo_0 [8]byte +} + +// Describes audio left/right balance and front/back fade values. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiobalancefade?language=objc +type BalanceFade struct { + MLeftRightBalance float32 + MBackFrontFade float32 + MType uint32 + MChannelLayout *coreaudiotypes.ChannelLayout //*_Ctype_struct_AudioChannelLayout +} + +// The callback function and custom data for providing input-to-output sample mapping for an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auinputsamplesinoutputcallbackstruct?language=objc +type InputSamplesInOutputCallbackStruct struct { + InputToOutputCallback uintptr + UserData uintptr +} + +// Identifying information for an audio component. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiocomponentdescription?language=objc +type ComponentDescription struct { + ComponentType uint32 + ComponentSubType uint32 + ComponentManufacturer uint32 + ComponentFlags uint32 + ComponentFlagsMask uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafaudiodescription?language=objc +type FAudioDescription struct { + MSampleRate float64 + MFormatID uint32 + MFormatFlags uint32 + MBytesPerPacket uint32 + MFramesPerPacket uint32 + MChannelsPerFrame uint32 + MBitsPerChannel uint32 +} + +// A data structure used by the [audiotoolbox/audio_file_properties/kaudiofilepropertypackettoframe] and [audiotoolbox/audio_file_properties/kaudiofilepropertyframetopacket] properties. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioframepackettranslation?language=objc +type FramePacketTranslation struct { + MFrame int64 + MPacket int64 + MFrameOffsetInPacket uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafumidchunk?language=objc +type FUMIDChunk struct { + MBytes [64]uint8 +} + +// The callback function and custom data for an audio unit that provides MIDI output. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aumidioutputcallbackstruct?language=objc +type MIDIOutputCallbackStruct struct { + MidiOutputCallback uintptr + UserData uintptr +} + +// A specifier for the constant[audiotoolbox/audio_file_global_info_propertie/kaudiofileglobalinfo_availablestreamdescriptionsforformat]. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofiletypeandformatid?language=objc +type FileTypeAndFormatID struct { + MFileType uint32 + MFormatID uint32 +} + +// The audio input and output channel capabilities for an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auchannelinfo?language=objc +type ChannelInfo struct { + InChannels int16 + OutChannels int16 +} + +// A structure holding magic cookie information needed by some codecs. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiocodecmagiccookieinfo?language=objc +type CodecMagicCookieInfo struct { + MMagicCookieSize uint32 + MMagicCookie uintptr +} + +// Describes a music track tempo in beats-per-minute. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/extendedtempoevent?language=objc +type ExtendedTempoEvent struct { + Bpm float64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafstrings?language=objc +type FStrings struct { + MNumEntries uint32 + MStringsIDs [1]FStringID +} + +// A string representation of a parameter’s value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparameterstringfromvalue?language=objc +type UnitParameterStringFromValue struct { + InParamID uint32 + InValue *float32 + OutString corefoundation.StringRef // *_Ctype_struct___CFString +} + +// A data structure used by the [audiotoolbox/audio_file_properties/kaudiofilepropertybytetopacket] and [audiotoolbox/audio_file_properties/kaudiofilepropertypackettobyte] properties. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiobytepackettranslation?language=objc +type BytePacketTranslation struct { + MByte int64 + MPacket int64 + MByteOffsetInPacket uint32 + MFlags uint32 +} + +// A component instance, or object, is an audio unit or audio codec. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiocomponentinstance?language=objc +// type ComponentInstance *_Ctype_struct_ComponentInstanceRecord + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/caffileheader?language=objc +type FFileHeader struct { + MFileType uint32 + MFileVersion uint16 + MFileFlags uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafinfostrings?language=objc +type FInfoStrings struct { + MNumEntries uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafoverviewsample?language=objc +type FOverviewSample struct { + MMinValue int16 + MMaxValue int16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparameterinfo?language=objc +type UnitParameterInfo struct { + Name [52]int8 + UnitName corefoundation.StringRef // *_Ctype_struct___CFString + ClumpID uint32 + CfNameString corefoundation.StringRef // *_Ctype_struct___CFString + Unit uint32 + MinValue float32 + MaxValue float32 + DefaultValue float32 + Flags uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/caclocktime?language=objc +type ClockTime struct { + Format uint32 + Reserved uint32 + Time [24]byte +} + +// A structure that contains thread context information for a real-time rendering operation. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitrendercontext?language=objc +type UnitRenderContext struct { + // TODO: Workgroup *_Ctype_struct_OS_os_workgroup + Reserved [6]uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioindependentpackettranslation?language=objc +type IndependentPacketTranslation struct { + MPacket int64 + MIndependentlyDecodablePacket int64 +} + +// An event recording the changing of a parameter at a particular host time. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aurecordedparameterevent?language=objc +type RecordedParameterEvent struct { + HostTime uint64 + Address uint64 + Value float32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/caf_smpte_time?language=objc +type F_SMPTE_Time struct { + MHours int8 + MMinutes int8 + MSeconds int8 + MFrames int8 + MSubFrameSampleOffset uint32 +} + +// An audio unit’s audio level at a particular frequency. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitfrequencyresponsebin?language=objc +type UnitFrequencyResponseBin struct { + MFrequency float64 + MMagnitude float64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafregionchunk?language=objc +type FRegionChunk struct { + TimeType uint32 + MNumberRegions uint32 + MRegions [1]FRegion +} + +// A list of markers associated with an audio file, including their SMPTE time type, the number of markers, and the markers themselves. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofilemarkerlist?language=objc +type FileMarkerList struct { + TimeType uint32 + MNumberMarkers uint32 + MMarkers [1]FileMarker +} + +// Audio clipping that has occurred in a mixer unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitmeterclipping?language=objc +type UnitMeterClipping struct { + PeakValueSinceLastCall float32 + SawInfinity uint8 + SawNotANumber uint8 + Pad_cgo_0 [2]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafmarker?language=objc +type FMarker struct { + MType uint32 + Pad_cgo_0 [8]byte + MMarkerID uint32 + MSMPTETime F_SMPTE_Time + MChannel uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofilefdftableextended?language=objc +type FileFDFTableExtended struct { + MComponentStorage uintptr + MReadBytesFDF uintptr + MWriteBytesFDF uintptr + MReadPacketsFDF uintptr + MWritePacketsFDF uintptr + MGetPropertyInfoFDF uintptr + MGetPropertyFDF uintptr + MSetPropertyFDF uintptr + MCountUserDataFDF uintptr + MGetUserDataSizeFDF uintptr + MGetUserDataFDF uintptr + MSetUserDataFDF uintptr + MReadPacketDataFDF uintptr +} + +// The name and number of custom Cocoa views for an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitcocoaviewinfo?language=objc +type UnitCocoaViewInfo struct { + MCocoaAUViewBundleLocation corefoundation.URLRef // *_Ctype_struct___CFURL + MCocoaAUViewClass [1]corefoundation.StringRef // *_Ctype_struct___CFString +} + +// An audio file region specifies a segment of audio data. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofileregion?language=objc +type FileRegion struct { + MRegionID uint32 + MName corefoundation.StringRef // *_Ctype_struct___CFString + MFlags uint32 + MNumberMarkers uint32 + MMarkers [1]FileMarker +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiocomponentplugininterface?language=objc +type ComponentPlugInInterface struct { + Open uintptr + Close uintptr + Lookup uintptr + Reserved uintptr +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/catempomapentry?language=objc +type TempoMapEntry struct { + Beats float64 + TempoBPM float64 +} + +// The name and version of an audio unit’s host application. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auhostversionidentifier?language=objc +type HostVersionIdentifier struct { + HostName corefoundation.StringRef // *_Ctype_struct___CFString + HostVersion uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/noteparamscontrolvalue?language=objc +type NoteParamsControlValue struct { + MID uint32 + MValue float32 +} + +// Defines an audio queue buffer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioqueuebuffer?language=objc +type QueueBuffer struct { + MAudioDataBytesCapacity uint32 + MAudioData uintptr + MAudioDataByteSize uint32 + MUserData uintptr + MPacketDescriptionCapacity uint32 + MPacketDescriptions *coreaudiotypes.StreamPacketDescription //*_Ctype_struct_AudioStreamPacketDescription + MPacketDescriptionCount uint32 + Pad_cgo_0 [4]byte +} + +// Specifies the current level metering information for one channel of an audio queue. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioqueuelevelmeterstate?language=objc +type QueueLevelMeterState struct { + MAveragePower float32 + MPeakPower float32 +} + +// A structure that describes a scheduled parameter event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auparameterevent?language=objc +type ParameterEvent struct { + ParameterID uint32 + Scope uint32 + Element uint32 + Value float32 +} + +// A callback used to provide input to an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aunoderendercallback?language=objc +type NodeRenderCallback struct { + DestNode int32 + DestInputNumber uint32 + Cback RenderCallbackStruct +} + +// An audio unit parameter whose value can change in response to a change in its parent metaparameter. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audependentparameter?language=objc +type DependentParameter struct { + MScope uint32 + MParameterID uint32 +} + +// Describes a MIDI note. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/midinotemessage?language=objc +type NoteMessage struct { + Channel uint8 + Note uint8 + Velocity uint8 + ReleaseVelocity uint8 + Duration float32 +} + +// Contains information about the number of valid frames in a file and where they begin and end. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofilepackettableinfo?language=objc +type FilePacketTableInfo struct { + MNumberValidFrames int64 + MPrimingFrames int32 + MRemainderFrames int32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioqueuechannelassignment?language=objc +type QueueChannelAssignment struct { + MDeviceUID corefoundation.StringRef // *_Ctype_struct___CFString + MChannelNumber uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auparameterautomationevent?language=objc +type ParameterAutomationEvent struct { + HostTime uint64 + Address uint64 + Value float32 + EventType uint32 + Reserved uint64 +} + +// Allows an audio unit host application to tell an audio unit to use a specified buffer for its input callback. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitexternalbuffer?language=objc +type UnitExternalBuffer struct { + Buffer *uint8 + Size uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiooutputunitmidicallbacks?language=objc +type OutputUnitMIDICallbacks struct { + UserData uintptr + MIDIEventProc uintptr + MIDISysExProc uintptr +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auparametermidimapping?language=objc +type ParameterMIDIMapping struct { + MScope uint32 + MElement uint32 + MParameterID uint32 + MFlags uint32 + MSubRangeMin float32 + MSubRangeMax float32 + MStatus uint8 + MData1 uint8 + Reserved1 uint8 + Reserved2 uint8 + Reserved3 uint32 +} + +// A structure that describes a scheduled MIDI event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aumidievent?language=objc +type MIDIEvent struct { + Next *[296]byte + EventSampleTime int64 + EventType uint8 + Reserved uint8 + Length uint16 + Cable uint8 + Data [3]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafregion?language=objc +type FRegion struct { + MRegionID uint32 + MFlags uint32 + MNumberMarkers uint32 + MMarkers [1]FMarker +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/musicdevicenoteparams?language=objc +type MusicDeviceNoteParams struct { + ArgCount uint32 + MPitch float32 + MVelocity float32 + MControls [1]NoteParamsControlValue +} + +// A connection between two node objects in an audio processing graph. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitnodeconnection?language=objc +type UnitNodeConnection struct { + SourceNode int32 + SourceOutputNumber uint32 + DestNode int32 + DestInputNumber uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafmarkerchunk?language=objc +type FMarkerChunk struct { + TimeType uint32 + MNumberMarkers uint32 + MMarkers [1]FMarker +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafpositionpeak?language=objc +type FPositionPeak struct { + MValue float32 + Pad_cgo_0 [8]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/scheduledaudiofileregion?language=objc +type ScheduledAudioFileRegion struct { + MTimeStamp coreaudiotypes.TimeStamp //_Ctype_struct_AudioTimeStamp + MCompletionProc uintptr + MCompletionProcUserData uintptr + // TODO: MAudioFile *_Ctype_struct_OpaqueAudioFileID + MLoopCount uint32 + MStartFrame int64 + MFramesToPlay uint32 + Pad_cgo_0 [4]byte +} + +// Annotates a position in an audio file. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofilemarker?language=objc +type FileMarker struct { + MFramePosition float64 + MName corefoundation.StringRef // *_Ctype_struct___CFString + MMarkerID int32 + MSMPTETime File_SMPTE_Time + MType uint32 + MReserved uint16 + MChannel uint16 + Pad_cgo_0 [4]byte +} + +// Describes a user-defined event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/musiceventuserdata?language=objc +type MusicEventUserData struct { + Length uint32 + Data [1]uint8 + Pad_cgo_0 [3]byte +} + +// A key-value pair that declares an attribute or behavior for an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitproperty?language=objc +type UnitProperty struct { + // TODO: MAudioUnit *_Ctype_struct_ComponentInstanceRecord + MPropertyID uint32 + MScope uint32 + MElement uint32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aunumversion?language=objc +type NumVersion struct { + NonRelRev uint8 + Stage uint8 + MinorAndBugRev uint8 + MajorRev uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiofilefdftable?language=objc +type FileFDFTable struct { + MComponentStorage uintptr + MReadBytesFDF uintptr + MWriteBytesFDF uintptr + MReadPacketsFDF uintptr + MWritePacketsFDF uintptr + MGetPropertyInfoFDF uintptr + MGetPropertyFDF uintptr + MSetPropertyFDF uintptr + MCountUserDataFDF uintptr + MGetUserDataSizeFDF uintptr + MGetUserDataFDF uintptr + MSetUserDataFDF uintptr +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafinstrumentchunk?language=objc +type FInstrumentChunk struct { + MBaseNote float32 + MMIDILowNote uint8 + MMIDIHighNote uint8 + MMIDILowVelocity uint8 + MMIDIHighVelocity uint8 + MdBGain float32 + MStartRegionID uint32 + MSustainRegionID uint32 + MReleaseRegionID uint32 + MInstrumentID uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitevent?language=objc +type UnitEvent struct { + MEventType uint32 + Pad_cgo_0 [4]byte + MArgument [24]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/caf_uuid_chunkheader?language=objc +type F_UUID_ChunkHeader struct { + MHeader FChunkHeader + MUUID [16]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/scheduledaudioslice?language=objc +type ScheduledAudioSlice struct { + MTimeStamp coreaudiotypes.TimeStamp // _Ctype_struct_AudioTimeStamp + MCompletionProc uintptr + MCompletionProcUserData uintptr + MFlags uint32 + MReserved uint32 + MReserved2 uintptr + MNumberFrames uint32 + MBufferList *coreaudiotypes.BufferList // *_Ctype_struct_AudioBufferList +} + +// Specifies an audio queue parameter and associated value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioqueueparameterevent?language=objc +type QueueParameterEvent struct { + MID uint32 + MValue float32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafoverviewchunk?language=objc +type FOverviewChunk struct { + MEditCount uint32 + MNumFramesPerOVWSample uint32 + MData [1]FOverviewSample +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafdatachunk?language=objc +type FDataChunk struct { + MEditCount uint32 + MData [1]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafchunkheader?language=objc +type FChunkHeader struct { + MChunkType uint32 + Pad_cgo_0 [8]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/ausamplerinstrumentdata?language=objc +type SamplerInstrumentData struct { + FileURL corefoundation.URLRef // *_Ctype_struct___CFURL + InstrumentType uint8 + BankMSB uint8 + BankLSB uint8 + PresetID uint8 + Pad_cgo_0 [4]byte +} + +// Supports control of the looping behavior of a music track. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/musictrackloopinfo?language=objc +type MusicTrackLoopInfo struct { + LoopDuration float64 + NumberOfLoops int32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cabarbeattime?language=objc +type BarBeatTime struct { + Bar int32 + Beat uint16 + Subbeat uint16 + SubbeatDivisor uint16 + Reserved uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/extendedcontrolevent?language=objc +type ExtendedControlEvent struct { + GroupID uint32 + ControlID uint32 + Value float32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiopacketdependencyinfotranslation?language=objc +type PacketDependencyInfoTranslation struct { + MPacket int64 + MIsIndependentlyDecodable uint32 + MNumberPrerollPackets uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cafpeakchunk?language=objc +type FPeakChunk struct { + MEditCount uint32 + MPeaks [1]FPositionPeak +} + +// A scheduled change to an audio unit parameter’s value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparameterevent?language=objc +type UnitParameterEvent struct { + Scope uint32 + Element uint32 + Parameter uint32 + EventType uint32 + EventValues [16]byte +} + +// The suggested update rate and history duration for parameters which have the kAudioUnitParameterFlag_PlotHistory flag set. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparameterhistoryinfo?language=objc +type UnitParameterHistoryInfo struct { + UpdatesPerSecond float32 + HistoryDurationInSeconds float32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitpresetmas_settingdata?language=objc +type UnitPresetMAS_SettingData struct { + IsStockSetting uint32 + SettingID uint32 + DataLen uint32 + Data [1]uint8 + Pad_cgo_0 [3]byte +} + +// Audio panning information. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiopanninginfo?language=objc +type PanningInfo struct { + MPanningMode uint32 + MCoordinateFlags uint32 + MCoordinates [3]float32 + MGainScale float32 + MOutputChannelMap *coreaudiotypes.ChannelLayout //*_Ctype_struct_AudioChannelLayout +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparametervaluetranslation?language=objc +type UnitParameterValueTranslation struct { + OtherDesc UnitOtherPluginDesc + OtherParamID uint32 + OtherValue float32 + AuParamID uint32 + AuValue float32 +} + +// Describes the interaction between two node objects. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aunodeinteraction?language=objc +type NodeInteraction struct { + NodeInteractionType uint32 + Pad_cgo_0 [4]byte + NodeInteraction [24]byte +} + +// A parameter's value based on a string representation of the value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparametervaluefromstring?language=objc +type UnitParameterValueFromString struct { + InParamID uint32 + InString corefoundation.StringRef // *_Ctype_struct___CFString + OutValue float32 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/ausamplerbankpresetdata?language=objc +type SamplerBankPresetData struct { + BankURL corefoundation.URLRef // *_Ctype_struct___CFURL + BankMSB uint8 + BankLSB uint8 + PresetID uint8 + Reserved uint8 + Pad_cgo_0 [4]byte +} + +// Specifies priming information for an audio converter, used as a value for the [audiotoolbox/audio_converter_properties/kaudioconverterprimeinfo] property. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioconverterprimeinfo?language=objc +type ConverterPrimeInfo struct { + LeadingFrames uint32 + TrailingFrames uint32 +} + +// A structure that describes a scheduled parameter event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/auparameterevent?language=objc +type ParameterEvent struct { + Next *[296]byte + EventSampleTime int64 + EventType uint8 + Reserved [3]uint8 + RampDurationSampleFrames uint32 + ParameterAddress uint64 + Value float32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/cametertrackentry?language=objc +type MeterTrackEntry struct { + Beats float64 + MeterNumer uint16 + MeterDenom uint16 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/midieventlist?language=objc +type EventList struct { + Protocol uint32 + NumPackets uint32 + Packet [1]coremidi.EventPacket //[1]_Ctype_struct_MIDIEventPacket +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/mixerdistanceparams?language=objc +type MixerDistanceParams struct { + MReferenceDistance float32 + MMaxDistance float32 + MMaxAttenuation float32 +} + +// Describes a MIDI channel message. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/midichannelmessage?language=objc +type ChannelMessage struct { + Status uint8 + Data1 uint8 + Data2 uint8 + Reserved uint8 +} + +// Used to set factory presets for an audio unit. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aupreset?language=objc +type Preset struct { + PresetNumber int32 + PresetName corefoundation.StringRef // *_Ctype_struct___CFString +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiopacketrangebytecounttranslation?language=objc +type PacketRangeByteCountTranslation struct { + MPacket int64 + MPacketCount int64 + MByteCountUpperBound int64 +} + +// A specifier for the [audiotoolbox/audio_format_property_identifier/kaudioformatproperty_formatlist] property. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audioformatinfo?language=objc +type FormatInfo struct { + MASBD coreaudiotypes.StreamBasicDescription //_Ctype_struct_AudioStreamBasicDescription + MMagicCookie uintptr + MMagicCookieSize uint32 + Pad_cgo_0 [4]byte +} + +// Describes a MIDI metaevent such as lyric text, time signature, and so on. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/midimetaevent?language=objc +type MetaEvent struct { + MetaEventType uint8 + Unused1 uint8 + Unused2 uint8 + Unused3 uint8 + DataLength uint32 + Data [1]uint8 + Pad_cgo_0 [3]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitmidicontrolmapping?language=objc +type UnitMIDIControlMapping struct { + MidiNRPN uint16 + MidiControl uint8 + Scope uint8 + Element uint32 + Parameter uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/musicdevicestdnoteparams?language=objc +type MusicDeviceStdNoteParams struct { + ArgCount uint32 + MPitch float32 + MVelocity float32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparametervaluename?language=objc +type UnitParameterValueName struct { + InParamID uint32 + InValue *float32 + OutName corefoundation.StringRef // *_Ctype_struct___CFString +} + +// A short version of the name for an audio unit parameter. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/audiounitparameternameinfo?language=objc +type UnitParameterNameInfo struct { + InID uint32 + InDesiredLength int32 + OutName corefoundation.StringRef // *_Ctype_struct___CFString +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/audiotoolbox/aumidieventlist?language=objc +type MIDIEventList struct { + Next *[296]byte + EventSampleTime int64 + EventType uint8 + Reserved uint8 + Cable uint8 + Pad_cgo_0 [277]byte +} + +// TODO (unable to generate): +// CAFAudioFormatListItem diff --git a/macos/_wip/avfaudio/avfaudio_structs.go b/macos/_wip/avfaudio/avfaudio_structs.go new file mode 100644 index 00000000..6e71dc21 --- /dev/null +++ b/macos/_wip/avfaudio/avfaudio_structs.go @@ -0,0 +1,43 @@ +package avfaudio + +// Priming information for audio conversion. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfaudio/avaudioconverterprimeinfo?language=objc +type AudioConverterPrimeInfo struct { + LeadingFrames uint32 + TrailingFrames uint32 +} + +// A structure that represents a point in 3D space. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfaudio/avaudio3dpoint?language=objc +type Audio3DPoint struct { + X float32 + Y float32 + Z float32 +} + +// A structure that represents two orthogonal vectors that describe the orientation of the listener in 3D space. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfaudio/avaudio3dvectororientation?language=objc +type Audio3DVectorOrientation struct { + Forward Audio3DPoint + Up Audio3DPoint +} + +// A structure that represents the angular orientation of the listener in 3D space. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfaudio/avaudio3dangularorientation?language=objc +type Audio3DAngularOrientation struct { + Yaw float32 + Pitch float32 + Roll float32 +} + +// A specific time range within a music track. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfaudio/avbeatrange?language=objc +type BeatRange struct { + Start float64 + Length float64 +} diff --git a/macos/_wip/gameplaykit/gameplaykit_structs.go b/macos/_wip/gameplaykit/gameplaykit_structs.go new file mode 100644 index 00000000..f053423e --- /dev/null +++ b/macos/_wip/gameplaykit/gameplaykit_structs.go @@ -0,0 +1,27 @@ +package gameplaykit + +// The definition of an axis-aligned rectangular bounding volume addressed by the tree. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/gameplaykit/gkbox?language=objc +type Box struct { + BoxMin [3]float32 + Pad_cgo_0 [4]byte + BoxMax [3]float32 + Pad_cgo_1 [4]byte +} + +// The definition of an axis-aligned rectangle addressed by the tree. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/gameplaykit/gkquad?language=objc +type Quad struct { + QuadMin [2]float32 + QuadMax [2]float32 +} + +// The definition of a triangle in the mesh, available with the [gameplaykit/gkmeshgraph/triangleatindex] method. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/gameplaykit/gktriangle?language=objc +type Triangle struct { + Points [3][3]float32 + Pad_cgo_0 [12]byte +} diff --git a/macos/_wip/iobluetooth/iobluetooth_structs.go b/macos/_wip/iobluetooth/iobluetooth_structs.go new file mode 100644 index 00000000..a7fc21cd --- /dev/null +++ b/macos/_wip/iobluetooth/iobluetooth_structs.go @@ -0,0 +1,1124 @@ +package iobluetooth + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciextendedinquiryresult?language=objc +type HCIExtendedInquiryResult struct { + NumberOfReponses uint8 + DeviceAddress DeviceAddress + PageScanRepetitionMode uint8 + Reserved uint8 + ClassOfDevice uint32 + ClockOffset uint16 + RSSIValue int8 + ExtendedInquiryResponse HCIExtendedInquiryResponse + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventconnectionrequestresults?language=objc +type HCIEventConnectionRequestResults struct { + DeviceAddress DeviceAddress + ClassOfDevice uint32 + LinkType uint8 + Pad_cgo_0 [3]byte +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexputcommandresponsedata?language=objc +type OBEXPutCommandResponseData struct { + ServerResponseOpCode uint8 + HeaderDataPtr uintptr + HeaderDataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventleconnectionupdatecompleteresults?language=objc +type HCIEventLEConnectionUpdateCompleteResults struct { + ConnectionHandle uint16 + ConnInterval uint16 + ConnLatency uint16 + SupervisionTimeout uint16 +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexconnectcommandresponsedata?language=objc +type OBEXConnectCommandResponseData struct { + ServerResponseOpCode uint8 + HeaderDataPtr uintptr + HeaderDataLength uint64 + MaxPacketSize uint16 + Version uint8 + Flags uint8 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothuserconfirmationrequest?language=objc +type UserConfirmationRequest struct { + DeviceAddress DeviceAddress + NumericValue uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventconnectionpackettyperesults?language=objc +type HCIEventConnectionPacketTypeResults struct { + ConnectionHandle uint16 + PacketType uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcilinkqualityinfo?language=objc +type HCILinkQualityInfo struct { + Handle uint16 + QualityValue uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcifailedcontactinfo?language=objc +type HCIFailedContactInfo struct { + Count uint16 + Handle uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcicurrentinquiryaccesscodesforwrite?language=objc +type HCICurrentInquiryAccessCodesForWrite struct { + Count uint8 + Codes [192]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothiocapabilityresponse?language=objc +type IOCapabilityResponse struct { + DeviceAddress DeviceAddress + IoCapability uint8 + OOBDataPresence uint8 + AuthenticationRequirements uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcirequestcallbackinfo?language=objc +type HCIRequestCallbackInfo struct { + UserCallback uint64 + UserRefCon uint64 + InternalRefCon uint64 + AsyncIDRefCon uint64 + Reserved uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcisupportedcommands?language=objc +type HCISupportedCommands struct { + Data [64]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcilinkpolicysettingsinfo?language=objc +type HCILinkPolicySettingsInfo struct { + Settings uint16 + Handle uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventlereadremoteusedfeaturescompleteresults?language=objc +type HCIEventLEReadRemoteUsedFeaturesCompleteResults struct { + ConnectionHandle uint16 + UsedFeatures HCISupportedFeatures +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciversioninfo?language=objc +type HCIVersionInfo struct { + ManufacturerName uint16 + LmpVersion uint8 + LmpSubVersion uint16 + HciVersion uint8 + HciRevision uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventconnectioncompleteresults?language=objc +type HCIEventConnectionCompleteResults struct { + ConnectionHandle uint16 + DeviceAddress DeviceAddress + LinkType uint8 + EncryptionMode uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventmasterlinkkeycompleteresults?language=objc +type HCIEventMasterLinkKeyCompleteResults struct { + ConnectionHandle uint16 + KeyFlag uint8 + Pad_cgo_0 [1]byte +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexputcommanddata?language=objc +type OBEXPutCommandData struct { + HeaderDataPtr uintptr + HeaderDataLength uint64 + BodyDataLeftToSend uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcibuffersize?language=objc +type HCIBufferSize struct { + ACLDataPacketLength uint16 + SCODataPacketLength uint8 + TotalNumACLDataPackets uint16 + TotalNumSCODataPackets uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciextendedinquiryresponse?language=objc +type HCIExtendedInquiryResponse struct { + Data [240]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventdisconnectioncompleteresults?language=objc +type HCIEventDisconnectionCompleteResults struct { + ConnectionHandle uint16 + Reason uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcisetupsynchronousconnectionparams?language=objc +type HCISetupSynchronousConnectionParams struct { + TransmitBandwidth uint32 + ReceiveBandwidth uint32 + MaxLatency uint16 + VoiceSetting uint16 + RetransmissionEffort uint8 + PacketType uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventpagescanrepetitionmodechangeresults?language=objc +type HCIEventPageScanRepetitionModeChangeResults struct { + DeviceAddress DeviceAddress + PageScanRepetitionMode uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcicurrentinquiryaccesscodes?language=objc +type HCICurrentInquiryAccessCodes struct { + Count uint8 + Codes *HCIInquiryAccessCode +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventvendorspecificresults?language=objc +type HCIEventVendorSpecificResults struct { + Length uint8 + Data [255]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventqossetupcompleteresults?language=objc +type HCIEventQoSSetupCompleteResults struct { + ConnectionHandle uint16 + SetupParams HCIQualityOfServiceSetupParams +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciencryptionkeysizeinfo?language=objc +type HCIEncryptionKeySizeInfo struct { + Handle uint16 + KeySize uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/iobluetoothl2capchannelevent?language=objc +type L2CAPChannelEvent struct { + EventType uint32 + Pad_cgo_0 [4]byte + U [32]byte + Status int32 + Pad_cgo_1 [4]byte +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexsetpathcommanddata?language=objc +type OBEXSetPathCommandData struct { + HeaderDataPtr uintptr + HeaderDataLength uint64 + Flags uint8 + Constants uint8 + Pad_cgo_0 [6]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothremotehostsupportedfeaturesnotification?language=objc +type RemoteHostSupportedFeaturesNotification struct { + DeviceAddress DeviceAddress + HostSupportedFeatures HCISupportedFeatures +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventflowspecificationdata?language=objc +type HCIEventFlowSpecificationData struct { + ConnectionHandle uint16 + Flags uint8 + FlowDirection uint8 + ServiceType uint8 + TokenRate uint32 + TokenBucketSize uint32 + PeakBandwidth uint32 + AccessLatency uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothirk?language=objc +type IRK struct { + Data [16]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothkeypressnotification?language=objc +type KeypressNotification struct { + DeviceAddress DeviceAddress + NotificationType uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciinquiryaccesscode?language=objc +type HCIInquiryAccessCode struct { + Data [3]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventchangeconnectionlinkkeycompleteresults?language=objc +type HCIEventChangeConnectionLinkKeyCompleteResults struct { + ConnectionHandle uint16 +} + +// Bits to determine what Bluetooth devices to search for [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/iobluetoothdevicesearchdeviceattributes?language=objc +type DeviceSearchDeviceAttributes struct { + Address DeviceAddress + Name [248]uint8 + ServiceClassMajor uint32 + DeviceClassMajor uint32 + DeviceClassMinor uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventmaxslotschangeresults?language=objc +type HCIEventMaxSlotsChangeResults struct { + ConnectionHandle uint16 + MaxSlots uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcilebuffersize?language=objc +type HCILEBufferSize struct { + ACLDataPacketLength uint16 + TotalNumACLDataPackets uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventreadextendedfeaturesresults?language=objc +type HCIEventReadExtendedFeaturesResults struct { + ConnectionHandle uint16 + SupportedFeaturesInfo HCIExtendedFeaturesInfo +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciscanactivity?language=objc +type HCIScanActivity struct { + ScanInterval uint16 + ScanWindow uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcienhancedsetupsynchronousconnectionparams?language=objc +type HCIEnhancedSetupSynchronousConnectionParams struct { + TransmitBandwidth uint32 + ReceiveBandwidth uint32 + TransmitCodingFormat uint64 + ReceiveCodingFormat uint64 + TransmitCodecFrameSize uint16 + ReceiveCodecFrameSize uint16 + InputBandwidth uint32 + OutputBandwidth uint32 + InputCodingFormat uint64 + OutputCodingFormat uint64 + InputCodedDataSize uint16 + OutputCodedDataSize uint16 + InputPCMDataFormat uint8 + OutputPCMDataFormat uint8 + InputPCMSamplePayloadMSBPosition uint8 + OutputPCMSamplePayloadMSBPosition uint8 + InputDataPath uint8 + OutputDataPath uint8 + InputTransportUnitSize uint8 + OutputTransportUnitSize uint8 + MaxLatency uint16 + PacketType uint16 + RetransmissionEffort uint8 + Pad_cgo_0 [7]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothl2capqualityofserviceoptions?language=objc +type L2CAPQualityOfServiceOptions struct { + Flags uint8 + ServiceType uint8 + TokenRate uint32 + TokenBucketSize uint32 + PeakBandwidth uint32 + Latency uint32 + DelayVariation uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcisupportedfeatures?language=objc +type HCISupportedFeatures struct { + Data [8]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcistoredlinkkeysinfo?language=objc +type HCIStoredLinkKeysInfo struct { + NumLinkKeysRead uint16 + MaxNumLinkKeysAllowedInDevice uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventleenhancedconnectioncompleteresults?language=objc +type HCIEventLEEnhancedConnectionCompleteResults struct { + ConnectionHandle uint16 + Role uint8 + PeerAddressType uint8 + PeerAddress DeviceAddress + LocalResolvablePrivateAddress DeviceAddress + PeerResolvablePrivateAddress DeviceAddress + ConnInterval uint16 + ConnLatency uint16 + SupervisionTimeout uint16 + MasterClockAccuracy uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventremotenamerequestresults?language=objc +type HCIEventRemoteNameRequestResults struct { + DeviceAddress DeviceAddress + DeviceName [248]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventsynchronousconnectioncompleteresults?language=objc +type HCIEventSynchronousConnectionCompleteResults struct { + ConnectionHandle uint16 + DeviceAddress DeviceAddress + LinkType uint8 + TransmissionInterval uint8 + RetransmissionWindow uint8 + ReceivePacketLength uint16 + TransmitPacketLength uint16 + AirMode uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcisimplepairingoobdata?language=objc +type HCISimplePairingOOBData struct { + Data [16]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventlemetaresults?language=objc +type HCIEventLEMetaResults struct { + Length uint8 + Data [255]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventsniffsubratingresults?language=objc +type HCIEventSniffSubratingResults struct { + ConnectionHandle uint16 + MaxTransmitLatency uint16 + MaxReceiveLatency uint16 + MinRemoteTimeout uint16 + MinLocalTimeout uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventreadsupportedfeaturesresults?language=objc +type HCIEventReadSupportedFeaturesResults struct { + ConnectionHandle uint16 + SupportedFeatures HCISupportedFeatures +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothseteventmask?language=objc +type SetEventMask struct { + Data [8]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventreadremoteextendedfeaturesresults?language=objc +type HCIEventReadRemoteExtendedFeaturesResults struct { + Error uint8 + ConnectionHandle uint16 + Page uint8 + MaxPage uint8 + LmpFeatures HCISupportedFeatures +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventsimplepairingcompleteresults?language=objc +type HCIEventSimplePairingCompleteResults struct { + DeviceAddress DeviceAddress +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothuserpasskeynotification?language=objc +type UserPasskeyNotification struct { + DeviceAddress DeviceAddress + Passkey uint32 +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexabortcommanddata?language=objc +type OBEXAbortCommandData struct { + HeaderDataPtr uintptr + HeaderDataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothdeviceaddress?language=objc +type DeviceAddress struct { + Data [6]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcireadextendedinquiryresponseresults?language=objc +type HCIReadExtendedInquiryResponseResults struct { + OutFECRequired uint8 + ExtendedInquiryResponse HCIExtendedInquiryResponse +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexconnectcommanddata?language=objc +type OBEXConnectCommandData struct { + HeaderDataPtr uintptr + HeaderDataLength uint64 + MaxPacketSize uint16 + Version uint8 + Flags uint8 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciroleinfo?language=objc +type HCIRoleInfo struct { + Role uint8 + Handle uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/iobluetoothdevicesearchattributes?language=objc +type DeviceSearchAttributes struct { + Options uint32 + MaxResults uint32 + DeviceAttributeCount uint32 + AttributeList *DeviceSearchDeviceAttributes +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventpagescanmodechangeresults?language=objc +type HCIEventPageScanModeChangeResults struct { + DeviceAddress DeviceAddress + PageScanMode uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcienhancedacceptsynchronousconnectionrequestparams?language=objc +type HCIEnhancedAcceptSynchronousConnectionRequestParams struct { + TransmitBandwidth uint32 + ReceiveBandwidth uint32 + TransmitCodingFormat uint64 + ReceiveCodingFormat uint64 + TransmitCodecFrameSize uint16 + ReceiveCodecFrameSize uint16 + InputBandwidth uint32 + OutputBandwidth uint32 + InputCodingFormat uint64 + OutputCodingFormat uint64 + InputCodedDataSize uint16 + OutputCodedDataSize uint16 + InputPCMDataFormat uint8 + OutputPCMDataFormat uint8 + InputPCMSamplePayloadMSBPosition uint8 + OutputPCMSamplePayloadMSBPosition uint8 + InputDataPath uint8 + OutputDataPath uint8 + InputTransportUnitSize uint8 + OutputTransportUnitSize uint8 + MaxLatency uint16 + PacketType uint16 + RetransmissionEffort uint8 + Pad_cgo_0 [7]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothreadclockinfo?language=objc +type ReadClockInfo struct { + Handle uint16 + Clock uint32 + Accuracy uint16 + Pad_cgo_0 [2]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventauthenticationcompleteresults?language=objc +type HCIEventAuthenticationCompleteResults struct { + ConnectionHandle uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothenhancedsynchronousconnectioninfo?language=objc +type EnhancedSynchronousConnectionInfo struct { + TransmitBandWidth uint32 + ReceiveBandWidth uint32 + TransmitCodingFormat uint64 + ReceiveCodingFormat uint64 + TransmitCodecFrameSize uint16 + ReceiveCodecFrameSize uint16 + InputBandwidth uint32 + OutputBandwidth uint32 + InputCodingFormat uint64 + OutputCodingFormat uint64 + InputCodedDataSize uint16 + OutputCodedDataSize uint16 + InputPCMDataFormat uint8 + OutputPCMDataFormat uint8 + InputPCMSampelPayloadMSBPosition uint8 + OutputPCMSampelPayloadMSBPosition uint8 + InputDataPath uint8 + OutputDataPath uint8 + InputTransportUnitSize uint8 + OutputTransportUnitSize uint8 + MaxLatency uint16 + VoiceSetting uint16 + RetransmissionEffort uint8 + PacketType uint16 + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventreadclockoffsetresults?language=objc +type HCIEventReadClockOffsetResults struct { + ConnectionHandle uint16 + ClockOffset uint16 +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexabortcommandresponsedata?language=objc +type OBEXAbortCommandResponseData struct { + ServerResponseOpCode uint8 + HeaderDataPtr uintptr + HeaderDataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/iobluetoothl2capchanneldatablock?language=objc +type L2CAPChannelDataBlock struct { + DataPtr uintptr + DataSize uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothsynchronousconnectioninfo?language=objc +type SynchronousConnectionInfo struct { + TransmitBandWidth uint32 + ReceiveBandWidth uint32 + MaxLatency uint16 + VoiceSetting uint16 + RetransmissionEffort uint8 + PacketType uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothpincode?language=objc +type PINCode struct { + Data [16]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciinquirywithrssiresults?language=objc +type HCIInquiryWithRSSIResults struct { + Results [50]HCIInquiryWithRSSIResult + Count uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcitransmitpowerlevelinfo?language=objc +type HCITransmitPowerLevelInfo struct { + Handle uint16 + Level int8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciqualityofservicesetupparams?language=objc +type HCIQualityOfServiceSetupParams struct { + Flags uint8 + ServiceType uint8 + TokenRate uint32 + PeakBandwidth uint32 + Latency uint32 + DelayVariation uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciacceptsynchronousconnectionrequestparams?language=objc +type HCIAcceptSynchronousConnectionRequestParams struct { + TransmitBandwidth uint32 + ReceiveBandwidth uint32 + MaxLatency uint16 + ContentFormat uint16 + RetransmissionEffort uint8 + PacketType uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciinquiryresults?language=objc +type HCIInquiryResults struct { + Results [50]HCIInquiryResult + Count uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexsessionevent?language=objc +type OBEXSessionEvent struct { + Type uint32 + //TODO: Session *_Ctype_struct_OpaqueOBEXSessionRef + RefCon uintptr + IsEndOfEventData uint8 + Reserved1 uintptr + Reserved2 uintptr + U [32]byte +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexgetcommandresponsedata?language=objc +type OBEXGetCommandResponseData struct { + ServerResponseOpCode uint8 + HeaderDataPtr uintptr + HeaderDataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciextendedfeaturesinfo?language=objc +type HCIExtendedFeaturesInfo struct { + Page uint8 + MaxPage uint8 + Data [8]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventhardwareerrorresults?language=objc +type HCIEventHardwareErrorResults struct { + Error uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciinquirywithrssiresult?language=objc +type HCIInquiryWithRSSIResult struct { + DeviceAddress DeviceAddress + PageScanRepetitionMode uint8 + Reserved uint8 + ClassOfDevice uint32 + ClockOffset uint16 + RSSIValue int8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventflushoccurredresults?language=objc +type HCIEventFlushOccurredResults struct { + ConnectionHandle uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventreadremotesupportedfeaturesresults?language=objc +type HCIEventReadRemoteSupportedFeaturesResults struct { + Error uint8 + ConnectionHandle uint16 + LmpFeatures HCISupportedFeatures +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcireadlocaloobdataresults?language=objc +type HCIReadLocalOOBDataResults struct { + Hash HCISimplePairingOOBData + Randomizer HCISimplePairingOOBData +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexsetpathcommandresponsedata?language=objc +type OBEXSetPathCommandResponseData struct { + ServerResponseOpCode uint8 + HeaderDataPtr uintptr + HeaderDataLength uint64 + Flags uint8 + Constants uint8 + Pad_cgo_0 [6]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventsynchronousconnectionchangedresults?language=objc +type HCIEventSynchronousConnectionChangedResults struct { + ConnectionHandle uint16 + TransmissionInterval uint8 + RetransmissionWindow uint8 + ReceivePacketLength uint16 + TransmitPacketLength uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventlelongtermkeyrequestresults?language=objc +type HCIEventLELongTermKeyRequestResults struct { + ConnectionHandle uint16 + RandomNumber [8]uint8 + Ediv uint16 +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexerrordata?language=objc +type OBEXErrorData struct { + Error int32 + DataPtr uintptr + DataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obextransportevent?language=objc +type OBEXTransportEvent struct { + Type uint32 + Status int32 + DataPtr uintptr + DataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothtransportinfo?language=objc +type TransportInfo struct { + ProductID uint32 + VendorID uint32 + Type uint32 + ProductName [35]int8 + VendorName [35]int8 + TotalDataBytesSent uint64 + TotalSCOBytesSent uint64 + TotalDataBytesReceived uint64 + TotalSCOBytesReceived uint64 +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexdisconnectcommandresponsedata?language=objc +type OBEXDisconnectCommandResponseData struct { + ServerResponseOpCode uint8 + HeaderDataPtr uintptr + HeaderDataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciautomaticflushtimeoutinfo?language=objc +type HCIAutomaticFlushTimeoutInfo struct { + Handle uint16 + Timeout uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventreturnlinkkeysresults?language=objc +type HCIEventReturnLinkKeysResults struct { + NumLinkKeys uint8 + // TODO: LinkKeys [1]_Ctype_struct___0 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcilinksupervisiontimeout?language=objc +type HCILinkSupervisionTimeout struct { + Handle uint16 + Timeout uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventmodechangeresults?language=objc +type HCIEventModeChangeResults struct { + ConnectionHandle uint16 + Mode uint8 + ModeInterval uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcirssiinfo?language=objc +type HCIRSSIInfo struct { + Handle uint16 + RSSIValue int8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventleconnectioncompleteresults?language=objc +type HCIEventLEConnectionCompleteResults struct { + ConnectionHandle uint16 + Role uint8 + PeerAddressType uint8 + PeerAddress DeviceAddress + ConnInterval uint16 + ConnLatency uint16 + SupervisionTimeout uint16 + MasterClockAccuracy uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventreadremoteversioninforesults?language=objc +type HCIEventReadRemoteVersionInfoResults struct { + ConnectionHandle uint16 + LmpVersion uint8 + ManufacturerName uint16 + LmpSubversion uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcireadlmphandleresults?language=objc +type HCIReadLMPHandleResults struct { + Handle uint16 + Lmp_handle uint8 + Reserved uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventlinkkeynotificationresults?language=objc +type HCIEventLinkKeyNotificationResults struct { + DeviceAddress DeviceAddress + LinkKey Key + KeyType uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventqosviolationresults?language=objc +type HCIEventQoSViolationResults struct { + ConnectionHandle uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetootheventfiltercondition?language=objc +type EventFilterCondition struct { + Data [7]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothafhhostchannelclassification?language=objc +type AFHHostChannelClassification struct { + Data [10]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothafhresults?language=objc +type AFHResults struct { + Handle uint16 + Mode uint8 + AfhMap [10]uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventdatabufferoverflowresults?language=objc +type HCIEventDataBufferOverflowResults struct { + LinkType uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventencryptionchangeresults?language=objc +type HCIEventEncryptionChangeResults struct { + ConnectionHandle uint16 + Enable uint8 + Pad_cgo_0 [1]byte +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexgetcommanddata?language=objc +type OBEXGetCommandData struct { + HeaderDataPtr uintptr + HeaderDataLength uint64 +} + +// Part of the OBEXSessionEvent structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/obexdisconnectcommanddata?language=objc +type OBEXDisconnectCommandData struct { + HeaderDataPtr uintptr + HeaderDataLength uint64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventencryptionkeyrefreshcompleteresults?language=objc +type HCIEventEncryptionKeyRefreshCompleteResults struct { + ConnectionHandle uint16 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhciinquiryresult?language=objc +type HCIInquiryResult struct { + DeviceAddress DeviceAddress + PageScanRepetitionMode uint8 + PageScanPeriodMode uint8 + PageScanMode uint8 + ClassOfDevice uint32 + ClockOffset uint16 + Pad_cgo_0 [2]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothkey?language=objc +type Key struct { + Data [16]uint8 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothhcieventrolechangeresults?language=objc +type HCIEventRoleChangeResults struct { + ConnectionHandle uint16 + DeviceAddress DeviceAddress + Role uint8 + Pad_cgo_0 [1]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iobluetooth/bluetoothl2capretransmissionandflowcontroloptions?language=objc +type L2CAPRetransmissionAndFlowControlOptions struct { + Flags uint8 + TxWindowSize uint8 + MaxTransmit uint8 + RetransmissionTimeout uint16 + MonitorTimeout uint16 + MaxPDUPayloadSize uint16 +} + +// TODO (unable to generate): +// BluetoothHCILinkPolicySettingsValues BluetoothHCIAFHChannelAssessmentModes FTSFileType OBEXRealmValues BluetoothLinkTypes BluetoothHCIGeneralFlowControlStates BluetoothHCIExtendedInquiryResponseDataTypes OBEXErrorCodes OBEXTransportEventTypes BluetoothOOBDataPresenceValues OBEXPutFlagValues BluetoothHCIDeleteStoredLinkKeyFlags BluetoothHCIEncryptionModes OBEXNonceFlagValues BluetoothHCIRoles BluetoothCompanyIdentifers BluetoothHCIPageScanEnableStates BluetoothHCITimeoutValues BluetoothSimplePairingDebugModes OBEXOpCodeResponseValues BluetoothHCIInquiryScanTypes BluetoothKeypressNotificationTypes SDPServiceClasses OBEXOpCodeCommandValues BluetoothHCIFECRequiredValues BluetoothLEFeatureBits BluetoothHCIRetransmissionEffortTypes ProtocolParameters OBEXSessionEventTypes BluetoothTransportTypes BluetoothHCISimplePairingModes BluetoothFeatureBits BluetoothHCIReadStoredLinkKeysFlags IOBluetoothDeviceSearchOptionsBits BluetoothHCIPageScanPeriodModes OBEXSessionParameterTags OBEXVersions BluetoothHCIAuthentionEnableModes BluetoothIOCapabilities BluetoothAuthenticationRequirementsValues BluetoothHCIConnectionModes OBEXConnectFlagValues SDPAttributeIdentifierCodes BluetoothLESecurityManagerKeyDistributionFormat IOBluetoothDeviceSearchTypesBits BluetoothHCIInquiryModes BluetoothHCIPageScanTypes BluetoothHCITransmitReadPowerLevelTypes OBEXOpCodeSessionValues BluetoothHCIPageScanModes BluetoothHCISCOFlowControlStates SDPAttributeDeviceIdentificationRecord BluetoothHCIHoldModeActivityStates OBEXHeaderIdentifiers diff --git a/macos/_wip/modelio/modelio_structs.go b/macos/_wip/modelio/modelio_structs.go new file mode 100644 index 00000000..d550cdac --- /dev/null +++ b/macos/_wip/modelio/modelio_structs.go @@ -0,0 +1,20 @@ +package modelio + +// The minimal volume containing an object, used by the [modelio/mdlobject/boundingboxattime] method. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/modelio/mdlaxisalignedboundingbox?language=objc +type AxisAlignedBoundingBox struct { + MaxBounds [3]float32 + Pad_cgo_0 [4]byte + MinBounds [3]float32 + Pad_cgo_1 [4]byte +} + + +// The corner voxel indices defining a solid rectangular volume of voxels. Used by the [modelio/mdlvoxelarray/voxelindexextent] property and [modelio/mdlvoxelarray/voxelswithinextent] method. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/modelio/mdlvoxelindexextent?language=objc +type VoxelIndexExtent struct { + MinimumExtent [4]int32 + MaximumExtent [4]int32 +} diff --git a/macos/_wip/scenekit/scenekit_structs.go b/macos/_wip/scenekit/scenekit_structs.go new file mode 100644 index 00000000..097a6da6 --- /dev/null +++ b/macos/_wip/scenekit/scenekit_structs.go @@ -0,0 +1,42 @@ +package scenekit + +// A representation of a three-component vector. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/scenekit/scnvector3?language=objc +type Vector3 struct { + X float64 + Y float64 + Z float64 +} + +// A representation of a 4 x 4 matrix. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/scenekit/scnmatrix4?language=objc +type Matrix4 struct { + M11 float64 + M12 float64 + M13 float64 + M14 float64 + M21 float64 + M22 float64 + M23 float64 + M24 float64 + M31 float64 + M32 float64 + M33 float64 + M34 float64 + M41 float64 + M42 float64 + M43 float64 + M44 float64 +} + +// A representation of a four-component vector. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/scenekit/scnvector4?language=objc +type Vector4 struct { + X float64 + Y float64 + Z float64 + W float64 +} diff --git a/macos/appkit/appkit_custom.go b/macos/appkit/appkit_custom.go index 09d78ab6..9966080e 100644 --- a/macos/appkit/appkit_custom.go +++ b/macos/appkit/appkit_custom.go @@ -8,11 +8,9 @@ import ( "github.com/progrium/macdriver/objc" ) -// todo: generate -type ModalSession unsafe.Pointer +// todo: generate? type AccessibilityLoadingToken unsafe.Pointer -// todo: generate const VariableStatusItemLength float64 = -1 // for some reason not in symbols.zip? diff --git a/macos/appkit/appkit_structs.go b/macos/appkit/appkit_structs.go index b6d4c0b9..e1c1b09d 100644 --- a/macos/appkit/appkit_structs.go +++ b/macos/appkit/appkit_structs.go @@ -1,14 +1,16 @@ package appkit -import ( - "github.com/progrium/macdriver/macos/coregraphics" -) - -// stuct define should be synced with +// Variables of type NSModalSession point to information used by the system between NSApplication’s [appkit/nsapplication/beginmodalsessionforwindow] and [appkit/nsapplication/endmodalsession] messages. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/appkit/nsmodalsession?language=objc +type ModalSession uintptr +// The inset distances for views, taking the user interface layout direction into account. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/uikit/nsdirectionaledgeinsets?language=objc type DirectionalEdgeInsets struct { - Top coregraphics.Float - Leading coregraphics.Float - Bottom coregraphics.Float - Trailing coregraphics.Float + Top float64 + Leading float64 + Bottom float64 + Trailing float64 } diff --git a/macos/appkit/enumtypes.gen.go b/macos/appkit/enumtypes.gen.go index d47788ad..d5dd4d31 100644 --- a/macos/appkit/enumtypes.gen.go +++ b/macos/appkit/enumtypes.gen.go @@ -3004,7 +3004,7 @@ const ( // Layout priority used to indicate the relative importance of constraints, allowing Auto Layout to make appropriate tradeoffs when satisfying the constraints of the system as a whole. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/appkit/nslayoutpriority?language=objc -type LayoutPriority float32 +type LayoutPriority float64 const ( LayoutPriorityDefaultHigh LayoutPriority = 750.000000 diff --git a/macos/avfoundation/avfoundation_structs.go b/macos/avfoundation/avfoundation_structs.go index 97323a5b..b9d947dd 100644 --- a/macos/avfoundation/avfoundation_structs.go +++ b/macos/avfoundation/avfoundation_structs.go @@ -1,12 +1,91 @@ package avfoundation -// TODO: -type CaptionPoint struct{} -type CaptionSize struct{} -type SampleCursorStorageRange struct{} -type SampleCursorSyncInfo struct{} -type SampleCursorChunkInfo struct{} -type SampleCursorDependencyInfo struct{} -type SampleCursorAudioDependencyInfo struct{} -type PixelAspectRatio struct{} -type EdgeWidths struct{} +// A structure that describes the independent decodability of audio samples. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avsamplecursoraudiodependencyinfo?language=objc +type SampleCursorAudioDependencyInfo struct { + AudioSampleIsIndependentlyDecodable int8 + AudioSamplePacketRefreshCount int64 +} + +// A structure that defines edge processing region widths. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avedgewidths?language=objc +type EdgeWidths struct { + Left float64 + Top float64 + Right float64 + Bottom float64 +} + +// A value that provides information about a chunk of media samples. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avsamplecursorchunkinfo?language=objc +type SampleCursorChunkInfo struct { + ChunkSampleCount int64 + ChunkHasUniformSampleSizes int8 + ChunkHasUniformSampleDurations int8 + ChunkHasUniformFormatDescriptions int8 + Pad_cgo_0 [5]byte +} + +// A structure that defines the origin point for a caption. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avcaptionpoint?language=objc +type CaptionPoint struct { + X CaptionDimension + Y CaptionDimension +} + +// A value for describing dependencies between a media sample and other media samples in the same sample sequence. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avsamplecursordependencyinfo?language=objc +type SampleCursorDependencyInfo struct { + SampleIndicatesWhetherItHasDependentSamples int8 + SampleHasDependentSamples int8 + SampleIndicatesWhetherItDependsOnOthers int8 + SampleDependsOnOthers int8 + SampleIndicatesWhetherItHasRedundantCoding int8 + SampleHasRedundantCoding int8 +} + +// A structure that defines the height and width of a caption. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avcaptionsize?language=objc +type CaptionSize struct { + Width CaptionDimension + Height CaptionDimension +} + +// A structure that defines a pixel aspect ratio for a rendering context. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avpixelaspectratio?language=objc +type PixelAspectRatio struct { + HorizontalSpacing int64 + VerticalSpacing int64 +} + +// A structure that describes the attributes of media samples to consider when resynchronizing a decoder. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avsamplecursorsyncinfo?language=objc +type SampleCursorSyncInfo struct { + SampleIsFullSync int8 + SampleIsPartialSync int8 + SampleIsDroppable int8 +} + +// A structure that defines a caption dimension. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avcaptiondimension?language=objc +type CaptionDimension struct { + Value float64 + Units uint64 +} + +// A structure that indicates the offset and length of storage for a media sample or its chunk. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/avfoundation/avsamplecursorstoragerange?language=objc +type SampleCursorStorageRange struct { + Offset int64 + Length int64 +} diff --git a/macos/coreaudio/coreaudio_structs.go b/macos/coreaudio/coreaudio_structs.go index a08e2ccc..c5512b4a 100644 --- a/macos/coreaudio/coreaudio_structs.go +++ b/macos/coreaudio/coreaudio_structs.go @@ -1,4 +1,30 @@ package coreaudio -// TODO -type ObjectPropertyAddress struct{} +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudio/audioobjectpropertyaddress?language=objc +type ObjectPropertyAddress struct { + MSelector uint32 + MScope uint32 + MElement uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudio/audiostreamrangeddescription?language=objc +type StreamRangedDescription struct { + MFormat uintptr // _Ctype_struct_AudioStreamBasicDescription + MSampleRateRange uintptr // _Ctype_struct_AudioValueRange +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudio/audiohardwareioprocstreamusage?language=objc +type HardwareIOProcStreamUsage struct { + MIOProc uintptr + MNumberStreams uint32 + MStreamIsOn [1]uint32 +} + +// TODO (unable to generate): +// AudioServerPlugInClientInfo AudioDriverPlugInHostInfo AudioServerPlugInHostInterface AudioServerPlugInIOCycleInfo AudioServerPlugInCustomPropertyInfo AudioServerPlugInDriverInterface diff --git a/macos/coreaudiotypes/coreaudiotypes_structs.go b/macos/coreaudiotypes/coreaudiotypes_structs.go index d4244996..8dd3a36a 100644 --- a/macos/coreaudiotypes/coreaudiotypes_structs.go +++ b/macos/coreaudiotypes/coreaudiotypes_structs.go @@ -1,5 +1,126 @@ package coreaudiotypes -// TODO -type BufferList struct{} -type TimeStamp struct{} +// A structure that represents a timestamp value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiotimestamp?language=objc +type TimeStamp struct { + MSampleTime float64 + MHostTime uint64 + MRateScalar float64 + MWordClockTime uint64 + MSMPTETime SMPTETime + MFlags uint32 + MReserved uint32 +} + +// A structure that represents a continuous range of values. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiovaluerange?language=objc +type ValueRange struct { + MMinimum float64 + MMaximum float64 +} + +// A structure that describes a channel of audio data. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiochanneldescription?language=objc +type ChannelDescription struct { + MChannelLabel uint32 + MChannelFlags uint32 + MCoordinates [3]float32 +} + +// Represents a value from the [audiotoolbox/audio_format_property_identifier/kaudioformatproperty_formatlist] property. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audioformatlistitem?language=objc +type FormatListItem struct { + MASBD StreamBasicDescription + MChannelLayoutTag uint32 + Pad_cgo_0 [4]byte +} + +// A structure that stores buffers to use in translation operations. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiovaluetranslation?language=objc +type ValueTranslation struct { + MInputData uintptr + MInputDataSize uint32 + MOutputData uintptr + MOutputDataSize uint32 + Pad_cgo_0 [4]byte +} + +// A format specification for an audio stream. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiostreambasicdescription?language=objc +type StreamBasicDescription struct { + MSampleRate float64 + MFormatID uint32 + MFormatFlags uint32 + MBytesPerPacket uint32 + MFramesPerPacket uint32 + MBytesPerFrame uint32 + MChannelsPerFrame uint32 + MBitsPerChannel uint32 + MReserved uint32 +} + +// A value that describes a packet in a buffer of audio data. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiostreampacketdescription?language=objc +type StreamPacketDescription struct { + MStartOffset int64 + MVariableFramesInPacket uint32 + MDataByteSize uint32 +} + +// A structure that holds a buffer of audio data. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiobuffer?language=objc +type Buffer struct { + MNumberChannels uint32 + MDataByteSize uint32 + MData uintptr +} + +// A structure that describes an audio codec. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audioclassdescription?language=objc +type ClassDescription struct { + MType uint32 + MSubType uint32 + MManufacturer uint32 +} + +// A structure that stores a variable-length array of audio buffers. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiobufferlist?language=objc +type BufferList struct { + MNumberBuffers uint32 + MBuffers [1]Buffer +} + +// A structure that specifies a channel layout in a file or in hardware. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/audiochannellayout?language=objc +type ChannelLayout struct { + MChannelLayoutTag uint32 + MChannelBitmap uint32 + MNumberChannelDescriptions uint32 + MChannelDescriptions [1]ChannelDescription +} + +// A structure that defines an SMPTE time value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coreaudiotypes/smptetime?language=objc +type SMPTETime struct { + MSubframes int16 + MSubframeDivisor int16 + MCounter uint32 + MType uint32 + MFlags uint32 + MHours int16 + MMinutes int16 + MSeconds int16 + MFrames int16 +} diff --git a/macos/corefoundation/corefoundation_structs.go b/macos/corefoundation/corefoundation_structs.go index bfbdb3c4..e7f31952 100644 --- a/macos/corefoundation/corefoundation_structs.go +++ b/macos/corefoundation/corefoundation_structs.go @@ -1,27 +1,633 @@ package corefoundation -import ( - "unsafe" -) - -type RunLoopRef = unsafe.Pointer -type TypeRef = unsafe.Pointer -type StringRef = unsafe.Pointer -type ReadStreamRef = unsafe.Pointer -type AllocatorRef = unsafe.Pointer -type RunLoopObserverRef = unsafe.Pointer -type RunLoopTimerRef = unsafe.Pointer -type XMLExternalID = unsafe.Pointer -type MachPortRef = unsafe.Pointer -type NotificationCenterRef = unsafe.Pointer -type UserNotificationRef = unsafe.Pointer -type NotificationName = unsafe.Pointer -type DictionaryRef = unsafe.Pointer -type MessagePortRef = unsafe.Pointer -type DataRef = unsafe.Pointer -type SocketRef = unsafe.Pointer -type WriteStreamRef = unsafe.Pointer -type FileDescriptorRef = unsafe.Pointer -type PlugInInstanceRef = unsafe.Pointer -type UUIDRef = unsafe.Pointer -type ArrayRef = unsafe.Pointer +// 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 diff --git a/macos/coregraphics/coregraphics_custom.go b/macos/coregraphics/coregraphics_custom.go index 26e59eeb..7d2812de 100644 --- a/macos/coregraphics/coregraphics_custom.go +++ b/macos/coregraphics/coregraphics_custom.go @@ -1,13 +1 @@ package coregraphics - -import "unsafe" - -// these should be generated but -// type aliases are mostly used for -// enums/constants right now -type ColorRef unsafe.Pointer -type ColorSpaceRef unsafe.Pointer -type ContextRef unsafe.Pointer -type PathRef unsafe.Pointer -type EventRef unsafe.Pointer -type ImageRef unsafe.Pointer diff --git a/macos/coregraphics/coregraphics_structs.go b/macos/coregraphics/coregraphics_structs.go index 9055e277..1582dfb9 100644 --- a/macos/coregraphics/coregraphics_structs.go +++ b/macos/coregraphics/coregraphics_structs.go @@ -1,45 +1,259 @@ package coregraphics -// #import -import "C" -import ( - "unsafe" +// A structure that holds a version and two callback functions for drawing a custom pattern. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpatterncallbacks?language=objc +type PatternCallbacks struct { + Version uint32 + DrawPattern uintptr + ReleaseInfo uintptr +} - "github.com/progrium/macdriver/objc" -) +// A structure that contains pointers to callback functions that manage the copying of data for a data consumer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdataconsumercallbacks?language=objc +type DataConsumerCallbacks struct { + PutBytes uintptr + ReleaseConsumer uintptr +} -// struct def should be sync with struct in +// A reference to frame update’s metadata. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdisplaystreamupdateref?language=objc +type DisplayStreamUpdateRef uintptr -// todo -type PathElement struct{} -type ScreenUpdateMoveDelta struct{} +// A profile that specifies how to interpret a color value for display. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcolorspaceref?language=objc +type ColorSpaceRef uintptr -type ColorConversionInfoRef unsafe.Pointer -type DisplayStreamUpdateRef unsafe.Pointer +// An abstraction for data-reading tasks that eliminates the need to manage a raw memory buffer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdataproviderref?language=objc +type DataProviderRef uintptr -type AffineTransform struct { - A Float - B Float - C Float - D Float - TX Float - TY Float -} +// An opaque data type used to convert PostScript data to PDF data. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpsconverterref?language=objc +type PSConverterRef uintptr + +// A document that contains PDF (Portable Document Format) drawing information. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpdfdocumentref?language=objc +type PDFDocumentRef uintptr + +// A general facility for defining and using callback functions. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgfunctionref?language=objc +type FunctionRef uintptr + +// An object that describes how to convert between color spaces for use by other system services. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcolorconversioninforef?language=objc +type ColorConversionInfoRef uintptr +// A structure that contains a point in a two-dimensional coordinate system. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpoint?language=objc type Point struct { - X Float - Y Float + X float64 + Y float64 +} + +// A Quartz 2D drawing environment. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcontextref?language=objc +type ContextRef uintptr + +// Defines an opaque type that represents a low-level hardware event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgeventref?language=objc +type EventRef uintptr + +// A mutable graphics path: a mathematical description of shapes or lines to be drawn in a graphics context. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgmutablepathref?language=objc +type MutablePathRef uintptr //*_Ctype_struct_CGPath + +// A definition for a smooth transition between colors for drawing radial and axial gradient fills. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cggradientref?language=objc +type GradientRef uintptr + +// Defines a structure containing pointers to client-defined callback functions that manage the sending of data for a sequential-access data provider. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdataprovidersequentialcallbacks?language=objc +type DataProviderSequentialCallbacks struct { + Version uint32 + GetBytes uintptr + SkipForward uintptr + Rewind uintptr + ReleaseInfo uintptr +} + +// A set of character glyphs and layout information for drawing text. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgfontref?language=objc +type FontRef uintptr + +// A structure that contains width and height values. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgsize?language=objc +type Size struct { + Width float64 + Height float64 +} + +// A reference to a display stream object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdisplaystreamref?language=objc +type DisplayStreamRef uintptr + +// A set of components that define a color, with a color space specifying how to interpret them. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcolorref?language=objc +type ColorRef uintptr + +// A definition for a smooth transition between colors, controlled by a custom function you provide, for drawing radial and axial gradient fills. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgshadingref?language=objc +type ShadingRef uintptr + +// A bitmap image or image mask. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgimageref?language=objc +type ImageRef uintptr + +// An abstraction for data-writing tasks that eliminates the need to manage a raw memory buffer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdataconsumerref?language=objc +type DataConsumerRef uintptr + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgcolordataformat?language=objc +type ColorDataFormat struct { + Version uint32 + Colorspace_info uintptr + Bitmap_info uint32 + Bits_per_component uint64 + Bytes_per_row uint64 + Intent uint32 + Decode *float64 +} + +// A 2D pattern to be used for drawing graphics paths. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpatternref?language=objc +type PatternRef uintptr + +// The distance, in pixel units, that an onscreen region moves. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgscreenupdatemovedelta?language=objc +type ScreenUpdateMoveDelta struct { + DX int32 + DY int32 +} + +// Defines pointers to client-defined callback functions that manage the sending of data for a direct-access data provider. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdataproviderdirectcallbacks?language=objc +type DataProviderDirectCallbacks struct { + Version uint32 + GetBytePointer uintptr + ReleaseBytePointer uintptr + GetBytesAtPosition uintptr + ReleaseInfo uintptr +} + +// A reference to a display mode object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdisplaymoderef?language=objc +type DisplayModeRef uintptr + +// A type that represents a page in a PDF document. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpdfpageref?language=objc +type PDFPageRef uintptr + +// A structure that contains a two-dimensional vector. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgvector?language=objc +type Vector struct { + Dx float64 + Dy float64 } +// An offscreen context for reusing content drawn with Core Graphics. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cglayerref?language=objc +type LayerRef uintptr + +// Defines an opaque type that represents the source of a Quartz event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgeventsourceref?language=objc +type EventSourceRef uintptr + +// A structure that contains the location and dimensions of a rectangle. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgrect?language=objc type Rect struct { Origin Point Size Size } -type Size struct { - Width Float - Height Float +// A structure that contains callbacks needed by a CGFunctionRef object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgfunctioncallbacks?language=objc +type FunctionCallbacks struct { + Version uint32 + Evaluate uintptr + ReleaseInfo uintptr +} + +// A data structure that provides information about a path element. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpathelement?language=objc +type PathElement struct { + Type uint32 + Points *Point } -var RectNull = objc.ForceCast[C.CGRect, Rect](C.CGRectNull) -var RectInfinite = objc.ForceCast[C.CGRect, Rect](C.CGRectInfinite) +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgdevicecolor?language=objc +type DeviceColor struct { + Red float32 + Green float32 + Blue float32 +} + +// Defines the structure used to report information about event taps. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgeventtapinformation?language=objc +type EventTapInformation struct { + EventTapID uint32 + TapPoint uint32 + Options uint32 + EventsOfInterest uint64 + TappingProcess int32 + ProcessBeingTapped int32 + Enabled bool + MinUsecLatency float32 + AvgUsecLatency float32 + MaxUsecLatency float32 +} + +// A structure for holding the callbacks provided when you create a PostScript converter object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coregraphics/cgpsconvertercallbacks?language=objc +type PSConverterCallbacks struct { + Version uint32 + BeginDocument uintptr + EndDocument uintptr + BeginPage uintptr + EndPage uintptr + NoteProgress uintptr + NoteMessage uintptr + ReleaseInfo uintptr +} diff --git a/macos/corelocation/corelocation_structs.go b/macos/corelocation/corelocation_structs.go index 764bd285..f59a8b17 100644 --- a/macos/corelocation/corelocation_structs.go +++ b/macos/corelocation/corelocation_structs.go @@ -1,6 +1,9 @@ package corelocation +// The latitude and longitude associated with a location, specified using the WGS 84 reference frame. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corelocation/cllocationcoordinate2d?language=objc type LocationCoordinate2D struct { - Latitude LocationDegrees - Longitude LocationDegrees + Latitude float64 + Longitude float64 } diff --git a/macos/coremedia/coremedia_structs.go b/macos/coremedia/coremedia_structs.go index 220d8c96..c829c905 100644 --- a/macos/coremedia/coremedia_structs.go +++ b/macos/coremedia/coremedia_structs.go @@ -1,19 +1,116 @@ package coremedia -import "unsafe" - -// todo -type TimeMapping struct{} -type TimeRange struct{} -type Time struct{} -type VideoDimensions struct{} - -type SampleBufferRef unsafe.Pointer -type BufferRef unsafe.Pointer -type BufferQueueRef unsafe.Pointer -type FormatDescriptionRef unsafe.Pointer -type MetadataFormatDescriptionRef unsafe.Pointer -type ClockRef unsafe.Pointer -type TimebaseRef unsafe.Pointer -type VideoFormatDescriptionRef unsafe.Pointer -type AudioFormatDescriptionRef unsafe.Pointer +import "github.com/progrium/macdriver/macos/corefoundation" + +// A structure that maps a segment of a source time range to a target time range. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmtimemapping?language=objc +type TimeMapping struct { + Source TimeRange + Target TimeRange +} + +// An object that describes a media format descriptor. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmformatdescriptionref?language=objc +type FormatDescriptionRef uintptr + +// A structure that represents time. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmtime?language=objc +type Time struct { + Value int64 + Timescale int32 + Flags uint32 + Epoch int64 +} + +// A structure to support custom memory allocation and deallocation for a block used in a block buffer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmblockbuffercustomblocksource?language=objc +type BlockBufferCustomBlockSource struct { + Version uint32 + Pad_cgo_0 [24]byte +} + +// A structure that stores the callbacks that perform buffer operations. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmbuffercallbacks?language=objc +type BufferCallbacks struct { + Version uint32 + Pad_cgo_0 [64]byte +} + +// A reference to a block buffer object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmblockbufferref?language=objc +type BlockBufferRef uintptr + +// A structure that stores the handlers that perform buffer operations. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmbufferhandlers?language=objc +type BufferHandlers struct { + Version uint64 + GetDecodeTimeStamp uintptr // *_Ctype_struct___3 + GetPresentationTimeStamp uintptr // *_Ctype_struct___3 + GetDuration uintptr // *_Ctype_struct___3 + IsDataReady uintptr // *_Ctype_struct___4 + Compare uintptr // *_Ctype_struct___5 + DataBecameReadyNotification corefoundation.StringRef //*_Ctype_struct___CFString + GetSize uintptr // *_Ctype_struct___6 +} + +// A structure that represents a time range. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmtimerange?language=objc +type TimeRange struct { + Start Time + Duration Time +} + +// A reference to an object that provides a simple lockless queue of elements. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmsimplequeueref?language=objc +type SimpleQueueRef uintptr + +// A collection of timing information for a sample in a sample buffer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmsampletiminginfo?language=objc +type SampleTimingInfo struct { + Duration Time + PresentationTimeStamp Time + DecodeTimeStamp Time +} + +// A reference to an immutable sample buffer object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmsamplebufferref?language=objc +type SampleBufferRef uintptr + +// An object that represents a source of time. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmclockref?language=objc +type ClockRef uintptr + +// A structure that represents video dimensions. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmvideodimensions?language=objc +type VideoDimensions struct { + Width int32 + Height int32 +} + +// A reference to a memory pool object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmmemorypoolref?language=objc +type MemoryPoolRef uintptr + +// A model of a timeline under application control. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmtimebaseref?language=objc +type TimebaseRef uintptr + +// A reference to a buffer queue object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremedia/cmbufferqueueref?language=objc +type BufferQueueRef uintptr diff --git a/macos/coremediaio/coremediaio_structs.go b/macos/coremediaio/coremediaio_structs.go new file mode 100644 index 00000000..e73b8915 --- /dev/null +++ b/macos/coremediaio/coremediaio_structs.go @@ -0,0 +1,67 @@ +package coremediaio + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremediaio/cmiodeviceavccommand?language=objc +type DeviceAVCCommand struct { + MCommand *uint8 + MCommandLength uint32 + Pad_cgo_0 [8]byte + MResponseLength uint32 + MResponseUsed uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremediaio/cmiodevicers422command?language=objc +type DeviceRS422Command struct { + MCommand *uint8 + MCommandLength uint32 + Pad_cgo_0 [8]byte + MResponseLength uint32 + MResponseUsed uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremediaio/cmiodevicesmptetimecallback?language=objc +type DeviceSMPTETimeCallback struct { + MGetSMPTETimeProc uintptr + MRefCon uintptr +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremediaio/cmiostreamscheduledoutputnotificationprocandrefcon?language=objc +type StreamScheduledOutputNotificationProcAndRefCon struct { + ScheduledOutputNotificationProc uintptr + ScheduledOutputNotificationRefCon uintptr +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremediaio/cmiodevicestreamconfiguration?language=objc +type DeviceStreamConfiguration struct { + MNumberStreams uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremediaio/cmioobjectpropertyaddress?language=objc +type ObjectPropertyAddress struct { + MSelector uint32 + MScope uint32 + MElement uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremediaio/cmiostreamdeck?language=objc +type StreamDeck struct { + MStatus uint32 + MState uint32 + MState2 uint32 +} + +// TODO (unable to generate): +// CMIOHardwarePlugInInterface diff --git a/macos/coremidi/coremidi_structs.go b/macos/coremidi/coremidi_structs.go index 903872ff..483ed889 100644 --- a/macos/coremidi/coremidi_structs.go +++ b/macos/coremidi/coremidi_structs.go @@ -1,7 +1,227 @@ package coremidi -type SysexSendRequest struct{} -type EventList struct{} -type PacketList struct{} -type Notification struct{} -type UniversalMessage struct{} +import "github.com/progrium/macdriver/macos/corefoundation" + +// A 96-bit MIDI message. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midimessage_96?language=objc +type Message_96 struct { + Word0 uint32 + Word1 uint32 + Word2 uint32 +} + +// A series of simultaneous MIDI events in Universal MIDI Packets (UMP) format. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midieventpacket?language=objc +type EventPacket struct { + TimeStamp uint64 + WordCount uint32 + Words [64]uint32 +} + +// A custom lookup table to transform MIDI 7-bit values, as contained in note numbers, velocities, control values, and so on. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midivaluemap?language=objc +type ValueMap struct { + Value [128]uint8 +} + +// The interface to a MIDI driver. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/mididriverinterface?language=objc +type DriverInterface struct { + X_reserved uintptr + QueryInterface uintptr + AddRef uintptr + Release uintptr + FindDevices uintptr + Start uintptr + Stop uintptr + Configure uintptr + Send uintptr + EnableSource uintptr + Flush uintptr + Monitor uintptr + SendPackets uintptr + MonitorEvents uintptr +} + +// A structure that describes a MIDI-CI device. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midicideviceidentification?language=objc +type CIDeviceIdentification struct { + Manufacturer [3]uint8 + Family [2]uint8 + ModelNumber [2]uint8 + RevisionLevel [4]uint8 + Reserved [5]uint8 +} + +// The transformation of a single type of MIDI event. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/miditransform?language=objc +type Transform struct { + Transform uint16 + Param int16 +} + +// A 64-bit MIDI message. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midimessage_64?language=objc +type Message_64 struct { + Word0 uint32 + Word1 uint32 +} + +// A request to asynchronously transmit a single System Exclusive (SysEx) event to a destination. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midisysexsendrequest?language=objc +type SysexSendRequest struct { + Destination uint32 + Data *uint8 + BytesToSend uint32 + Complete uint8 + Reserved [3]uint8 + CompletionProc uintptr + CompletionRefCon uintptr +} + +// A message that describes the change to an object property. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midiobjectpropertychangenotification?language=objc +type ObjectPropertyChangeNotification struct { + MessageID uint32 + MessageSize uint32 + Object uint32 + ObjectType int32 + PropertyName corefoundation.StringRef //*_Ctype_struct___CFString +} + +// A message that describes a system state change. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midinotification?language=objc +type Notification struct { + MessageID uint32 + MessageSize uint32 +} + +// A general I/O error notification. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midiioerrornotification?language=objc +type IOErrorNotification struct { + MessageID uint32 + MessageSize uint32 + DriverDevice uint32 + ErrorCode int32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midiuniversalmessage?language=objc +type UniversalMessage struct { + Type uint32 + Group uint8 + Reserved [3]uint8 + Utility uintptr // _Ctype_struct___0 + Pad_cgo_0 [12]byte +} + +// A set of MIDI routings and transformations. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midithruconnectionparams?language=objc +type ThruConnectionParams struct { + Version uint32 + NumSources uint32 + Sources [8]ThruConnectionEndpoint + NumDestinations uint32 + Destinations [8]ThruConnectionEndpoint + ChannelMap [16]uint8 + LowVelocity uint8 + HighVelocity uint8 + LowNote uint8 + HighNote uint8 + NoteNumber Transform + Velocity Transform + KeyPressure Transform + ChannelPressure Transform + ProgramChange Transform + PitchBend Transform + FilterOutSysEx uint8 + FilterOutMTC uint8 + FilterOutBeatClock uint8 + FilterOutTuneRequest uint8 + Reserved2 [3]uint8 + FilterOutAllControls uint8 + NumControlTransforms uint16 + NumMaps uint16 + Reserved3 [4]uint16 +} + +// A source or destination in a MIDI thru connection. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midithruconnectionendpoint?language=objc +type ThruConnectionEndpoint struct { + EndpointRef uint32 + UniqueID int32 +} + +// A list of MIDI events the system sends to or receives from an endpoint. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midipacketlist?language=objc +type PacketList struct { + NumPackets uint32 + Pad_cgo_0 [268]byte +} + +// A 128-bit MIDI message. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midimessage_128?language=objc +type Message_128 struct { + Word0 uint32 + Word1 uint32 + Word2 uint32 + Word3 uint32 +} + +// A collection of simultaneous MIDI events. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midipacket?language=objc +type Packet struct { + TimeStamp uint64 + Length uint16 + Data [256]uint8 + Pad_cgo_0 [2]byte +} + +// A variable-length list of MIDI event packets. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midieventlist?language=objc +type EventList struct { + Protocol uint32 + NumPackets uint32 + Packet [1]EventPacket +} + +// A structure that describes the transformation of MIDI control change events. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midicontroltransform?language=objc +type ControlTransform struct { + ControlType uint8 + RemappedControlType uint8 + ControlNumber uint16 + Transform uint16 + Param int16 +} + +// A message that describes the addition or removal of an object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/coremidi/midiobjectaddremovenotification?language=objc +type ObjectAddRemoveNotification struct { + MessageID uint32 + MessageSize uint32 + Parent uint32 + ParentType int32 + Child uint32 + ChildType int32 +} diff --git a/macos/corevideo/corevideo_structs.go b/macos/corevideo/corevideo_structs.go index dddf5dc7..f2f039a3 100644 --- a/macos/corevideo/corevideo_structs.go +++ b/macos/corevideo/corevideo_structs.go @@ -1,11 +1,111 @@ package corevideo -import "unsafe" +// A reference to a pixel buffer pool object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvpixelbufferpoolref?language=objc +type PixelBufferPoolRef uintptr -type PixelBufferRef unsafe.Pointer -type ImageBufferRef unsafe.Pointer -type DisplayLinkRef unsafe.Pointer -type PixelBufferPoolRef unsafe.Pointer +// A structure for describing YCbCr biplanar buffers. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvplanarpixelbufferinfo_ycbcrbiplanar?language=objc +type PlanarPixelBufferInfo_YCbCrBiPlanar struct { + ComponentInfoY PlanarComponentInfo + ComponentInfoCbCr PlanarComponentInfo +} -// todo -type TimeStamp struct{} +// A structure for holding an SMPTE time. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvsmptetime?language=objc +type SMPTETime struct { + Subframes int16 + SubframeDivisor int16 + Counter uint32 + Type uint32 + Flags uint32 + Hours int16 + Minutes int16 + Seconds int16 + Frames int16 +} + +// A structure for describing planar buffers. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvplanarpixelbufferinfo?language=objc +type PlanarPixelBufferInfo struct { + ComponentInfo [1]PlanarComponentInfo +} + +// A reference to a Core Video buffer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvbufferref?language=objc +type BufferRef uintptr //*_Ctype_struct___CVBuffer + +// A structure for holding information that describes a custom extended pixel fill algorithm. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvfillextendedpixelscallbackdata?language=objc +type FillExtendedPixelsCallBackData struct { + Version int64 + FillCallBack uintptr + RefCon uintptr +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvopengltexturecacheref?language=objc +type OpenGLTextureCacheRef uintptr + +// A structure for defining a display timestamp. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvtimestamp?language=objc +type TimeStamp struct { + Version uint32 + VideoTimeScale int32 + VideoTime int64 + HostTime uint64 + RateScalar float64 + VideoRefreshPeriod int64 + SmpteTime SMPTETime + Flags uint64 + Reserved uint64 +} + +// A reference to a Core Video Metal texture cache. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvmetaltexturecacheref?language=objc +type MetalTextureCacheRef uintptr + +// A structure for describing YCbCr planar buffers. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvplanarpixelbufferinfo_ycbcrplanar?language=objc +type PlanarPixelBufferInfo_YCbCrPlanar struct { + ComponentInfoY PlanarComponentInfo + ComponentInfoCb PlanarComponentInfo + ComponentInfoCr PlanarComponentInfo +} + +// A reference to a display link object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvdisplaylinkref?language=objc +type DisplayLinkRef uintptr + +// A structure for reporting Core Video time values. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvtime?language=objc +type Time struct { + TimeValue int64 + TimeScale int32 + Flags int32 +} + +// A reference to an OpenGL buffer pool object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvopenglbufferpoolref?language=objc +type OpenGLBufferPoolRef uintptr + +// A structure for describing planar components. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/corevideo/cvplanarcomponentinfo?language=objc +type PlanarComponentInfo struct { + Offset int32 + RowBytes uint32 +} diff --git a/macos/fileprovider/fileprovider_structs.go b/macos/fileprovider/fileprovider_structs.go new file mode 100644 index 00000000..03642c66 --- /dev/null +++ b/macos/fileprovider/fileprovider_structs.go @@ -0,0 +1,17 @@ +package fileprovider + +// A structure that contains the file type and file creator codes for an item. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/fileprovider/nsfileprovidertypeandcreator?language=objc +type FileProviderTypeAndCreator struct { + Type uint32 + Creator uint32 +} + +// A structure that contains the file type and file creator codes for an item. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/fileprovider/nsfileprovidertypeandcreator?language=objc +type FileProviderTypeAndCreator struct { + Type uint32 + Creator uint32 +} diff --git a/macos/foundation/foundation_custom.go b/macos/foundation/foundation_custom.go index ce89961a..3381ad69 100644 --- a/macos/foundation/foundation_custom.go +++ b/macos/foundation/foundation_custom.go @@ -5,9 +5,24 @@ import ( "reflect" "unsafe" + "github.com/progrium/macdriver/macos/coregraphics" "github.com/progrium/macdriver/objc" ) +type AppleEventManagerSuspensionID unsafe.Pointer +type RangePointer unsafe.Pointer +type RectPointer unsafe.Pointer +type PointPointer unsafe.Pointer +type RectArray unsafe.Pointer +type SizeArray unsafe.Pointer +type PointArray unsafe.Pointer + +type PropertyListReadOptions PropertyListMutabilityOptions + +type Point = coregraphics.Point +type Size = coregraphics.Size +type Rect = coregraphics.Rect + func (N *String) String() string { return objc.ToGoString(N.Ptr()) } diff --git a/macos/foundation/foundation_structs.go b/macos/foundation/foundation_structs.go index cb2c7080..5d5c26da 100644 --- a/macos/foundation/foundation_structs.go +++ b/macos/foundation/foundation_structs.go @@ -1,63 +1,115 @@ package foundation -import ( - "unsafe" - - "github.com/progrium/macdriver/macos/coregraphics" - "github.com/progrium/macdriver/objc" -) - -// struct define should be synced with +// Allows successive elements of a hash table to be returned each time this structure is passed to [foundation/nsnexthashenumeratoritem]. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nshashenumerator?language=objc +type HashEnumerator struct { + X_pi uint64 + X_si uint64 + X_bs uintptr +} -type AppleEventManagerSuspensionID unsafe.Pointer -type RangePointer unsafe.Pointer -type RectPointer unsafe.Pointer -type PointPointer unsafe.Pointer -type RectArray unsafe.Pointer -type SizeArray unsafe.Pointer -type PointArray unsafe.Pointer +// The function pointers used to configure behavior of NSMapTable with respect to key elements within a map table. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsmaptablekeycallbacks?language=objc +type MapTableKeyCallBacks struct { + Hash uintptr + IsEqual uintptr + Retain uintptr + Release uintptr + Describe uintptr + NotAKeyMarker uintptr +} -// todo -type FastEnumerationState struct{} -type OperatingSystemVersion struct{} +// A structure representing a base-10 number. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsdecimal?language=objc +type Decimal struct { + Pad_cgo_0 [4]byte + X_mantissa [8]uint16 +} -type PropertyListReadOptions PropertyListMutabilityOptions +// Opaque type containing an endian-independent float value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsswappedfloat?language=objc +type SwappedFloat struct { + V uint32 +} -type Point = coregraphics.Point -type Size = coregraphics.Size -type Rect = coregraphics.Rect +// Allows successive elements of a map table to be returned each time this structure is passed to [foundation/nsnextmapenumeratorpair]. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsmapenumerator?language=objc +type MapEnumerator struct { + X_pi uint64 + X_si uint64 + X_bs uintptr +} +// A description of the distance between the edges of two rectangles. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsedgeinsets?language=objc type EdgeInsets struct { - Top coregraphics.Float - Left coregraphics.Float - Bottom coregraphics.Float - Right coregraphics.Float + Top float64 + Left float64 + Bottom float64 + Right float64 } -type Range struct { - Location objc.UInteger - Length objc.UInteger +// Opaque structure containing endian-independent double value. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsswappeddouble?language=objc +type SwappedDouble struct { + V uint64 } +// A structure that defines the three-by-three matrix that performs an affine transform between two coordinate systems. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsaffinetransformstruct?language=objc type AffineTransformStruct struct { - M11 coregraphics.Float - M12 coregraphics.Float - M21 coregraphics.Float - M22 coregraphics.Float - TX coregraphics.Float - TY coregraphics.Float -} - -/* - signed int _exponent:8; - unsigned int _length:4; // length == 0 && isNegative -> NaN - unsigned int _isNegative:1; - unsigned int _isCompact:1; - unsigned int _reserved:18; - unsigned short _mantissa[NSDecimalMaxSize];//NSDecimalMaxSize=8 -*/ + M11 float64 + M12 float64 + M21 float64 + M22 float64 + TX float64 + TY float64 +} -type Decimal struct { - _ [4]byte - _mantissa [8]uint16 +// A structure that contains version information about the currently executing operating system, including major, minor, and patch version numbers. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsoperatingsystemversion?language=objc +type OperatingSystemVersion struct { + MajorVersion int64 + MinorVersion int64 + PatchVersion int64 +} + +// Defines a structure that contains the function pointers used to configure behavior of NSHashTable with respect to elements within a hash table. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nshashtablecallbacks?language=objc +type HashTableCallBacks struct { + Hash uintptr + IsEqual uintptr + Retain uintptr + Release uintptr + Describe uintptr } + +// A structure used to describe a portion of a series, such as characters in a string or objects in an array. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsrange?language=objc +type Range struct { + Location uint64 + Length uint64 +} + +// The function pointers used to configure behavior of NSMapTable with respect to value elements within a map table. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/foundation/nsmaptablevaluecallbacks?language=objc +type MapTableValueCallBacks struct { + Retain uintptr + Release uintptr + Describe uintptr +} + +// TODO (unable to generate): +// NSFastEnumerationState diff --git a/macos/imageio/imageio_structs.go b/macos/imageio/imageio_structs.go index 4c9d9a18..c67fcbde 100644 --- a/macos/imageio/imageio_structs.go +++ b/macos/imageio/imageio_structs.go @@ -1,6 +1,21 @@ package imageio -import "unsafe" +// An opaque type that you use to write image data to a URL, data object, or data consumer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/imageio/cgimagedestinationref?language=objc +type ImageDestinationRef uintptr -type ImageSourceRef unsafe.Pointer -type ImageMetadataTagRef unsafe.Pointer +// An opaque type that you use to read image data from a URL, data object, or data consumer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/imageio/cgimagesourceref?language=objc +type ImageSourceRef uintptr + +// An immutable type that contains information about a single piece of image metadata. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/imageio/cgimagemetadatatagref?language=objc +type ImageMetadataTagRef uintptr + +// An immutable object that contains the XMP metadata associated with an image. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/imageio/cgimagemetadataref?language=objc +type ImageMetadataRef uintptr diff --git a/macos/iosurface/iosurface_structs.go b/macos/iosurface/iosurface_structs.go index a73089e1..88236611 100644 --- a/macos/iosurface/iosurface_structs.go +++ b/macos/iosurface/iosurface_structs.go @@ -1,6 +1,6 @@ package iosurface -import "unsafe" - -// https://developer.apple.com/documentation/iosurface/iosurfaceref?language=objc -type Ref unsafe.Pointer +// Data type representing an IOSurface opaque object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/iosurface/iosurfaceref?language=objc +type Ref uintptr diff --git a/macos/metal/metal_custom.go b/macos/metal/metal_custom.go new file mode 100644 index 00000000..56bdc336 --- /dev/null +++ b/macos/metal/metal_custom.go @@ -0,0 +1,8 @@ +package metal + +import "unsafe" + +type AutoreleasedComputePipelineReflection unsafe.Pointer +type AutoreleasedRenderPipelineReflection unsafe.Pointer + +type Coordinate2D = SamplePosition diff --git a/macos/metal/metal_structs.go b/macos/metal/metal_structs.go index 28d3de2e..637beedc 100644 --- a/macos/metal/metal_structs.go +++ b/macos/metal/metal_structs.go @@ -1,21 +1,281 @@ package metal -import "unsafe" - -type Coordinate2D = SamplePosition - -// todo -type Region struct{} -type Origin struct{} -type TextureSwizzleChannels struct{} -type Size struct{} -type Viewport struct{} -type ScissorRect struct{} -type VertexAmplificationViewMapping struct{} -type SizeAndAlign struct{} -type SamplePosition struct{} -type ClearColor struct{} -type AccelerationStructureSizes struct{} - -type AutoreleasedComputePipelineReflection unsafe.Pointer -type AutoreleasedRenderPipelineReflection unsafe.Pointer +// The per-patch tessellation factors for a quad patch. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlquadtessellationfactorshalf?language=objc +type QuadTessellationFactorsHalf struct { + EdgeTessellationFactor [4]uint16 + InsideTessellationFactor [2]uint16 +} + +// The data layout for mapping sparse texture regions when using indirect commands. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlmapindirectarguments?language=objc +type MapIndirectArguments struct { + RegionOriginX uint32 + RegionOriginY uint32 + RegionOriginZ uint32 + RegionSizeWidth uint32 + RegionSizeHeight uint32 + RegionSizeDepth uint32 + MipMapLevel uint32 + SliceId uint32 +} + +// The per-patch tessellation factors for a triangle patch. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtltriangletessellationfactorshalf?language=objc +type TriangleTessellationFactorsHalf struct { + EdgeTessellationFactor [3]uint16 + InsideTessellationFactor uint16 +} + +// An RGBA value used for a color pixel. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlclearcolor?language=objc +type ClearColor struct { + Red float64 + Green float64 + Blue float64 + Alpha float64 +} + +// A description of an instance in an instanced geometry acceleration structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlaccelerationstructureinstancedescriptor?language=objc +type AccelerationStructureInstanceDescriptor struct { + TransformationMatrix PackedFloat4x3 + Options uint32 + Mask uint32 + IntersectionFunctionTableOffset uint32 + AccelerationStructureIndex uint32 +} + +// A description of an instance in an instanced geometry acceleration structure, with the instance including a user identifier and motion data for the instance. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlaccelerationstructuremotioninstancedescriptor?language=objc +type AccelerationStructureMotionInstanceDescriptor struct { + Options uint32 + Mask uint32 + IntersectionFunctionTableOffset uint32 + AccelerationStructureIndex uint32 + UserID uint32 + MotionTransformsStartIndex uint32 + MotionTransformsCount uint32 + MotionStartBorderMode uint32 + MotionEndBorderMode uint32 + MotionStartTime float32 + MotionEndTime float32 +} + +// A description of an instance in an instanced geometry acceleration structure, with the instance including a user identifier for the instance. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlaccelerationstructureuseridinstancedescriptor?language=objc +type AccelerationStructureUserIDInstanceDescriptor struct { + TransformationMatrix PackedFloat4x3 + Options uint32 + Mask uint32 + IntersectionFunctionTableOffset uint32 + AccelerationStructureIndex uint32 + UserID uint32 +} + +// The dimensions of an object. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlsize?language=objc +type Size struct { + Width uint64 + Height uint64 + Depth uint64 +} + +// The bounds for a subset of an object's elements. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlregion?language=objc +type Region struct { + Origin Origin + Size Size +} + +// The data layout required for the arguments needed to specify the stage-in region. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlstageinregionindirectarguments?language=objc +type StageInRegionIndirectArguments struct { + StageInOrigin [3]uint32 + StageInSize [3]uint32 +} + +// A range of commands in an indirect command buffer. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlindirectcommandbufferexecutionrange?language=objc +type IndirectCommandBufferExecutionRange struct { + Location uint32 + Length uint32 +} + +// The data layout required for drawing patches via indirect buffer calls. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtldrawpatchindirectarguments?language=objc +type DrawPatchIndirectArguments struct { + PatchCount uint32 + InstanceCount uint32 + PatchStart uint32 + BaseInstance uint32 +} + +// The data layout required for drawing primitives via indirect buffer calls. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtldrawprimitivesindirectarguments?language=objc +type DrawPrimitivesIndirectArguments struct { + VertexCount uint32 + InstanceCount uint32 + VertexStart uint32 + BaseInstance uint32 +} + +// A structure that contains the top three rows of a 4x4 matrix of 32-bit floating-point values, in column-major order. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlpackedfloat4x3?language=objc +type PackedFloat4x3 struct { + Columns [4]PackedFloat3 +} + +// A 3D rectangular region for the viewport clipping. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlviewport?language=objc +type Viewport struct { + OriginX float64 + OriginY float64 + Width float64 + Height float64 + Znear float64 + Zfar float64 +} + +// The data structure for storing the data you resolve from a stage-utilization counter set. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlcounterresultstageutilization?language=objc +type CounterResultStageUtilization struct { + TotalCycles uint64 + VertexCycles uint64 + TessellationCycles uint64 + PostTessellationVertexCycles uint64 + FragmentCycles uint64 + RenderTargetCycles uint64 +} + +// A pattern that modifies the data read or sampled from a texture by rearranging or duplicating the elements of a vector. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtltextureswizzlechannels?language=objc +type TextureSwizzleChannels struct { + Red uint8 + Green uint8 + Blue uint8 + Alpha uint8 +} + +// The data layout required for the arguments needed to specify the size of threadgroups. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtldispatchthreadgroupsindirectarguments?language=objc +type DispatchThreadgroupsIndirectArguments struct { + ThreadgroupsPerGrid [3]uint32 +} + +// The bounds for an axis-aligned bounding box. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlaxisalignedboundingbox?language=objc +type AxisAlignedBoundingBox struct { + Min PackedFloat3 + Max PackedFloat3 +} + +// An offset applied to a render target index and viewport index. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlvertexamplificationviewmapping?language=objc +type VertexAmplificationViewMapping struct { + ViewportArrayIndexOffset uint32 + RenderTargetArrayIndexOffset uint32 +} + +// The size and alignment of a resource, in bytes. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlsizeandalign?language=objc +type SizeAndAlign struct { + Size uint64 + Align uint64 +} + +// A structure that contains three 32-bit floating-point values with no additional padding. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlpackedfloat3?language=objc +type PackedFloat3 struct { + Anon0 [12]byte +} + +// The data structure for storing the data you resolve from a statistic counter set. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlcounterresultstatistic?language=objc +type CounterResultStatistic struct { + TessellationInputPatches uint64 + VertexInvocations uint64 + PostTessellationVertexInvocations uint64 + ClipperInvocations uint64 + ClipperPrimitivesOut uint64 + FragmentInvocations uint64 + FragmentsPassed uint64 + ComputeKernelInvocations uint64 +} + +// The coordinates for the front upper-left corner of a region. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlorigin?language=objc +type Origin struct { + X uint64 + Y uint64 + Z uint64 +} + +// The data layout required for drawing indexed primitives via indirect buffer calls. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtldrawindexedprimitivesindirectarguments?language=objc +type DrawIndexedPrimitivesIndirectArguments struct { + IndexCount uint32 + InstanceCount uint32 + IndexStart uint32 + BaseVertex int32 + BaseInstance uint32 +} + +// The expected sizes for a ray-tracing acceleration structure. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlaccelerationstructuresizes?language=objc +type AccelerationStructureSizes struct { + AccelerationStructureSize uint64 + BuildScratchBufferSize uint64 + RefitScratchBufferSize uint64 +} + +// A sample position on a subpixel grid. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlsampleposition?language=objc +type SamplePosition struct { + X float32 + Y float32 +} + +// The data structure for storing the data you resolve from a timestamp counter set. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlcounterresulttimestamp?language=objc +type CounterResultTimestamp struct { + Timestamp uint64 +} + +// A rectangle for the scissor fragment test. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/mtlscissorrect?language=objc +type ScissorRect struct { + X uint64 + Y uint64 + Width uint64 + Height uint64 +} diff --git a/macos/mps/mps_structs.go b/macos/mps/mps_structs.go index cc2e0467..2fab8cd4 100644 --- a/macos/mps/mps_structs.go +++ b/macos/mps/mps_structs.go @@ -1,36 +1,344 @@ package mps -// TODO: +// A 3D ray with an origin, a direction, and a mask to filter out intersections. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsrayoriginmaskdirectionmaxdistance?language=objc +type RayOriginMaskDirectionMaxDistance struct { + Origin PackedFloat3 + Mask uint32 + Direction PackedFloat3 + MaxDistance float32 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsregion?language=objc -type Region struct{} +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsdimensionslice?language=objc +type DimensionSlice struct { + Start uint64 + Length uint64 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsoffset?language=objc -type Offset struct{} +// A region of an image. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsregion?language=objc +type Region struct { + Origin Origin + Size Size +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsstatetextureinfo?language=objc -type StateTextureInfo struct{} +// A structure that specifies keypoint information. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsimagekeypointdata?language=objc +type ImageKeypointData struct { + KeypointCoordinate [2]uint16 + KeypointColorValue float32 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsimagekeypointrangeinfo?language=objc -type ImageKeypointRangeInfo struct{} +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpscustomkernelsourceinfo?language=objc +type CustomKernelSourceInfo struct { + KernelOrigin [2]int16 + KernelPhase [2]uint16 + KernelSize [2]uint16 + Offset [2]int16 + Stride [2]uint16 + DilationRate [2]uint16 + FeatureChannelOffset uint16 + FeatureChannels uint16 + ImageArrayOffset uint16 + ImageArraySize uint16 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsimagehistograminfo?language=objc -type ImageHistogramInfo struct{} +// An intersection result that contains the origin-intersection distance, and intersected primitive and instance indices. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindexinstanceindex?language=objc +type IntersectionDistancePrimitiveIndexInstanceIndex struct { + Distance float32 + PrimitiveIndex uint32 + InstanceIndex uint32 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsscaletransform?language=objc -type ScaleTransform struct{} +// Parameters that control reading and writing of a particular set of feature channels. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsimagereadwriteparams?language=objc +type ImageReadWriteParams struct { + FeatureChannelOffset uint64 + NumberOfFeatureChannelsToReadWrite uint64 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsmatrixcopyoffsets?language=objc -type MatrixCopyOffsets struct{} +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsndarraysizes?language=objc +type NDArraySizes struct { + Dimensions [16]uint64 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsdimensionslice?language=objc -type DimensionSlice struct{} +// Parameters that define the parts of a division operation. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintegerdivisionparams?language=objc +type IntegerDivisionParams struct { + Divisor uint16 + Recip uint16 + Addend uint16 + Shift uint16 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsimagecoordinate?language=objc -type ImageCoordinate struct{} +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindexbufferindexinstanceindexcoordinates?language=objc +type IntersectionDistancePrimitiveIndexBufferIndexInstanceIndexCoordinates struct { + Distance float32 + PrimitiveIndex uint32 + BufferIndex uint32 + InstanceIndex uint32 + Coordinates [2]float32 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsndarrayoffsets?language=objc -type NDArrayOffsets struct{} +// An intersection result that contains the distance from the ray origin to the intersection point. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistance?language=objc +type IntersectionDistance struct { + Distance float32 +} -// https://developer.apple.com/documentation/metalperformanceshaders/mpsimagereadwriteparams?language=objc -type ImageReadWriteParams struct{} +// An axis-aligned bounding box. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsaxisalignedboundingbox?language=objc +type AxisAlignedBoundingBox struct { + Min [3]float32 + Pad_cgo_0 [4]byte + Max [3]float32 + Pad_cgo_1 [4]byte +} + +// A structure that specifies information to find the keypoints in an image. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsimagekeypointrangeinfo?language=objc +type ImageKeypointRangeInfo struct { + MaximumKeypoints uint64 + MinimumThresholdValue float32 + Pad_cgo_0 [4]byte +} + +// A 3D ray with an origin and a direction. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsrayorigindirection?language=objc +type RayOriginDirection struct { + Origin [3]float32 + Pad_cgo_0 [4]byte + Direction [3]float32 + Pad_cgo_1 [4]byte +} + +// A signed coordinate with x, y, and z components. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsoffset?language=objc +type Offset struct { + X int64 + Y int64 + Z int64 +} + +// An encapsulation of a texture's dimensions, format, type, and usage. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsstatetextureinfo?language=objc +type StateTextureInfo struct { + Width uint64 + Height uint64 + Depth uint64 + ArrayLength uint64 + PixelFormat uint64 + TextureType uint64 + Usage uint64 + X_reserved [4]uint64 +} + +// An intersection result that contains the distance from the ray origin to the intersection point, and the index of the intersected primitive. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindex?language=objc +type IntersectionDistancePrimitiveIndex struct { + Distance float32 + PrimitiveIndex uint32 +} + +// A transform matrix for explicit resampling control with a Lanczos kernel. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsscaletransform?language=objc +type ScaleTransform struct { + ScaleX float64 + ScaleY float64 + TranslateX float64 + TranslateY float64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindexbufferindexinstanceindex?language=objc +type IntersectionDistancePrimitiveIndexBufferIndexInstanceIndex struct { + Distance float32 + PrimitiveIndex uint32 + BufferIndex uint32 + InstanceIndex uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindexbufferindexcoordinates?language=objc +type IntersectionDistancePrimitiveIndexBufferIndexCoordinates struct { + Distance float32 + PrimitiveIndex uint32 + BufferIndex uint32 + Pad_cgo_0 [4]byte + Coordinates [2]float32 +} + +// A structure that contains the number of destination, source, and broadcaset textures used by a custom kernel. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpscustomkernelargumentcount?language=objc +type CustomKernelArgumentCount struct { + DestinationTextureCount uint64 + SourceTextureCount uint64 + BroadcastTextureCount uint64 +} + +// An intersection result that contains the origin-intersection distance, intersected primitive and instance indices, and intersection point coordinates. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindexinstanceindexcoordinates?language=objc +type IntersectionDistancePrimitiveIndexInstanceIndexCoordinates struct { + Distance float32 + PrimitiveIndex uint32 + InstanceIndex uint32 + Pad_cgo_0 [4]byte + Coordinates [2]float32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsimageregion?language=objc +type ImageRegion struct { + Offset ImageCoordinate + Size ImageCoordinate +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsraypackedorigindirection?language=objc +type RayPackedOriginDirection struct { + Origin PackedFloat3 + Direction PackedFloat3 +} + +// A packed three-element vector. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpspackedfloat3?language=objc +type PackedFloat3 struct { + Anon0 [12]byte +} + +// A description of row and column offsets into a matrix. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsmatrixoffset?language=objc +type MatrixOffset struct { + RowOffset uint32 + ColumnOffset uint32 +} + +// An intersection result that contains the origin-intersection distance, intersected primitive index, and intersection point coordinates. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindexcoordinates?language=objc +type IntersectionDistancePrimitiveIndexCoordinates struct { + Distance float32 + PrimitiveIndex uint32 + Coordinates [2]float32 +} + +// The information used to compute the histogram channels of an image. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsimagehistograminfo?language=objc +type ImageHistogramInfo struct { + NumberOfHistogramEntries uint64 + HistogramForAlpha int8 + Pad_cgo_0 [4]byte + MinPixelValue [4]float32 + MaxPixelValue [4]float32 +} + +// A size of a region in an image. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpssize?language=objc +type Size struct { + Width float64 + Height float64 + Depth float64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsintersectiondistanceprimitiveindexbufferindex?language=objc +type IntersectionDistancePrimitiveIndexBufferIndex struct { + Distance float32 + PrimitiveIndex uint32 + BufferIndex uint32 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpscustomkernelinfo?language=objc +type CustomKernelInfo struct { + ClipOrigin [4]uint16 + ClipSize [4]uint16 + DestinationFeatureChannels uint16 + DestImageArraySize uint16 + SourceImageCount uint16 + ThreadgroupSize uint16 + SubbatchIndex uint16 + SubbatchStride uint16 + Idiv IntegerDivisionParams + Pad_cgo_0 [4]byte +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsndarrayoffsets?language=objc +type NDArrayOffsets struct { + Dimensions [16]int64 +} + +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsimagecoordinate?language=objc +type ImageCoordinate struct { + X uint64 + Y uint64 + Channel uint64 +} + +// A 3D ray with an origin, a direction, and an intersection distance range from the origin. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsrayoriginmindistancedirectionmaxdistance?language=objc +type RayOriginMinDistanceDirectionMaxDistance struct { + Origin PackedFloat3 + MinDistance float32 + Direction PackedFloat3 + MaxDistance float32 +} + +// A description of matrix copy operations. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsmatrixcopyoffsets?language=objc +type MatrixCopyOffsets struct { + SourceRowOffset uint32 + SourceColumnOffset uint32 + DestinationRowOffset uint32 + DestinationColumnOffset uint32 +} + +// A position in an image used as the source origin. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metalperformanceshaders/mpsorigin?language=objc +type Origin struct { + X float64 + Y float64 + Z float64 +} diff --git a/macos/quartzcore/quartzcore_structs.go b/macos/quartzcore/quartzcore_structs.go index dedd1a77..2ce28a57 100644 --- a/macos/quartzcore/quartzcore_structs.go +++ b/macos/quartzcore/quartzcore_structs.go @@ -1,5 +1,17 @@ package quartzcore +// [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/quartzcore/caframeraterange?language=objc +type FrameRateRange struct { + Minimum float32 + Maximum float32 + Preferred float32 +} + +// The standard transform matrix used throughout Core Animation. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/quartzcore/catransform3d?language=objc type Transform3D struct { M11 float64 M12 float64 @@ -18,9 +30,3 @@ type Transform3D struct { M43 float64 M44 float64 } - -type FrameRateRange struct { - minimum float32 - maximum float32 - preferred float32 -} diff --git a/macos/sysconfig/aliastypes.gen.go b/macos/sysconfig/aliastypes.gen.go index a3db0cf5..5a4144e8 100644 --- a/macos/sysconfig/aliastypes.gen.go +++ b/macos/sysconfig/aliastypes.gen.go @@ -16,12 +16,12 @@ type PreferencesCallBack = func(prefs PreferencesRef, notificationType Preferenc // The type of callback function used when a status event is delivered. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkconnectioncallback?language=objc -type etworkConnectionCallBack = func(connection EtworkConnectionRef, status EtworkConnectionStatus, info unsafe.Pointer) +type NetworkConnectionCallBack = func(connection NetworkConnectionRef, status NetworkConnectionStatus, info unsafe.Pointer) // Type of callback function used when the reachability of a network address or name changes. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkreachabilitycallback?language=objc -type etworkReachabilityCallBack = func(target EtworkReachabilityRef, flags EtworkReachabilityFlags, info unsafe.Pointer) +type NetworkReachabilityCallBack = func(target NetworkReachabilityRef, flags NetworkReachabilityFlags, info unsafe.Pointer) // Callback used when notification of changes made to the dynamic store is delivered. [Full Topic] // diff --git a/macos/sysconfig/enumtypes.gen.go b/macos/sysconfig/enumtypes.gen.go index a621116c..302cccda 100644 --- a/macos/sysconfig/enumtypes.gen.go +++ b/macos/sysconfig/enumtypes.gen.go @@ -5,58 +5,58 @@ package sysconfig // Flags that indicate whether the specified network node name or address is reachable, whether a connection is required, and whether some user intervention may be required when establishing a connection. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkconnectionflags?language=objc -type EtworkConnectionFlags uint32 +type NetworkConnectionFlags uint32 // The PPP-specific status of the network connection. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkconnectionpppstatus?language=objc -type EtworkConnectionPPPStatus int32 +type NetworkConnectionPPPStatus int32 const ( - KNetworkConnectionPPPAuthenticating EtworkConnectionPPPStatus = 5 - KNetworkConnectionPPPConnected EtworkConnectionPPPStatus = 8 - KNetworkConnectionPPPConnectingLink EtworkConnectionPPPStatus = 2 - KNetworkConnectionPPPDialOnTraffic EtworkConnectionPPPStatus = 3 - KNetworkConnectionPPPDisconnected EtworkConnectionPPPStatus = 0 - KNetworkConnectionPPPDisconnectingLink EtworkConnectionPPPStatus = 10 - KNetworkConnectionPPPHoldingLinkOff EtworkConnectionPPPStatus = 11 - KNetworkConnectionPPPInitializing EtworkConnectionPPPStatus = 1 - KNetworkConnectionPPPNegotiatingLink EtworkConnectionPPPStatus = 4 - KNetworkConnectionPPPNegotiatingNetwork EtworkConnectionPPPStatus = 7 - KNetworkConnectionPPPSuspended EtworkConnectionPPPStatus = 12 - KNetworkConnectionPPPTerminating EtworkConnectionPPPStatus = 9 - KNetworkConnectionPPPWaitingForCallBack EtworkConnectionPPPStatus = 6 - KNetworkConnectionPPPWaitingForRedial EtworkConnectionPPPStatus = 13 + KNetworkConnectionPPPAuthenticating NetworkConnectionPPPStatus = 5 + KNetworkConnectionPPPConnected NetworkConnectionPPPStatus = 8 + KNetworkConnectionPPPConnectingLink NetworkConnectionPPPStatus = 2 + KNetworkConnectionPPPDialOnTraffic NetworkConnectionPPPStatus = 3 + KNetworkConnectionPPPDisconnected NetworkConnectionPPPStatus = 0 + KNetworkConnectionPPPDisconnectingLink NetworkConnectionPPPStatus = 10 + KNetworkConnectionPPPHoldingLinkOff NetworkConnectionPPPStatus = 11 + KNetworkConnectionPPPInitializing NetworkConnectionPPPStatus = 1 + KNetworkConnectionPPPNegotiatingLink NetworkConnectionPPPStatus = 4 + KNetworkConnectionPPPNegotiatingNetwork NetworkConnectionPPPStatus = 7 + KNetworkConnectionPPPSuspended NetworkConnectionPPPStatus = 12 + KNetworkConnectionPPPTerminating NetworkConnectionPPPStatus = 9 + KNetworkConnectionPPPWaitingForCallBack NetworkConnectionPPPStatus = 6 + KNetworkConnectionPPPWaitingForRedial NetworkConnectionPPPStatus = 13 ) // The current status of the network connection. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkconnectionstatus?language=objc -type EtworkConnectionStatus int32 +type NetworkConnectionStatus int32 const ( - KNetworkConnectionConnected EtworkConnectionStatus = 2 - KNetworkConnectionConnecting EtworkConnectionStatus = 1 - KNetworkConnectionDisconnected EtworkConnectionStatus = 0 - KNetworkConnectionDisconnecting EtworkConnectionStatus = 3 - KNetworkConnectionInvalid EtworkConnectionStatus = -1 + KNetworkConnectionConnected NetworkConnectionStatus = 2 + KNetworkConnectionConnecting NetworkConnectionStatus = 1 + KNetworkConnectionDisconnected NetworkConnectionStatus = 0 + KNetworkConnectionDisconnecting NetworkConnectionStatus = 3 + KNetworkConnectionInvalid NetworkConnectionStatus = -1 ) // Flags that indicate the reachability of a network node name or address, including whether a connection is required, and whether some user intervention might be required when establishing a connection. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkreachabilityflags?language=objc -type EtworkReachabilityFlags uint32 +type NetworkReachabilityFlags uint32 const ( - KNetworkReachabilityFlagsConnectionAutomatic EtworkReachabilityFlags = 8 - KNetworkReachabilityFlagsConnectionOnDemand EtworkReachabilityFlags = 32 - KNetworkReachabilityFlagsConnectionOnTraffic EtworkReachabilityFlags = 8 - KNetworkReachabilityFlagsConnectionRequired EtworkReachabilityFlags = 4 - KNetworkReachabilityFlagsInterventionRequired EtworkReachabilityFlags = 16 - KNetworkReachabilityFlagsIsDirect EtworkReachabilityFlags = 131072 - KNetworkReachabilityFlagsIsLocalAddress EtworkReachabilityFlags = 65536 - KNetworkReachabilityFlagsReachable EtworkReachabilityFlags = 2 - KNetworkReachabilityFlagsTransientConnection EtworkReachabilityFlags = 1 + KNetworkReachabilityFlagsConnectionAutomatic NetworkReachabilityFlags = 8 + KNetworkReachabilityFlagsConnectionOnDemand NetworkReachabilityFlags = 32 + KNetworkReachabilityFlagsConnectionOnTraffic NetworkReachabilityFlags = 8 + KNetworkReachabilityFlagsConnectionRequired NetworkReachabilityFlags = 4 + KNetworkReachabilityFlagsInterventionRequired NetworkReachabilityFlags = 16 + KNetworkReachabilityFlagsIsDirect NetworkReachabilityFlags = 131072 + KNetworkReachabilityFlagsIsLocalAddress NetworkReachabilityFlags = 65536 + KNetworkReachabilityFlagsReachable NetworkReachabilityFlags = 2 + KNetworkReachabilityFlagsTransientConnection NetworkReachabilityFlags = 1 ) // The type of notification (used with the SCPreferencesCallBack callback). [Full Topic] diff --git a/macos/sysconfig/sysconfig_structs.go b/macos/sysconfig/sysconfig_structs.go new file mode 100644 index 00000000..134399c2 --- /dev/null +++ b/macos/sysconfig/sysconfig_structs.go @@ -0,0 +1,90 @@ +package sysconfig + +// The reference to an object that represents a network protocol. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkprotocolref?language=objc +type NetworkProtocolRef uintptr + +// The handle to an open preferences session for accessing system configuration preferences. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scpreferencesref?language=objc +type PreferencesRef uintptr + +// The handle to manage a connection-oriented service. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkconnectionref?language=objc +type NetworkConnectionRef uintptr + +// The reference to an object that represents a network service. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkserviceref?language=objc +type NetworkServiceRef uintptr + +// Structure containing user-specified data and callbacks for a dynamic store session. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scdynamicstorecontext?language=objc +type DynamicStoreContext struct { + Version int64 + Info uintptr + Retain uintptr + Release uintptr + CopyDescription uintptr +} + +// The handle to a network address or name. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkreachabilityref?language=objc +type NetworkReachabilityRef uintptr + +// The reference to an object that represents the status of an Ethernet bond interface. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scbondstatusref?language=objc +type BondStatusRef uintptr + +// A structure containing user-specified data and callbacks for accessing system configuration preferences. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scpreferencescontext?language=objc +type PreferencesContext struct { + Version int64 + Info uintptr + Retain uintptr + Release uintptr + CopyDescription uintptr +} + +// The reference to an object that represents a network interface. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkinterfaceref?language=objc +type NetworkInterfaceRef uintptr + +// The handle to an open dynamic store session with the system configuration daemon. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scdynamicstoreref?language=objc +type DynamicStoreRef uintptr + +// The reference to an object that represents a network set. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworksetref?language=objc +type NetworkSetRef uintptr + +// Structure containing user-specified data and callbacks used with [systemconfiguration/scnetworkreachabilitysetcallback]. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkreachabilitycontext?language=objc +type NetworkReachabilityContext struct { + Version int64 + Info uintptr + Retain uintptr + Release uintptr + CopyDescription uintptr +} + +// A structure containing user-specified data and callbacks for a network connection. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/systemconfiguration/scnetworkconnectioncontext?language=objc +type NetworkConnectionContext struct { + Version int64 + Info uintptr + Retain uintptr + Release uintptr + CopyDescription uintptr +}