diff --git a/macos/corefoundation/functions.gen.go b/macos/corefoundation/functions.gen.go index 0f9d9a5d..b4c31763 100644 --- a/macos/corefoundation/functions.gen.go +++ b/macos/corefoundation/functions.gen.go @@ -550,7 +550,7 @@ func DictionaryCreateMutableCopy(allocator AllocatorRef, capacity Index, theDict func NullGetTypeID() TypeID { rv := C.NullGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the error associated with a stream. [Full Topic] @@ -618,7 +618,7 @@ func CalendarSetFirstWeekday(calendar CalendarRef, wkdy Index) { func NumberFormatterGetTypeID() TypeID { rv := C.NumberFormatterGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // [Full Topic] @@ -723,7 +723,7 @@ func BagGetCount(theBag BagRef) Index { unsafe.Pointer(theBag), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the location of a bundle’s auxiliary executable code. [Full Topic] @@ -842,7 +842,7 @@ func BitVectorGetBitAtIndex(bv BitVectorRef, idx Index) Bit { (C.CFIndex)(idx), ) // *typing.AliasType - return Bit(rv) + return *(*Bit)(unsafe.Pointer(&rv)) } // Returns the allocator used to allocate a Core Foundation object. [Full Topic] @@ -879,7 +879,7 @@ func ErrorGetCode(err ErrorRef) Index { unsafe.Pointer(err), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns by reference the byte representation of a URL object. [Full Topic] @@ -896,7 +896,7 @@ func URLGetBytes(url URLRef, buffer *uint8, bufferLength Index) Index { (C.CFIndex)(bufferLength), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Sets the value of a particular bit in a bit vector. [Full Topic] @@ -934,7 +934,7 @@ func CalendarGetMinimumDaysInFirstWeek(calendar CalendarRef) Index { unsafe.Pointer(calendar), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Increases the length of a CFMutableData object's internal byte buffer, zero-filling the extension to the buffer. [Full Topic] @@ -1011,7 +1011,7 @@ func ReadStreamRead(stream ReadStreamRef, buffer *uint8, bufferLength Index) Ind (C.CFIndex)(bufferLength), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFRunLoopObserver opaque type. [Full Topic] @@ -1020,7 +1020,7 @@ func ReadStreamRead(stream ReadStreamRef, buffer *uint8, bufferLength Index) Ind func RunLoopObserverGetTypeID() TypeID { rv := C.RunLoopObserverGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Creates a new CFNumberFormatter object, localized to the given locale, which will format numbers to the given style. [Full Topic] @@ -1075,7 +1075,7 @@ func RunLoopObserverGetActivities(observer RunLoopObserverRef) OptionFlags { unsafe.Pointer(observer), ) // *typing.AliasType - return OptionFlags(rv) + return *(*OptionFlags)(unsafe.Pointer(&rv)) } // Determines if a property list is valid. [Full Topic] @@ -1103,7 +1103,7 @@ func RunLoopTimerGetInterval(timer RunLoopTimerRef) TimeInterval { unsafe.Pointer(timer), ) // *typing.AliasType - return TimeInterval(rv) + return *(*TimeInterval)(unsafe.Pointer(&rv)) } // Returns the primary double value represented by a string. [Full Topic] @@ -1289,7 +1289,7 @@ func ReadStreamGetStatus(stream ReadStreamRef) StreamStatus { unsafe.Pointer(stream), ) // *typing.AliasType - return StreamStatus(rv) + return *(*StreamStatus)(unsafe.Pointer(&rv)) } // Creates and returns a directory enumerator with provided enumerator behavior options and properties to be prefetched. [Full Topic] @@ -1353,7 +1353,7 @@ func SwapInt16BigToHost(arg uint16) uint16 { func TimeZoneGetTypeID() TypeID { rv := C.TimeZoneGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns a dictionary containing preference values for multiple keys. [Full Topic] @@ -1387,7 +1387,7 @@ func URLCreateResourcePropertyForKeyFromBookmarkData(allocator AllocatorRef, res unsafe.Pointer(bookmark), ) // *typing.AliasType - return TypeRef(rv) + return *(*TypeRef)(unsafe.Pointer(&rv)) } // Sets the name of a local CFMessagePort object. [Full Topic] @@ -1488,7 +1488,7 @@ func RunLoopTimerGetTolerance(timer RunLoopTimerRef) TimeInterval { unsafe.Pointer(timer), ) // *typing.AliasType - return TimeInterval(rv) + return *(*TimeInterval)(unsafe.Pointer(&rv)) } // Returns a localized string from a bundle’s strings file. [Full Topic] @@ -1586,7 +1586,7 @@ func CopyDescription(cf TypeRef) StringRef { func TreeGetTypeID() TypeID { rv := C.TreeGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Inserts a new sibling after a given tree. [Full Topic] @@ -1677,7 +1677,7 @@ func WriteStreamGetStatus(stream WriteStreamRef) StreamStatus { unsafe.Pointer(stream), ) // *typing.AliasType - return StreamStatus(rv) + return *(*StreamStatus)(unsafe.Pointer(&rv)) } // Creates a mutable copy of an attributed string. [Full Topic] @@ -1751,7 +1751,7 @@ func MakeCollectable(cf TypeRef) TypeRef { (C.CFTypeRef)(cf), ) // *typing.AliasType - return TypeRef(rv) + return *(*TypeRef)(unsafe.Pointer(&rv)) } // Sets the minimum number of days in the first week of a specified calendar. [Full Topic] @@ -1836,7 +1836,7 @@ func ReadStreamClose(stream ReadStreamRef) { func CalendarGetTypeID() TypeID { rv := C.CalendarGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the bundle identifier from a bundle’s information property list. [Full Topic] @@ -1895,7 +1895,7 @@ func FileSecurityGetMode(fileSec FileSecurityRef, mode *int) bool { func RunLoopGetTypeID() TypeID { rv := C.RunLoopGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Tells a recursive enumerator not to descend into the directory at the URL that was returned by the most recent call to the CFURLEnumeratorGetNextURL function. [Full Topic] @@ -1914,7 +1914,7 @@ func URLEnumeratorSkipDescendents(enumerator URLEnumeratorRef) { func RunLoopTimerGetTypeID() TypeID { rv := C.RunLoopTimerGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the path portion of a given URL. [Full Topic] @@ -1992,7 +1992,7 @@ func Hash(cf TypeRef) HashCode { (C.CFTypeRef)(cf), ) // *typing.AliasType - return HashCode(rv) + return *(*HashCode)(unsafe.Pointer(&rv)) } // Fills a buffer with the file system's native string representation of a given URL's path. [Full Topic] @@ -2074,7 +2074,7 @@ func DataGetLength(theData DataRef) Index { unsafe.Pointer(theData), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Determines whether or not a given key has been imposed on the user. [Full Topic] @@ -2100,7 +2100,7 @@ func StringGetFastestEncoding(theString StringRef) StringEncoding { unsafe.Pointer(theString), ) // *typing.AliasType - return StringEncoding(rv) + return *(*StringEncoding)(unsafe.Pointer(&rv)) } // Creates a string from a buffer containing characters in a specified encoding. [Full Topic] @@ -2241,7 +2241,7 @@ func URLCopyScheme(anURL URLRef) StringRef { func NumberGetTypeID() TypeID { rv := C.NumberGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns by reference the start time and duration of a given calendar unit that contains a given absolute time. [Full Topic] @@ -2315,7 +2315,7 @@ func CalendarGetFirstWeekday(calendar CalendarRef) Index { unsafe.Pointer(calendar), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns an array containing all of the bundles currently open in the application. [Full Topic] @@ -2426,7 +2426,7 @@ func NumberGetType(number NumberRef) NumberType { unsafe.Pointer(number), ) // *typing.AliasType - return NumberType(rv) + return *(*NumberType)(unsafe.Pointer(&rv)) } // Returns a format string for the given date formatter object. [Full Topic] @@ -2545,7 +2545,7 @@ func UserNotificationSecureTextField(i Index) OptionFlags { (C.CFIndex)(i), ) // *typing.AliasType - return OptionFlags(rv) + return *(*OptionFlags)(unsafe.Pointer(&rv)) } // Returns flags that control certain behaviors of a CFSocket object. [Full Topic] @@ -2557,7 +2557,7 @@ func SocketGetSocketFlags(s SocketRef) OptionFlags { unsafe.Pointer(s), ) // *typing.AliasType - return OptionFlags(rv) + return *(*OptionFlags)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFString opaque type. [Full Topic] @@ -2566,7 +2566,7 @@ func SocketGetSocketFlags(s SocketRef) OptionFlags { func StringGetTypeID() TypeID { rv := C.StringGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the Windows codepage identifier that maps most closely to a given Core Foundation encoding constant. [Full Topic] @@ -2619,7 +2619,7 @@ func URLCreateWithBytes(allocator AllocatorRef, URLBytes *uint8, length Index, e func URLEnumeratorGetTypeID() TypeID { rv := C.URLEnumeratorGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Advances the tokenizer to the next token and sets that as the current token. [Full Topic] @@ -2631,7 +2631,7 @@ func StringTokenizerAdvanceToNextToken(tokenizer StringTokenizerRef) StringToken unsafe.Pointer(tokenizer), ) // *typing.AliasType - return StringTokenizerTokenType(rv) + return *(*StringTokenizerTokenType)(unsafe.Pointer(&rv)) } // Creates a mutable copy of a string. [Full Topic] @@ -2719,7 +2719,7 @@ func Autorelease(arg TypeRef) TypeRef { (C.CFTypeRef)(arg), ) // *typing.AliasType - return TypeRef(rv) + return *(*TypeRef)(unsafe.Pointer(&rv)) } // Returns an array of CFURL objects describing the locations of all resources in a bundle of the specified type without needing to create a CFBundle object. [Full Topic] @@ -2861,7 +2861,7 @@ func BundleGetValueForInfoDictionaryKey(bundle BundleRef, key StringRef) TypeRef unsafe.Pointer(key), ) // *typing.AliasType - return TypeRef(rv) + return *(*TypeRef)(unsafe.Pointer(&rv)) } // Changes the size of a mutable bit vector. [Full Topic] @@ -2895,7 +2895,7 @@ func URLGetBaseURL(anURL URLRef) URLRef { func BagGetTypeID() TypeID { rv := C.BagGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the value of a CFBoolean object as a standard C type Boolean. [Full Topic] @@ -2943,7 +2943,7 @@ func NumberFormatterGetStyle(formatter NumberFormatterRef) NumberFormatterStyle unsafe.Pointer(formatter), ) // *typing.AliasType - return NumberFormatterStyle(rv) + return *(*NumberFormatterStyle)(unsafe.Pointer(&rv)) } // Changes the first character in each word of a string to uppercase (if it is a lowercase alphabetical character). [Full Topic] @@ -2995,7 +2995,7 @@ func UserNotificationCheckBoxChecked(i Index) OptionFlags { (C.CFIndex)(i), ) // *typing.AliasType - return OptionFlags(rv) + return *(*OptionFlags)(unsafe.Pointer(&rv)) } // Returns the last path component of a given URL. [Full Topic] @@ -3019,7 +3019,7 @@ func StringGetMaximumSizeOfFileSystemRepresentation(string_ StringRef) Index { unsafe.Pointer(string_), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the location of a bundle’s Resources directory. [Full Topic] @@ -3040,7 +3040,7 @@ func BundleCopyResourcesDirectoryURL(bundle BundleRef) URLRef { func BooleanGetTypeID() TypeID { rv := C.BooleanGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Gets as a mutable string the string for an attributed string. [Full Topic] @@ -3229,7 +3229,7 @@ func WriteStreamCanAcceptBytes(stream WriteStreamRef) bool { func SetGetTypeID() TypeID { rv := C.SetGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the type ID for CFStringTokenizer. [Full Topic] @@ -3238,7 +3238,7 @@ func SetGetTypeID() TypeID { func StringTokenizerGetTypeID() TypeID { rv := C.StringTokenizerGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the localized name of a given time zone. [Full Topic] @@ -3269,7 +3269,7 @@ func PreferencesCopyAppValue(key StringRef, applicationID StringRef) PropertyLis unsafe.Pointer(applicationID), ) // *typing.AliasType - return PropertyListRef(rv) + return *(*PropertyListRef)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFAttributedString opaque type. [Full Topic] @@ -3278,7 +3278,7 @@ func PreferencesCopyAppValue(key StringRef, applicationID StringRef) PropertyLis func AttributedStringGetTypeID() TypeID { rv := C.AttributedStringGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the net location portion of a given URL. [Full Topic] @@ -3363,7 +3363,7 @@ func RunLoopTimerGetOrder(timer RunLoopTimerRef) Index { unsafe.Pointer(timer), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Replaces all characters of a CFMutableString object with other characters. [Full Topic] @@ -3411,7 +3411,7 @@ func TimeZoneGetSecondsFromGMT(tz TimeZoneRef, at AbsoluteTime) TimeInterval { (C.CFAbsoluteTime)(at), ) // *typing.AliasType - return TimeInterval(rv) + return *(*TimeInterval)(unsafe.Pointer(&rv)) } // Creates a readable stream for a file. [Full Topic] @@ -3492,7 +3492,7 @@ func ArrayGetCount(theArray ArrayRef) Index { unsafe.Pointer(theArray), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the parent of a given tree. [Full Topic] @@ -3560,7 +3560,7 @@ func URLEnumeratorGetDescendentLevel(enumerator URLEnumeratorRef) Index { unsafe.Pointer(enumerator), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFSocket opaque type. [Full Topic] @@ -3569,7 +3569,7 @@ func URLEnumeratorGetDescendentLevel(enumerator URLEnumeratorRef) Index { func SocketGetTypeID() TypeID { rv := C.SocketGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns a Boolean value that indicates whether a CFMessagePort object represents a remote port. [Full Topic] @@ -3631,7 +3631,7 @@ func SocketSendData(s SocketRef, address DataRef, data DataRef, timeout TimeInte (C.CFTimeInterval)(timeout), ) // *typing.AliasType - return SocketError(rv) + return *(*SocketError)(unsafe.Pointer(&rv)) } // Returns the native socket associated with a CFSocket object. [Full Topic] @@ -3643,7 +3643,7 @@ func SocketGetNative(s SocketRef) SocketNativeHandle { unsafe.Pointer(s), ) // *typing.AliasType - return SocketNativeHandle(rv) + return *(*SocketNativeHandle)(unsafe.Pointer(&rv)) } // Sets the default port number with which to connect to a CFSocket name server. [Full Topic] @@ -3665,7 +3665,7 @@ func StringConvertIANACharSetNameToEncoding(theString StringRef) StringEncoding unsafe.Pointer(theString), ) // *typing.AliasType - return StringEncoding(rv) + return *(*StringEncoding)(unsafe.Pointer(&rv)) } // Creates a string from its “external representation.” [Full Topic] @@ -3806,7 +3806,7 @@ func LocaleGetLanguageLineDirection(isoLangCode StringRef) LocaleLanguageDirecti unsafe.Pointer(isoLangCode), ) // *typing.AliasType - return LocaleLanguageDirection(rv) + return *(*LocaleLanguageDirection)(unsafe.Pointer(&rv)) } // Creates a new CFDateFormatter object, localized to the given locale, which will format dates to the given date and time styles. [Full Topic] @@ -3864,7 +3864,7 @@ func RunLoopTimerGetNextFireDate(timer RunLoopTimerRef) AbsoluteTime { unsafe.Pointer(timer), ) // *typing.AliasType - return AbsoluteTime(rv) + return *(*AbsoluteTime)(unsafe.Pointer(&rv)) } // Returns the number of fraction digits that should be displayed, and the rounding increment, for a given currency. [Full Topic] @@ -3909,7 +3909,7 @@ func WriteStreamWrite(stream WriteStreamRef, buffer *uint8, bufferLength Index) (C.CFIndex)(bufferLength), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Prints a description of a Core Foundation object to stderr. [Full Topic] @@ -3947,7 +3947,7 @@ func StringTokenizerCopyCurrentTokenAttribute(tokenizer StringTokenizerRef, attr (C.CFOptionFlags)(attribute), ) // *typing.AliasType - return TypeRef(rv) + return *(*TypeRef)(unsafe.Pointer(&rv)) } // Creates a CFUUID object for a specified string. [Full Topic] @@ -3970,7 +3970,7 @@ func UUIDCreateFromString(alloc AllocatorRef, uuidStr StringRef) UUIDRef { func ArrayGetTypeID() TypeID { rv := C.ArrayGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Signals a CFRunLoopSource object, marking it as ready to fire. [Full Topic] @@ -3994,7 +3994,7 @@ func SocketSetAddress(s SocketRef, address DataRef) SocketError { unsafe.Pointer(address), ) // *typing.AliasType - return SocketError(rv) + return *(*SocketError)(unsafe.Pointer(&rv)) } // Creates an immutable string from a C string. [Full Topic] @@ -4083,7 +4083,7 @@ func DateGetAbsoluteTime(theDate DateRef) AbsoluteTime { unsafe.Pointer(theDate), ) // *typing.AliasType - return AbsoluteTime(rv) + return *(*AbsoluteTime)(unsafe.Pointer(&rv)) } // Sets the locale for a calendar. [Full Topic] @@ -4151,7 +4151,7 @@ func StringGetMaximumSizeForEncoding(length Index, encoding StringEncoding) Inde (C.CFStringEncoding)(encoding), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns a Boolean value that indicates whether a CFRunLoopTimer object repeats. [Full Topic] @@ -4241,7 +4241,7 @@ func TimeZoneGetDaylightSavingTimeOffset(tz TimeZoneRef, at AbsoluteTime) TimeIn (C.CFAbsoluteTime)(at), ) // *typing.AliasType - return TimeInterval(rv) + return *(*TimeInterval)(unsafe.Pointer(&rv)) } // Sets all bits in a bit vector to a particular value. [Full Topic] @@ -4283,7 +4283,7 @@ func GetTypeID(cf TypeRef) TypeID { (C.CFTypeRef)(cf), ) // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Convenience function that directly obtains an integer preference value for the specified key. [Full Topic] @@ -4299,7 +4299,7 @@ func PreferencesGetAppIntegerValue(key StringRef, applicationID StringRef, keyEx (*C.bool)(unsafe.Pointer(&keyExistsAndHasValidFormat)), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Creates a CFString object from an external C string buffer that might serve as the backing store for the object. [Full Topic] @@ -4329,7 +4329,7 @@ func StringCreateWithCStringNoCopy(alloc AllocatorRef, cStr string, encoding Str func ReadStreamGetTypeID() TypeID { rv := C.ReadStreamGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Creates a CFDate object given an absolute time. [Full Topic] @@ -4368,7 +4368,7 @@ func StringConvertNSStringEncodingToEncoding(encoding int32) StringEncoding { C.int32_t(encoding), ) // *typing.AliasType - return StringEncoding(rv) + return *(*StringEncoding)(unsafe.Pointer(&rv)) } // Returns the smallest encoding on the current system for the character contents of a string. [Full Topic] @@ -4380,7 +4380,7 @@ func StringGetSmallestEncoding(theString StringRef) StringEncoding { unsafe.Pointer(theString), ) // *typing.AliasType - return StringEncoding(rv) + return *(*StringEncoding)(unsafe.Pointer(&rv)) } // Determines if the character data of a string begin with a specified sequence of characters. [Full Topic] @@ -4452,7 +4452,7 @@ func BitVectorGetCount(bv BitVectorRef) Index { unsafe.Pointer(bv), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Forces a CFRunLoop object to stop running. [Full Topic] @@ -4695,7 +4695,7 @@ func DateFormatterSetProperty(formatter DateFormatterRef, key StringRef, value T func MachPortGetTypeID() TypeID { rv := C.MachPortGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Creates a new CFURL object for a file system entity using the native representation. [Full Topic] @@ -4740,7 +4740,7 @@ func StringConvertWindowsCodepageToEncoding(codepage uint32) StringEncoding { C.uint32_t(codepage), ) // *typing.AliasType - return StringEncoding(rv) + return *(*StringEncoding)(unsafe.Pointer(&rv)) } // Trims whitespace from the beginning and end of a CFMutableString object. [Full Topic] @@ -4771,7 +4771,7 @@ func MachPortIsValid(port MachPortRef) bool { func BinaryHeapGetTypeID() TypeID { rv := C.BinaryHeapGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Defers internal consistency-checking and coalescing for a mutable attributed string. [Full Topic] @@ -4820,7 +4820,7 @@ func GetRetainCount(cf TypeRef) Index { (C.CFTypeRef)(cf), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Creates a time zone with a given name and data. [Full Topic] @@ -4876,7 +4876,7 @@ func DateFormatterCreateISO8601Formatter(allocator AllocatorRef, formatOptions I func StringGetSystemEncoding() StringEncoding { rv := C.StringGetSystemEncoding() // *typing.AliasType - return StringEncoding(rv) + return *(*StringEncoding)(unsafe.Pointer(&rv)) } // Quickly obtains a pointer to a C-string buffer containing the characters of a string in a given encoding. [Full Topic] @@ -4923,7 +4923,7 @@ func CharacterSetCreateBitmapRepresentation(alloc AllocatorRef, theSet Character func AbsoluteTimeGetCurrent() AbsoluteTime { rv := C.AbsoluteTimeGetCurrent() // *typing.AliasType - return AbsoluteTime(rv) + return *(*AbsoluteTime)(unsafe.Pointer(&rv)) } // Returns a Boolean value that indicates whether a given character is a low character in a surrogate pair. [Full Topic] @@ -5077,7 +5077,7 @@ func BundleGetPackageInfo(bundle BundleRef, packageType *uint32, packageCreator func FileDescriptorGetTypeID() TypeID { rv := C.FileDescriptorGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Creates a CFMutableString object whose Unicode character buffer is controlled externally. [Full Topic] @@ -5111,7 +5111,7 @@ func StringGetLength(theString StringRef) Index { unsafe.Pointer(theString), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Converts a 32-bit integer from the host’s native byte order to little-endian format. [Full Topic] @@ -5283,7 +5283,7 @@ func RunLoopSourceGetOrder(source RunLoopSourceRef) Index { unsafe.Pointer(source), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the first child of a tree. [Full Topic] @@ -5319,7 +5319,7 @@ func DateFormatterGetTimeStyle(formatter DateFormatterRef) DateFormatterStyle { unsafe.Pointer(formatter), ) // *typing.AliasType - return DateFormatterStyle(rv) + return *(*DateFormatterStyle)(unsafe.Pointer(&rv)) } // Determines whether two Core Foundation objects are considered equal. [Full Topic] @@ -5444,7 +5444,7 @@ func UserNotificationDisplayNotice(timeout TimeInterval, flags OptionFlags, icon func BundleGetTypeID() TypeID { rv := C.BundleGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Obtains the number of bytes likely to be allocated upon a specific request. [Full Topic] @@ -5462,7 +5462,7 @@ func AllocatorGetPreferredSizeForSize(allocator AllocatorRef, size Index, hint O (C.CFOptionFlags)(hint), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Normalizes the string into the specified form as described in Unicode Technical Report #15. [Full Topic] @@ -5498,7 +5498,7 @@ func Retain(cf TypeRef) TypeRef { (C.CFTypeRef)(cf), ) // *typing.AliasType - return TypeRef(rv) + return *(*TypeRef)(unsafe.Pointer(&rv)) } // Creates an immutable bit vector that is a copy of another bit vector. [Full Topic] @@ -5540,7 +5540,7 @@ func TimeZoneResetSystem() { func WriteStreamGetTypeID() TypeID { rv := C.WriteStreamGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the ordering parameter for a CFRunLoopObserver object. [Full Topic] @@ -5552,7 +5552,7 @@ func RunLoopObserverGetOrder(observer RunLoopObserverRef) Index { unsafe.Pointer(observer), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Unloads the main executable for the specified bundle. [Full Topic] @@ -5598,7 +5598,7 @@ func DateGetTimeIntervalSinceDate(theDate DateRef, otherDate DateRef) TimeInterv unsafe.Pointer(otherDate), ) // *typing.AliasType - return TimeInterval(rv) + return *(*TimeInterval)(unsafe.Pointer(&rv)) } // Returns the native file descriptor for a given CFFileDescriptor. [Full Topic] @@ -5610,7 +5610,7 @@ func FileDescriptorGetNativeDescriptor(f FileDescriptorRef) FileDescriptorNative unsafe.Pointer(f), ) // *typing.AliasType - return FileDescriptorNativeDescriptor(rv) + return *(*FileDescriptorNativeDescriptor)(unsafe.Pointer(&rv)) } // Creates a CFFileSecurityRef object. [Full Topic] @@ -5667,7 +5667,7 @@ func StringTokenizerGoToTokenAtIndex(tokenizer StringTokenizerRef, index Index) (C.CFIndex)(index), ) // *typing.AliasType - return StringTokenizerTokenType(rv) + return *(*StringTokenizerTokenType)(unsafe.Pointer(&rv)) } // Returns the most compatible Mac OS script value for the given input encoding. [Full Topic] @@ -5680,7 +5680,7 @@ func StringGetMostCompatibleMacStringEncoding(encoding StringEncoding) StringEnc (C.CFStringEncoding)(encoding), ) // *typing.AliasType - return StringEncoding(rv) + return *(*StringEncoding)(unsafe.Pointer(&rv)) } // Creates a single string from the individual CFString objects that comprise the elements of an array. [Full Topic] @@ -5748,7 +5748,7 @@ func BundleCopySupportFilesDirectoryURL(bundle BundleRef) URLRef { func MessagePortGetTypeID() TypeID { rv := C.MessagePortGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the location of a bundle’s private Frameworks directory. [Full Topic] @@ -5832,7 +5832,7 @@ func AttributedStringGetLength(aStr AttributedStringRef) Index { unsafe.Pointer(aStr), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns a bundle’s localized information dictionary. [Full Topic] @@ -5969,7 +5969,7 @@ func TreeGetChildAtIndex(tree TreeRef, idx Index) TreeRef { func DictionaryGetTypeID() TypeID { rv := C.DictionaryGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns a plug-in's bundle. [Full Topic] @@ -6268,7 +6268,7 @@ func PreferencesCopyValue(key StringRef, applicationID StringRef, userName Strin unsafe.Pointer(hostName), ) // *typing.AliasType - return PropertyListRef(rv) + return *(*PropertyListRef)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFPlugIn opaque type. [Full Topic] @@ -6277,7 +6277,7 @@ func PreferencesCopyValue(key StringRef, applicationID StringRef, userName Strin func PlugInGetTypeID() TypeID { rv := C.PlugInGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Creates an array of CFString objects from a single CFString object. [Full Topic] @@ -6355,7 +6355,7 @@ func CharacterSetGetPredefined(theSetIdentifier CharacterSetPredefinedSet) Chara func DataGetTypeID() TypeID { rv := C.DataGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Waits for the user to respond to a notification or for the notification to time out. [Full Topic] @@ -6381,7 +6381,7 @@ func UserNotificationReceiveResponse(userNotification UserNotificationRef, timeo func CharacterSetGetTypeID() TypeID { rv := C.CharacterSetGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the application’s local notification center. [Full Topic] @@ -6424,7 +6424,7 @@ func DictionaryGetCount(theDict DictionaryRef) Index { unsafe.Pointer(theDict), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the path extension of a given URL. [Full Topic] @@ -6472,7 +6472,7 @@ func NumberGetByteSize(number NumberRef) Index { unsafe.Pointer(number), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Creates a copy of a given URL and appends a path component. [Full Topic] @@ -6507,7 +6507,7 @@ func StringCompare(theString1 StringRef, theString2 StringRef, compareOptions St (C.CFStringCompareFlags)(compareOptions), ) // *typing.AliasType - return ComparisonResult(rv) + return *(*ComparisonResult)(unsafe.Pointer(&rv)) } // Returns a flag used to set the selected element of a pop-up menu. [Full Topic] @@ -6520,7 +6520,7 @@ func UserNotificationPopUpSelection(n Index) OptionFlags { (C.CFIndex)(n), ) // *typing.AliasType - return OptionFlags(rv) + return *(*OptionFlags)(unsafe.Pointer(&rv)) } // Returns the byte order of the current computer. [Full Topic] @@ -6529,7 +6529,7 @@ func UserNotificationPopUpSelection(n Index) OptionFlags { func ByteOrderGetCurrent() ByteOrder { rv := C.ByteOrderGetCurrent() // *typing.AliasType - return ByteOrder(rv) + return *(*ByteOrder)(unsafe.Pointer(&rv)) } // Opens a stream for reading. [Full Topic] @@ -6550,7 +6550,7 @@ func ReadStreamOpen(stream ReadStreamRef) bool { func DateGetTypeID() TypeID { rv := C.DateGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Converts a 16-bit integer from the host’s native byte order to little-endian format. [Full Topic] @@ -6623,7 +6623,7 @@ func SocketCreateRunLoopSource(allocator AllocatorRef, s SocketRef, order Index) func BitVectorGetTypeID() TypeID { rv := C.BitVectorGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Forms the union of two character sets. [Full Topic] @@ -6659,7 +6659,7 @@ func SetGetCount(theSet SetRef) Index { unsafe.Pointer(theSet), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Opens a stream for writing. [Full Topic] @@ -6693,7 +6693,7 @@ func SocketSetSocketFlags(s SocketRef, flags OptionFlags) { func DateFormatterGetTypeID() TypeID { rv := C.DateFormatterGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFURL opaque type. [Full Topic] @@ -6702,7 +6702,7 @@ func DateFormatterGetTypeID() TypeID { func URLGetTypeID() TypeID { rv := C.URLGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Removes all values from a mutable bag. [Full Topic] @@ -6744,7 +6744,7 @@ func BitVectorFlipBitAtIndex(bv unsafe.Pointer, idx Index) { func NotificationCenterGetTypeID() TypeID { rv := C.NotificationCenterGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the number of children in a tree. [Full Topic] @@ -6756,7 +6756,7 @@ func TreeGetChildCount(tree TreeRef) Index { unsafe.Pointer(tree), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFFileSecurityRef opaque type. [Full Topic] @@ -6765,7 +6765,7 @@ func TreeGetChildCount(tree TreeRef) Index { func FileSecurityGetTypeID() TypeID { rv := C.FileSecurityGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the location of a resource contained in the specified bundle directory without requiring the creation of a CFBundle object. [Full Topic] @@ -6804,7 +6804,7 @@ func BundleIsExecutableLoadable(bundle BundleRef) bool { func AllocatorGetTypeID() TypeID { rv := C.AllocatorGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Sets a temporary resource value on the URL. [Full Topic] @@ -6828,7 +6828,7 @@ func URLSetTemporaryResourcePropertyForKey(url URLRef, key StringRef, propertyVa func PlugInInstanceGetTypeID() TypeID { rv := C.PlugInInstanceGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Registers a type and its corresponding factory function with a CFPlugIn object. [Full Topic] @@ -6851,7 +6851,7 @@ func PlugInRegisterPlugInType(factoryUUID UUIDRef, typeUUID UUIDRef) bool { func UUIDGetTypeID() TypeID { rv := C.UUIDGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns the data that stores the information used by a time zone. [Full Topic] @@ -6875,7 +6875,7 @@ func LocaleGetLanguageCharacterDirection(isoLangCode StringRef) LocaleLanguageDi unsafe.Pointer(isoLangCode), ) // *typing.AliasType - return LocaleLanguageDirection(rv) + return *(*LocaleLanguageDirection)(unsafe.Pointer(&rv)) } // Creates a string from a buffer, containing characters in a specified encoding, that might serve as the backing store for the new string. [Full Topic] @@ -6958,7 +6958,7 @@ func TimeZoneGetNextDaylightSavingTimeTransition(tz TimeZoneRef, at AbsoluteTime (C.CFAbsoluteTime)(at), ) // *typing.AliasType - return AbsoluteTime(rv) + return *(*AbsoluteTime)(unsafe.Pointer(&rv)) } // Returns the minimum value in a binary heap. [Full Topic] @@ -7008,7 +7008,7 @@ func MessagePortCreateRunLoopSource(allocator AllocatorRef, local MessagePortRef func LocaleGetTypeID() TypeID { rv := C.LocaleGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Computes the absolute time from components in a description string. [Full Topic] @@ -7067,7 +7067,7 @@ func StringGetCharacterAtIndex(theString StringRef, idx Index) uint16 { (C.CFIndex)(idx), ) // *typing.AliasType - return uint16(rv) + return *(*uint16)(unsafe.Pointer(&rv)) } // Returns the ordinal number of a calendrical unit within a larger unit at a specified absolute time. [Full Topic] @@ -7088,7 +7088,7 @@ func CalendarGetOrdinalityOfUnit(calendar CalendarRef, smallerUnit CalendarUnit, (C.CFAbsoluteTime)(at), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Recursively creates a copy of a given property list. [Full Topic] @@ -7106,7 +7106,7 @@ func PropertyListCreateDeepCopy(allocator AllocatorRef, propertyList PropertyLis (C.CFOptionFlags)(mutabilityOption), ) // *typing.AliasType - return PropertyListRef(rv) + return *(*PropertyListRef)(unsafe.Pointer(&rv)) } // Returns a time zone object for a specified calendar. [Full Topic] @@ -7203,7 +7203,7 @@ func CharacterSetInvert(theSet unsafe.Pointer) { func ErrorGetTypeID() TypeID { rv := C.ErrorGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Returns a pointer to a function in a bundle’s executable code using the function name as the search key. [Full Topic] @@ -7280,7 +7280,7 @@ func SocketConnectToAddress(s SocketRef, address DataRef, timeout TimeInterval) (C.CFTimeInterval)(timeout), ) // *typing.AliasType - return SocketError(rv) + return *(*SocketError)(unsafe.Pointer(&rv)) } // Appends a C string to the character contents of a CFMutableString object. [Full Topic] @@ -7309,7 +7309,7 @@ func DateFormatterGetDateStyle(formatter DateFormatterRef) DateFormatterStyle { unsafe.Pointer(formatter), ) // *typing.AliasType - return DateFormatterStyle(rv) + return *(*DateFormatterStyle)(unsafe.Pointer(&rv)) } // Returns an array containing the localizations for a bundle or executable at a particular location. [Full Topic] @@ -7345,7 +7345,7 @@ func BinaryHeapGetCount(heap BinaryHeapRef) Index { unsafe.Pointer(heap), ) // *typing.AliasType - return Index(rv) + return *(*Index)(unsafe.Pointer(&rv)) } // Returns the type identifier for the CFUserNotification opaque type. [Full Topic] @@ -7354,7 +7354,7 @@ func BinaryHeapGetCount(heap BinaryHeapRef) Index { func UserNotificationGetTypeID() TypeID { rv := C.UserNotificationGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Assembles an array of URLs specifying all of the resources of the specified type found in a bundle. [Full Topic] @@ -7379,7 +7379,7 @@ func BundleCopyResourceURLsOfType(bundle BundleRef, resourceType StringRef, subD func RunLoopSourceGetTypeID() TypeID { rv := C.RunLoopSourceGetTypeID() // *typing.AliasType - return TypeID(rv) + return *(*TypeID)(unsafe.Pointer(&rv)) } // Inserts a string at a specified location in the character buffer of a CFMutableString object. [Full Topic] diff --git a/macos/coregraphics/functions.gen.go b/macos/coregraphics/functions.gen.go index 48b4815d..b387976c 100644 --- a/macos/coregraphics/functions.gen.go +++ b/macos/coregraphics/functions.gen.go @@ -676,7 +676,7 @@ func ImageGetAlphaInfo(image ImageRef) ImageAlphaInfo { unsafe.Pointer(image), ) // *typing.AliasType - return ImageAlphaInfo(rv) + return *(*ImageAlphaInfo)(unsafe.Pointer(&rv)) } // Returns a Boolean value indicating whether a display is connected or online. [Full Topic] @@ -689,7 +689,7 @@ func DisplayIsOnline(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Releases a display fade reservation, and unfades the display if needed. [Full Topic] @@ -702,7 +702,7 @@ func ReleaseDisplayFadeReservation(token DisplayFadeReservationToken) Error { (C.CGDisplayFadeReservationToken)(token), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // [Full Topic] @@ -936,7 +936,7 @@ func PathAddArc(path MutablePathRef, m *AffineTransform, x float64, y float64, r func EventGetTypeID() corefoundation.TypeID { rv := C.EventGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Paints a gradient fill that varies along the line defined by the provided starting and ending points. [Full Topic] @@ -1002,7 +1002,7 @@ func SessionCopyCurrentDictionary() corefoundation.DictionaryRef { func ShadingGetTypeID() corefoundation.TypeID { rv := C.ShadingGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Creates a pattern color space. [Full Topic] @@ -1441,7 +1441,7 @@ func GetDisplaysWithRect(rect Rect, maxDisplays uint32, displays *DirectDisplayI (*C.uint32_t)(unsafe.Pointer(&matchingDisplayCount)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the width of the specified display mode. [Full Topic] @@ -1608,7 +1608,7 @@ func ContextRelease(c ContextRef) { func DataConsumerGetTypeID() corefoundation.TypeID { rv := C.DataConsumerGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Completes a set of display configuration changes. [Full Topic] @@ -1623,7 +1623,7 @@ func CompleteDisplayConfiguration(config unsafe.Pointer, option ConfigureOption) (C.CGConfigureOption)(option), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // [Full Topic] @@ -1704,7 +1704,7 @@ func WindowLevelForKey(key WindowLevelKey) WindowLevel { (C.CGWindowLevelKey)(key), ) // *typing.AliasType - return WindowLevel(rv) + return *(*WindowLevel)(unsafe.Pointer(&rv)) } // Sets the rendering intent in the current graphics state. [Full Topic] @@ -1742,7 +1742,7 @@ func ContextSetShadowWithColor(c ContextRef, offset Size, blur float64, color Co func PatternGetTypeID() corefoundation.TypeID { rv := C.PatternGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Retains a Core Graphics display mode. [Full Topic] @@ -1766,7 +1766,7 @@ func EventGetTimestamp(event EventRef) EventTimestamp { unsafe.Pointer(event), ) // *typing.AliasType - return EventTimestamp(rv) + return *(*EventTimestamp)(unsafe.Pointer(&rv)) } // Creates a mutable copy of an existing graphics path. [Full Topic] @@ -1817,7 +1817,7 @@ func DisplayIsStereo(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Transforms the user coordinate system in a context using a specified matrix. [Full Topic] @@ -1964,7 +1964,7 @@ func GetDisplaysWithOpenGLDisplayMask(mask OpenGLDisplayMask, maxDisplays uint32 (*C.uint32_t)(unsafe.Pointer(&matchingDisplayCount)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Creates a shading object to use for axial shading. [Full Topic] @@ -2108,7 +2108,7 @@ func ColorSpaceGetModel(space ColorSpaceRef) ColorSpaceModel { unsafe.Pointer(space), ) // *typing.AliasType - return ColorSpaceModel(rv) + return *(*ColorSpaceModel)(unsafe.Pointer(&rv)) } // Creates a bitmap image using PNG-encoded data supplied by a data provider. [Full Topic] @@ -2188,7 +2188,7 @@ func ConfigureDisplayFadeEffect(config unsafe.Pointer, fadeOutSeconds DisplayFad C.float(fadeBlue), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Performs a single fade operation. [Full Topic] @@ -2219,7 +2219,7 @@ func DisplayFade(token DisplayFadeReservationToken, duration DisplayFadeInterval (C.boolean_t)(synchronous), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Enables or disables subpixel quantization in a graphics context. [Full Topic] @@ -2352,7 +2352,7 @@ func AssociateMouseAndMouseCursorPosition(connected int) Error { (C.boolean_t)(connected), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Increments the retain count of a Core Graphics PDF document. [Full Topic] @@ -2424,7 +2424,7 @@ func SetDisplayTransferByTable(display DirectDisplayID, tableSize uint32, redTab (*C.CGGammaValue)(unsafe.Pointer(&blueTable)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Sets the accuracy of curved paths in a graphics context. [Full Topic] @@ -2449,7 +2449,7 @@ func DisplayIsActive(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Sets the pattern phase of a context. [Full Topic] @@ -2512,7 +2512,7 @@ func GetActiveDisplayList(maxDisplays uint32, activeDisplays *DirectDisplayID, d (*C.uint32_t)(unsafe.Pointer(&displayCount)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Indicates whether or not a graphics path represents a rectangle. [Full Topic] @@ -2563,7 +2563,7 @@ func ContextGetInterpolationQuality(c ContextRef) InterpolationQuality { unsafe.Pointer(c), ) // *typing.AliasType - return InterpolationQuality(rv) + return *(*InterpolationQuality)(unsafe.Pointer(&rv)) } // Creates a conversion between two specified color spaces. [Full Topic] @@ -2755,7 +2755,7 @@ func EventSourceSecondsSinceLastEventType(stateID EventSourceStateID, eventType (C.CGEventType)(eventType), ) // *typing.AliasType - return corefoundation.TimeInterval(rv) + return *(*corefoundation.TimeInterval)(unsafe.Pointer(&rv)) } // Returns the smallest rectangle that results from converting the source rectangle values to integers. [Full Topic] @@ -2838,7 +2838,7 @@ func DisplayUsesOpenGLAcceleration(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Sets how sample values are composited by a graphics context. [Full Topic] @@ -2899,7 +2899,7 @@ func GetDisplaysWithPoint(point Point, maxDisplays uint32, displays *DirectDispl (*C.uint32_t)(unsafe.Pointer(&matchingDisplayCount)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Decrements the retain count of a bitmap image. [Full Topic] @@ -2999,7 +2999,7 @@ func DisplayIsInMirrorSet(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // [Full Topic] @@ -3036,7 +3036,7 @@ func DisplayRelease(display DirectDisplayID) Error { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the document for a page. [Full Topic] @@ -3071,7 +3071,7 @@ func GetDisplayTransferByTable(display DirectDisplayID, capacity uint32, redTabl (*C.uint32_t)(unsafe.Pointer(&sampleCount)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Checks whether two affine transforms are equal. [Full Topic] @@ -3134,7 +3134,7 @@ func EventGetType(event EventRef) EventType { unsafe.Pointer(event), ) // *typing.AliasType - return EventType(rv) + return *(*EventType)(unsafe.Pointer(&rv)) } // Retrieves a real value object from the scanner stack. [Full Topic] @@ -3251,7 +3251,7 @@ func ImageCreateWithJPEGDataProvider(source DataProviderRef, decode *float64, sh func EventSourceGetTypeID() corefoundation.TypeID { rv := C.EventSourceGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Creates a bitmap image from data supplied by a data provider. [Full Topic] @@ -3309,7 +3309,7 @@ func EventSourceGetSourceStateID(source EventSourceRef) EventSourceStateID { unsafe.Pointer(source), ) // *typing.AliasType - return EventSourceStateID(rv) + return *(*EventSourceStateID)(unsafe.Pointer(&rv)) } // Increments the retain count of a CGGradient object. [Full Topic] @@ -3386,7 +3386,7 @@ func CaptureAllDisplaysWithOptions(options CaptureOptions) Error { (C.CGCaptureOptions)(options), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Generates and returns information about windows with the specified window IDs. [Full Topic] @@ -3465,7 +3465,7 @@ func GetOnlineDisplayList(maxDisplays uint32, onlineDisplays *DirectDisplayID, d (*C.uint32_t)(unsafe.Pointer(&displayCount)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns a point that is transformed from user space coordinates to device space coordinates. [Full Topic] @@ -3558,7 +3558,7 @@ func GetDisplayTransferByFormula(display DirectDisplayID, redMin *GammaValue, re (*C.CGGammaValue)(unsafe.Pointer(&blueGamma)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Increments the retain count of a color space. [Full Topic] @@ -3742,7 +3742,7 @@ func ConfigureDisplayWithDisplayMode(config unsafe.Pointer, display DirectDispla unsafe.Pointer(options), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns a copy of the provider’s data. [Full Topic] @@ -3767,7 +3767,7 @@ func DisplayIsInHWMirrorSet(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Returns the mask that indicates which classes of local hardware events are enabled during event suppression. [Full Topic] @@ -3782,7 +3782,7 @@ func EventSourceGetLocalEventsFilterDuringSuppressionState(source EventSourceRef (C.CGEventSuppressionState)(state), ) // *typing.AliasType - return EventFilterMask(rv) + return *(*EventFilterMask)(unsafe.Pointer(&rv)) } // Returns the font table that corresponds to the provided tag. [Full Topic] @@ -3853,7 +3853,7 @@ func ContextSetAllowsFontSubpixelPositioning(c ContextRef, allowsFontSubpixelPos func ColorGetTypeID() corefoundation.TypeID { rv := C.ColorGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // [Full Topic] @@ -3865,7 +3865,7 @@ func ImageGetByteOrderInfo(image ImageRef) ImageByteOrderInfo { unsafe.Pointer(image), ) // *typing.AliasType - return ImageByteOrderInfo(rv) + return *(*ImageByteOrderInfo)(unsafe.Pointer(&rv)) } // Creates a Core Graphics PDF document using a data provider. [Full Topic] @@ -3907,7 +3907,7 @@ func ImageGetPixelFormatInfo(image ImageRef) ImagePixelFormatInfo { unsafe.Pointer(image), ) // *typing.AliasType - return ImagePixelFormatInfo(rv) + return *(*ImagePixelFormatInfo)(unsafe.Pointer(&rv)) } // Returns an array of the variation axis dictionaries for a font. [Full Topic] @@ -3931,7 +3931,7 @@ func ColorSpaceCopyPropertyList(space ColorSpaceRef) corefoundation.PropertyList unsafe.Pointer(space), ) // *typing.AliasType - return corefoundation.PropertyListRef(rv) + return *(*corefoundation.PropertyListRef)(unsafe.Pointer(&rv)) } // Sets the stroke pattern in the specified graphics context. [Full Topic] @@ -3999,7 +3999,7 @@ func WarpMouseCursorPosition(newCursorPosition Point) Error { *(*C.CGPoint)(unsafe.Pointer(&newCursorPosition)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Moves the mouse cursor to a specified point relative to the upper-left corner of the display. [Full Topic] @@ -4014,7 +4014,7 @@ func DisplayMoveCursorToPoint(display DirectDisplayID, point Point) Error { *(*C.CGPoint)(unsafe.Pointer(&point)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Generates and returns information about the selected windows in the current user session. [Full Topic] @@ -4043,7 +4043,7 @@ func ShieldingWindowID(display DirectDisplayID) WindowID { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return WindowID(rv) + return *(*WindowID)(unsafe.Pointer(&rv)) } // [Full Topic] @@ -4098,7 +4098,7 @@ func ImageGetBitsPerComponent(image ImageRef) uint { func CaptureAllDisplays() Error { rv := C.CaptureAllDisplays() // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Gets the scale of pixels per line in a scrolling event source. [Full Topic] @@ -4235,7 +4235,7 @@ func RectGetMinY(rect Rect) float64 { func ColorSpaceGetTypeID() corefoundation.TypeID { rv := C.ColorSpaceGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Increments the retain count of a shading object. [Full Topic] @@ -4292,7 +4292,7 @@ func PDFPageRelease(page PDFPageRef) { func ImageGetTypeID() corefoundation.TypeID { rv := C.ImageGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Rotates the user coordinate system in a context. [Full Topic] @@ -4366,7 +4366,7 @@ func DisplayPrimaryDisplay(display DirectDisplayID) DirectDisplayID { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return DirectDisplayID(rv) + return *(*DirectDisplayID)(unsafe.Pointer(&rv)) } // Sets a destination to jump to when a point in the current page of a PDF graphics context is clicked. [Full Topic] @@ -4566,7 +4566,7 @@ func PDFContextCreateWithURL(url corefoundation.URLRef, mediaBox *Rect, auxiliar func PDFPageGetTypeID() corefoundation.TypeID { rv := C.PDFPageGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Creates a content stream object from a PDF page object. [Full Topic] @@ -4907,7 +4907,7 @@ func DisplayIDToOpenGLDisplayMask(display DirectDisplayID) OpenGLDisplayMask { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return OpenGLDisplayMask(rv) + return *(*OpenGLDisplayMask)(unsafe.Pointer(&rv)) } // Returns the largest value of the x-coordinate for the rectangle. [Full Topic] @@ -4940,7 +4940,7 @@ func ContextIsPathEmpty(c ContextRef) bool { func ColorConversionInfoGetTypeID() corefoundation.TypeID { rv := C.ColorConversionInfoGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Returns the number of bits allocated for a single pixel in a bitmap image. [Full Topic] @@ -5058,7 +5058,7 @@ func ConfigureDisplayOrigin(config unsafe.Pointer, display DirectDisplayID, x in C.int32_t(y), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // [Full Topic] @@ -5093,7 +5093,7 @@ func BitmapContextGetAlphaInfo(context ContextRef) ImageAlphaInfo { unsafe.Pointer(context), ) // *typing.AliasType - return ImageAlphaInfo(rv) + return *(*ImageAlphaInfo)(unsafe.Pointer(&rv)) } // Closes and terminates the current path’s subpath. [Full Topic] @@ -5146,7 +5146,7 @@ func EventCreateMouseEvent(source EventSourceRef, mouseType EventType, mouseCurs func MainDisplayID() DirectDisplayID { rv := C.MainDisplayID() // *typing.AliasType - return DirectDisplayID(rv) + return *(*DirectDisplayID)(unsafe.Pointer(&rv)) } // Returns an affine transformation matrix constructed by translating an existing affine transform. [Full Topic] @@ -5200,7 +5200,7 @@ func EventSourceGetKeyboardType(source EventSourceRef) EventSourceKeyboardType { unsafe.Pointer(source), ) // *typing.AliasType - return EventSourceKeyboardType(rv) + return *(*EventSourceKeyboardType)(unsafe.Pointer(&rv)) } // Begins a new page in a PDF graphics context. [Full Topic] @@ -5238,7 +5238,7 @@ func PDFDocumentGetAccessPermissions(document PDFDocumentRef) PDFAccessPermissio unsafe.Pointer(document), ) // *typing.AliasType - return PDFAccessPermissions(rv) + return *(*PDFAccessPermissions)(unsafe.Pointer(&rv)) } // Returns an affine transformation matrix constructed by rotating an existing affine transform. [Full Topic] @@ -5304,7 +5304,7 @@ func PDFPageGetDrawingTransform(page PDFPageRef, box PDFBox, rect Rect, rotate i func ShieldingWindowLevel() WindowLevel { rv := C.ShieldingWindowLevel() // *typing.AliasType - return WindowLevel(rv) + return *(*WindowLevel)(unsafe.Pointer(&rv)) } // Returns a Boolean value indicating whether the specified display mode is usable for a desktop graphical user interface. [Full Topic] @@ -5325,7 +5325,7 @@ func DisplayModeIsUsableForDesktopGUI(mode DisplayModeRef) bool { func GradientGetTypeID() corefoundation.TypeID { rv := C.GradientGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Returns a dictionary representation of the specified point. [Full Topic] @@ -5514,7 +5514,7 @@ func DisplayCapture(display DirectDisplayID) Error { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Adds an ellipse that fits inside the specified rectangle. [Full Topic] @@ -5715,7 +5715,7 @@ func SetDisplayTransferByByteTable(display DirectDisplayID, tableSize uint32, re (*C.uint8_t)(unsafe.Pointer(&blueTable)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the data provider for a bitmap image. [Full Topic] @@ -5750,7 +5750,7 @@ func ContextSetFillPattern(c ContextRef, pattern PatternRef, components *float64 func DataProviderGetTypeID() corefoundation.TypeID { rv := C.DataProviderGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Creates a direct-access data provider that uses a file to supply data. [Full Topic] @@ -5896,7 +5896,7 @@ func FontGetGlyphWithGlyphName(font FontRef, name corefoundation.StringRef) Glyp unsafe.Pointer(name), ) // *typing.AliasType - return Glyph(rv) + return *(*Glyph)(unsafe.Pointer(&rv)) } // Returns a dictionary representation of the provided rectangle. [Full Topic] @@ -5954,7 +5954,7 @@ func DisplaySetStereoOperation(display DirectDisplayID, stereo int, forceBlueLin (C.CGConfigureOption)(option), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the interpolation setting for a bitmap image. [Full Topic] @@ -5985,7 +5985,7 @@ func ContextFillPath(c ContextRef) { func PDFDocumentGetTypeID() corefoundation.TypeID { rv := C.PDFDocumentGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Returns the rendering intent setting for a bitmap image. [Full Topic] @@ -5997,7 +5997,7 @@ func ImageGetRenderingIntent(image ImageRef) ColorRenderingIntent { unsafe.Pointer(image), ) // *typing.AliasType - return ColorRenderingIntent(rv) + return *(*ColorRenderingIntent)(unsafe.Pointer(&rv)) } // Posts a Quartz event into the event stream at a specified location. [Full Topic] @@ -6062,7 +6062,7 @@ func DisplayCaptureWithOptions(display DirectDisplayID, options CaptureOptions) (C.CGCaptureOptions)(options), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Checks to see whether the specified point is contained in the current path. [Full Topic] @@ -6122,7 +6122,7 @@ func PathRelease(path unsafe.Pointer) { func PathGetTypeID() corefoundation.TypeID { rv := C.PathGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Decrements the retain count of a PDF document. [Full Topic] @@ -6212,7 +6212,7 @@ func PDFObjectGetType(object unsafe.Pointer) PDFObjectType { unsafe.Pointer(object), ) // *typing.AliasType - return PDFObjectType(rv) + return *(*PDFObjectType)(unsafe.Pointer(&rv)) } // Creates a bitmap image mask from data supplied by a data provider. [Full Topic] @@ -6327,7 +6327,7 @@ func ConfigureDisplayMirrorOfDisplay(config unsafe.Pointer, display DirectDispla (C.CGDirectDisplayID)(master), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the refresh rate of the specified display mode. [Full Topic] @@ -6351,7 +6351,7 @@ func EventSourceGetLocalEventsSuppressionInterval(source EventSourceRef) corefou unsafe.Pointer(source), ) // *typing.AliasType - return corefoundation.TimeInterval(rv) + return *(*corefoundation.TimeInterval)(unsafe.Pointer(&rv)) } // Adds an arc of a circle to the current path, using a radius and tangent points. [Full Topic] @@ -6422,7 +6422,7 @@ func AcquireDisplayFadeReservation(seconds DisplayReservationInterval, token *Di (*C.CGDisplayFadeReservationToken)(unsafe.Pointer(&token)), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the event flags of a Quartz event. [Full Topic] @@ -6434,7 +6434,7 @@ func EventGetFlags(event EventRef) EventFlags { unsafe.Pointer(event), ) // *typing.AliasType - return EventFlags(rv) + return *(*EventFlags)(unsafe.Pointer(&rv)) } // Returns the glyph name of the specified glyph in the specified font. [Full Topic] @@ -6659,7 +6659,7 @@ func ColorGetComponents(color ColorRef) *float64 { func ContextGetTypeID() corefoundation.TypeID { rv := C.ContextGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Creates a data consumer that writes to a CFData object. [Full Topic] @@ -6736,7 +6736,7 @@ func ConfigureDisplayStereoOperation(config unsafe.Pointer, display DirectDispla (C.boolean_t)(forceBlueLine), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns a size that is transformed from user space coordinates to device space coordinates. [Full Topic] @@ -6787,7 +6787,7 @@ func DisplayIsBuiltin(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Hides the mouse cursor, and increments the hide cursor count. [Full Topic] @@ -6800,7 +6800,7 @@ func DisplayHideCursor(display DirectDisplayID) Error { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the logical unit number of a display. [Full Topic] @@ -6830,7 +6830,7 @@ func DisplaySetDisplayMode(display DirectDisplayID, mode DisplayModeRef, options unsafe.Pointer(options), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Draws glyphs at the provided position. [Full Topic] @@ -6879,7 +6879,7 @@ func FontGetLeading(font FontRef) int { func PSConverterGetTypeID() corefoundation.TypeID { rv := C.PSConverterGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Creates a gradient object from a color space and the provided color objects and locations. [Full Topic] @@ -6908,7 +6908,7 @@ func DisplayIsAlwaysInMirrorSet(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Creates a dashed copy of another path. [Full Topic] @@ -6960,7 +6960,7 @@ func CancelDisplayConfiguration(config unsafe.Pointer) Error { unsafe.Pointer(config), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Appends an array of new line segments to a mutable graphics path. [Full Topic] @@ -7016,7 +7016,7 @@ func SetDisplayTransferByFormula(display DirectDisplayID, redMin GammaValue, red (C.CGGammaValue)(blueGamma), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns a Boolean value indicating whether a display is sleeping (and is therefore not drawable). [Full Topic] @@ -7029,7 +7029,7 @@ func DisplayIsAsleep(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Returns the bitmap information for a bitmap image. [Full Topic] @@ -7041,7 +7041,7 @@ func ImageGetBitmapInfo(image ImageRef) BitmapInfo { unsafe.Pointer(image), ) // *typing.AliasType - return BitmapInfo(rv) + return *(*BitmapInfo)(unsafe.Pointer(&rv)) } // Returns the width in pixels of a bitmap context. [Full Topic] @@ -7264,7 +7264,7 @@ func RectContainsPoint(rect Rect, point Point) bool { func FontGetTypeID() corefoundation.TypeID { rv := C.FontGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Returns a graphics context suitable for drawing to a captured display. [Full Topic] @@ -7314,7 +7314,7 @@ func DisplayMirrorsDisplay(display DirectDisplayID) DirectDisplayID { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return DirectDisplayID(rv) + return *(*DirectDisplayID)(unsafe.Pointer(&rv)) } // Checks whether an affine transform is the identity transform. [Full Topic] @@ -7496,7 +7496,7 @@ func OpenGLDisplayMaskToDisplayID(mask OpenGLDisplayMask) DirectDisplayID { (C.CGOpenGLDisplayMask)(mask), ) // *typing.AliasType - return DirectDisplayID(rv) + return *(*DirectDisplayID)(unsafe.Pointer(&rv)) } // Forces all pending drawing operations in a window context to be rendered immediately to the destination device. [Full Topic] @@ -7627,7 +7627,7 @@ func ContextClip(c ContextRef) { func ReleaseAllDisplays() Error { rv := C.ReleaseAllDisplays() // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Returns the serial number of a display monitor. [Full Topic] @@ -7917,7 +7917,7 @@ func LayerRelease(layer LayerRef) { func LayerGetTypeID() corefoundation.TypeID { rv := C.LayerGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Returns the type identifier for Core Graphics function objects. [Full Topic] @@ -7926,7 +7926,7 @@ func LayerGetTypeID() corefoundation.TypeID { func FunctionGetTypeID() corefoundation.TypeID { rv := C.FunctionGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Gets the array of PDF content streams contained in a PDF content stream object. [Full Topic] @@ -7963,7 +7963,7 @@ func DisplayShowCursor(display DirectDisplayID) Error { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return Error(rv) + return *(*Error)(unsafe.Pointer(&rv)) } // Obtains the bitmap information associated with a bitmap graphics context. [Full Topic] @@ -7975,7 +7975,7 @@ func BitmapContextGetBitmapInfo(context ContextRef) BitmapInfo { unsafe.Pointer(context), ) // *typing.AliasType - return BitmapInfo(rv) + return *(*BitmapInfo)(unsafe.Pointer(&rv)) } // Returns an affine transformation matrix constructed by scaling an existing affine transform. [Full Topic] @@ -8027,7 +8027,7 @@ func DisplayIsMain(display DirectDisplayID) int { (C.CGDirectDisplayID)(display), ) // *typing.AliasType - return int(rv) + return *(*int)(unsafe.Pointer(&rv)) } // Creates a mutable graphics path. [Full Topic] @@ -8068,7 +8068,7 @@ func ContextSetLineDash(c ContextRef, phase float64, lengths *float64, count uin func DisplayModeGetTypeID() corefoundation.TypeID { rv := C.DisplayModeGetTypeID() // *typing.AliasType - return corefoundation.TypeID(rv) + return *(*corefoundation.TypeID)(unsafe.Pointer(&rv)) } // Returns the current flags of a Quartz event source. [Full Topic] @@ -8081,7 +8081,7 @@ func EventSourceFlagsState(stateID EventSourceStateID) EventFlags { (C.CGEventSourceStateID)(stateID), ) // *typing.AliasType - return EventFlags(rv) + return *(*EventFlags)(unsafe.Pointer(&rv)) } // [Full Topic] diff --git a/macos/metal/functions.gen.go b/macos/metal/functions.gen.go index f83e6fc5..c6a410a6 100644 --- a/macos/metal/functions.gen.go +++ b/macos/metal/functions.gen.go @@ -6,12 +6,171 @@ package metal // #import // #import // #import "Metal/Metal.h" +// MTLRegion RegionMake2D(uint x, uint y, uint width, uint height); +// void RemoveDeviceObserver(void * observer); +// MTLRegion RegionMake1D(uint x, uint width); +// MTLCoordinate2D Coordinate2DMake(float x, float y); +// MTLRegion RegionMake3D(uint x, uint y, uint z, uint width, uint height, uint depth); +// MTLSamplePosition SamplePositionMake(float x, float y); +// MTLClearColor ClearColorMake(double red, double green, double blue, double alpha); +// MTLTextureSwizzleChannels TextureSwizzleChannelsMake(MTLTextureSwizzle r, MTLTextureSwizzle g, MTLTextureSwizzle b, MTLTextureSwizzle a); +// MTLOrigin OriginMake(uint x, uint y, uint z); // void * CreateSystemDefaultDevice(); import "C" import ( + "unsafe" + "github.com/progrium/macdriver/objc" ) +// Creates a 3D representation of a 2D region. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/1515675-mtlregionmake2d?language=objc +func RegionMake2D(x uint, y uint, width uint, height uint) Region { + rv := C.RegionMake2D( + // *typing.PrimitiveType + C.uint(x), + // *typing.PrimitiveType + C.uint(y), + // *typing.PrimitiveType + C.uint(width), + // *typing.PrimitiveType + C.uint(height), + ) + // *typing.StructType + return *(*Region)(unsafe.Pointer(&rv)) +} + +// Removes a registered observer of device notifications. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/2869724-mtlremovedeviceobserver?language=objc +func RemoveDeviceObserver(observer objc.Object) { + C.RemoveDeviceObserver( + // *typing.IDType + observer.Ptr(), + ) +} + +// Creates a 3D representation of a 1D region. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/1516011-mtlregionmake1d?language=objc +func RegionMake1D(x uint, width uint) Region { + rv := C.RegionMake1D( + // *typing.PrimitiveType + C.uint(x), + // *typing.PrimitiveType + C.uint(width), + ) + // *typing.StructType + return *(*Region)(unsafe.Pointer(&rv)) +} + +// Returns a new 2D point with the specified coordinates. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/3088856-mtlcoordinate2dmake?language=objc +func Coordinate2DMake(x float64, y float64) Coordinate2D { + rv := C.Coordinate2DMake( + // *typing.PrimitiveType + C.float(x), + // *typing.PrimitiveType + C.float(y), + ) + // *typing.AliasType + return *(*Coordinate2D)(unsafe.Pointer(&rv)) +} + +// Creates a 3D region. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/1515765-mtlregionmake3d?language=objc +func RegionMake3D(x uint, y uint, z uint, width uint, height uint, depth uint) Region { + rv := C.RegionMake3D( + // *typing.PrimitiveType + C.uint(x), + // *typing.PrimitiveType + C.uint(y), + // *typing.PrimitiveType + C.uint(z), + // *typing.PrimitiveType + C.uint(width), + // *typing.PrimitiveType + C.uint(height), + // *typing.PrimitiveType + C.uint(depth), + ) + // *typing.StructType + return *(*Region)(unsafe.Pointer(&rv)) +} + +// Returns a new sample position on a subpixel grid. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/2866347-mtlsamplepositionmake?language=objc +func SamplePositionMake(x float64, y float64) SamplePosition { + rv := C.SamplePositionMake( + // *typing.PrimitiveType + C.float(x), + // *typing.PrimitiveType + C.float(y), + ) + // *typing.StructType + return *(*SamplePosition)(unsafe.Pointer(&rv)) +} + +// Returns a color value used to clear a color attachment. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/1437971-mtlclearcolormake?language=objc +func ClearColorMake(red float64, green float64, blue float64, alpha float64) ClearColor { + rv := C.ClearColorMake( + // *typing.PrimitiveType + C.double(red), + // *typing.PrimitiveType + C.double(green), + // *typing.PrimitiveType + C.double(blue), + // *typing.PrimitiveType + C.double(alpha), + ) + // *typing.StructType + return *(*ClearColor)(unsafe.Pointer(&rv)) +} + +// Creates a new swizzle pattern. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/3114319-mtltextureswizzlechannelsmake?language=objc +func TextureSwizzleChannelsMake(r TextureSwizzle, g TextureSwizzle, b TextureSwizzle, a TextureSwizzle) TextureSwizzleChannels { + rv := C.TextureSwizzleChannelsMake( + // *typing.AliasType + // *typing.PrimitiveType + (C.MTLTextureSwizzle)(r), + // *typing.AliasType + // *typing.PrimitiveType + (C.MTLTextureSwizzle)(g), + // *typing.AliasType + // *typing.PrimitiveType + (C.MTLTextureSwizzle)(b), + // *typing.AliasType + // *typing.PrimitiveType + (C.MTLTextureSwizzle)(a), + ) + // *typing.StructType + return *(*TextureSwizzleChannels)(unsafe.Pointer(&rv)) +} + +// Returns a new origin with the specified coordinates. [Full Topic] +// +// [Full Topic]: https://developer.apple.com/documentation/metal/1516140-mtloriginmake?language=objc +func OriginMake(x uint, y uint, z uint) Origin { + rv := C.OriginMake( + // *typing.PrimitiveType + C.uint(x), + // *typing.PrimitiveType + C.uint(y), + // *typing.PrimitiveType + C.uint(z), + ) + // *typing.StructType + return *(*Origin)(unsafe.Pointer(&rv)) +} + // Returns the device instance Metal selects as the default. [Full Topic] // // [Full Topic]: https://developer.apple.com/documentation/metal/1433401-mtlcreatesystemdefaultdevice?language=objc diff --git a/macos/metal/functions.gen.m b/macos/metal/functions.gen.m index e36f611f..b65f7cef 100644 --- a/macos/metal/functions.gen.m +++ b/macos/metal/functions.gen.m @@ -1,6 +1,98 @@ // AUTO-GENERATED CODE, DO NOT MODIFY #import "Metal/Metal.h" +MTLRegion RegionMake2D(uint x, uint y, uint width, uint height) { + return (MTLRegion)MTLRegionMake2D( + // *typing.PrimitiveType + (NSUInteger)x, + // *typing.PrimitiveType + (NSUInteger)y, + // *typing.PrimitiveType + (NSUInteger)width, + // *typing.PrimitiveType + (NSUInteger)height + ); +} +void RemoveDeviceObserver(void * observer) { + return (void)MTLRemoveDeviceObserver( + // *typing.IDType + (id)observer + ); +} +MTLRegion RegionMake1D(uint x, uint width) { + return (MTLRegion)MTLRegionMake1D( + // *typing.PrimitiveType + (NSUInteger)x, + // *typing.PrimitiveType + (NSUInteger)width + ); +} +MTLCoordinate2D Coordinate2DMake(float x, float y) { + return (MTLCoordinate2D)MTLCoordinate2DMake( + // *typing.PrimitiveType + (float)x, + // *typing.PrimitiveType + (float)y + ); +} +MTLRegion RegionMake3D(uint x, uint y, uint z, uint width, uint height, uint depth) { + return (MTLRegion)MTLRegionMake3D( + // *typing.PrimitiveType + (NSUInteger)x, + // *typing.PrimitiveType + (NSUInteger)y, + // *typing.PrimitiveType + (NSUInteger)z, + // *typing.PrimitiveType + (NSUInteger)width, + // *typing.PrimitiveType + (NSUInteger)height, + // *typing.PrimitiveType + (NSUInteger)depth + ); +} +MTLSamplePosition SamplePositionMake(float x, float y) { + return (MTLSamplePosition)MTLSamplePositionMake( + // *typing.PrimitiveType + (float)x, + // *typing.PrimitiveType + (float)y + ); +} +MTLClearColor ClearColorMake(double red, double green, double blue, double alpha) { + return (MTLClearColor)MTLClearColorMake( + // *typing.PrimitiveType + (double)red, + // *typing.PrimitiveType + (double)green, + // *typing.PrimitiveType + (double)blue, + // *typing.PrimitiveType + (double)alpha + ); +} +MTLTextureSwizzleChannels TextureSwizzleChannelsMake(MTLTextureSwizzle r, MTLTextureSwizzle g, MTLTextureSwizzle b, MTLTextureSwizzle a) { + return (MTLTextureSwizzleChannels)MTLTextureSwizzleChannelsMake( + // *typing.AliasType + (MTLTextureSwizzle)r, + // *typing.AliasType + (MTLTextureSwizzle)g, + // *typing.AliasType + (MTLTextureSwizzle)b, + // *typing.AliasType + (MTLTextureSwizzle)a + ); +} +MTLOrigin OriginMake(uint x, uint y, uint z) { + return (MTLOrigin)MTLOriginMake( + // *typing.PrimitiveType + (NSUInteger)x, + // *typing.PrimitiveType + (NSUInteger)y, + // *typing.PrimitiveType + (NSUInteger)z + ); +} void * CreateSystemDefaultDevice() { return (void *)MTLCreateSystemDefaultDevice( ); diff --git a/macos/metal/metal_structs.go b/macos/metal/metal_structs.go index 8c5a4889..71a59053 100644 --- a/macos/metal/metal_structs.go +++ b/macos/metal/metal_structs.go @@ -15,6 +15,9 @@ type Viewport struct{} type ScissorRect struct{} type VertexAmplificationViewMapping struct{} type SizeAndAlign struct{} -type SamplePosition struct{} +type SamplePosition struct { + X float32 + Y float32 +} type ClearColor struct{} type AccelerationStructureSizes struct{} diff --git a/macos/mps/functions.gen.go b/macos/mps/functions.gen.go index 2fe25c75..c4d20482 100644 --- a/macos/mps/functions.gen.go +++ b/macos/mps/functions.gen.go @@ -7,27 +7,28 @@ package mps // #import // #import "MetalPerformanceShaders/MetalPerformanceShaders.h" // uint StateBatchResourceSize(MPSStateBatch* batch); -// void HintTemporaryMemoryHighWaterMark(id cmdBuf, uint bytes); +// void HintTemporaryMemoryHighWaterMark(void * cmdBuf, uint bytes); // uint ImageBatchResourceSize(MPSImageBatch* batch); -// void SetHeapCacheDuration(id cmdBuf, double seconds); +// void SetHeapCacheDuration(void * cmdBuf, double seconds); // uint StateBatchIncrementReadCount(MPSStateBatch* batch, long amount); -// void StateBatchSynchronize(MPSStateBatch* batch, id cmdBuf); +// void StateBatchSynchronize(MPSStateBatch* batch, void * cmdBuf); // int32_t GetCustomKernelBatchedDestinationIndex(MPSCustomKernelArgumentCount c); // int32_t GetCustomKernelMaxBatchSize(MPSCustomKernelArgumentCount c, int32_t MPSMaxTextures); // uint ImageBatchIncrementReadCount(MPSImageBatch* batch, long amount); -// id GetPreferredDevice(MPSDeviceOptions options); +// void * GetPreferredDevice(MPSDeviceOptions options); // int32_t GetCustomKernelBroadcastSourceIndex(MPSCustomKernelArgumentCount c, int32_t sourceIndex, int32_t MPSMaxTextures); // MPSImageType GetImageType(void * image); // MPSIntegerDivisionParams FindIntegerDivisionParams(uint16_t divisor); // int32_t GetCustomKernelBatchedSourceIndex(MPSCustomKernelArgumentCount c, int32_t sourceIndex, int32_t MPSMaxTextures); -// void ImageBatchSynchronize(MPSImageBatch* batch, id cmdBuf); -// bool SupportsMTLDevice(id device); +// void ImageBatchSynchronize(MPSImageBatch* batch, void * cmdBuf); +// bool SupportsMTLDevice(void * device); import "C" import ( "unsafe" "github.com/progrium/macdriver/macos/foundation" "github.com/progrium/macdriver/macos/metal" + "github.com/progrium/macdriver/objc" ) // Returns the number of bytes used to allocate the specified state batch. [Full Topic] @@ -154,7 +155,7 @@ func GetPreferredDevice(options DeviceOptions) metal.DeviceWrapper { (C.MPSDeviceOptions)(options), ) // *typing.ProtocolType - return metal.DeviceWrapper(rv) + return metal.DeviceWrapper{objc.ObjectFrom(rv)} } // Returns the index of the specified nonbatched source texture argument. [Full Topic] diff --git a/macos/mps/functions.gen.m b/macos/mps/functions.gen.m index db0fdcaa..8af2b779 100644 --- a/macos/mps/functions.gen.m +++ b/macos/mps/functions.gen.m @@ -8,7 +8,7 @@ uint StateBatchResourceSize(MPSStateBatch* batch) { (MPSStateBatch*)batch ); } -void HintTemporaryMemoryHighWaterMark(id cmdBuf, uint bytes) { +void HintTemporaryMemoryHighWaterMark(void * cmdBuf, uint bytes) { return (void)MPSHintTemporaryMemoryHighWaterMark( // *typing.ProtocolType (id)cmdBuf, @@ -23,7 +23,7 @@ uint ImageBatchResourceSize(MPSImageBatch* batch) { (MPSImageBatch*)batch ); } -void SetHeapCacheDuration(id cmdBuf, double seconds) { +void SetHeapCacheDuration(void * cmdBuf, double seconds) { return (void)MPSSetHeapCacheDuration( // *typing.ProtocolType (id)cmdBuf, @@ -40,7 +40,7 @@ uint StateBatchIncrementReadCount(MPSStateBatch* batch, long amount) { (NSInteger)amount ); } -void StateBatchSynchronize(MPSStateBatch* batch, id cmdBuf) { +void StateBatchSynchronize(MPSStateBatch* batch, void * cmdBuf) { return (void)MPSStateBatchSynchronize( // *typing.PointerType // -> *typing.AliasType @@ -72,8 +72,8 @@ uint ImageBatchIncrementReadCount(MPSImageBatch* batch, long amount) { (NSInteger)amount ); } -id GetPreferredDevice(MPSDeviceOptions options) { - return (id)MPSGetPreferredDevice( +void * GetPreferredDevice(MPSDeviceOptions options) { + return (void *)MPSGetPreferredDevice( // *typing.AliasType (MPSDeviceOptions)options ); @@ -110,7 +110,7 @@ int32_t GetCustomKernelBatchedSourceIndex(MPSCustomKernelArgumentCount c, int32_ (int32_t)MPSMaxTextures ); } -void ImageBatchSynchronize(MPSImageBatch* batch, id cmdBuf) { +void ImageBatchSynchronize(MPSImageBatch* batch, void * cmdBuf) { return (void)MPSImageBatchSynchronize( // *typing.PointerType // -> *typing.AliasType @@ -119,7 +119,7 @@ void ImageBatchSynchronize(MPSImageBatch* batch, id cmdBuf) { (id)cmdBuf ); } -bool SupportsMTLDevice(id device) { +bool SupportsMTLDevice(void * device) { return (bool)MPSSupportsMTLDevice( // *typing.ProtocolType (id)device