diff --git a/src/frameworks/AVFoundation/constants.m b/src/frameworks/AVFoundation/constants.m index 6215c18cf..965b3b077 100644 --- a/src/frameworks/AVFoundation/constants.m +++ b/src/frameworks/AVFoundation/constants.m @@ -60,6 +60,9 @@ NSString *const AVVideoHeightKey = @"AVVideoHeightKey"; NSString *const AVVideoMaxKeyFrameIntervalKey = @"MaxKeyFrameInterval"; NSString *const AVVideoWidthKey = @"AVVideoWidthKey"; +NSString *const AVVideoScalingModeKey = @"AVVideoScalingModeKey"; +NSString *const AVVideoScalingModeResizeAspectFill = @"AVVideoScalingModeResizeAspectFill"; + const AVCaptureSessionPreset AVCaptureSessionPreset3840x2160 = @"AVCaptureSessionPreset3840x2160"; const AVCaptureSessionPreset AVCaptureSessionPreset1920x1080 = @"AVCaptureSessionPreset1920x1080"; const AVCaptureSessionPreset AVCaptureSessionPreset1280x720 = @"AVCaptureSessionPreset1280x720"; @@ -83,6 +86,7 @@ const AVLayerVideoGravity AVLayerVideoGravityResizeAspect = @"AVLayerVideoGravit const AVLayerVideoGravity AVLayerVideoGravityResizeAspectFill = @"AVLayerVideoGravityResizeAspectFill"; const AVMediaType AVMediaTypeAudio = @"soun"; +const AVMediaType AVMediaTypeMuxed = @"muxx"; const AVMediaType AVMediaTypeVideo = @"vide"; const AVMetadataKey AVMetadataCommonKeyAlbumName = @"albumName"; diff --git a/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h b/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h index a31b5ee3f..5aa658083 100644 --- a/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h +++ b/src/frameworks/AVFoundation/include/AVFoundation/AVMediaFormat.h @@ -14,6 +14,7 @@ typedef NSString *AVMediaType; typedef NSString *AVFileType; extern const AVMediaType AVMediaTypeAudio; +extern const AVMediaType AVMediaTypeMuxed; extern const AVMediaType AVMediaTypeVideo; extern const AVFileType AVFileTypeMPEG4; diff --git a/src/frameworks/AVFoundation/include/AVFoundation/AVVideoSettings.h b/src/frameworks/AVFoundation/include/AVFoundation/AVVideoSettings.h index 2e9b915f9..68e8f7814 100644 --- a/src/frameworks/AVFoundation/include/AVFoundation/AVVideoSettings.h +++ b/src/frameworks/AVFoundation/include/AVFoundation/AVVideoSettings.h @@ -10,3 +10,6 @@ extern NSString *const AVVideoCodecKey; extern NSString *const AVVideoCompressionPropertiesKey; extern NSString *const AVVideoHeightKey; extern NSString *const AVVideoWidthKey; + +extern NSString *const AVVideoScalingModeKey; +extern NSString *const AVVideoScalingModeResizeAspectFill; diff --git a/src/frameworks/CoreBluetooth/CMakeLists.txt b/src/frameworks/CoreBluetooth/CMakeLists.txt index fa1edc238..566c769b4 100644 --- a/src/frameworks/CoreBluetooth/CMakeLists.txt +++ b/src/frameworks/CoreBluetooth/CMakeLists.txt @@ -43,6 +43,7 @@ add_framework(CoreBluetooth src/CBManager.m src/CBATTRequest.m src/CBPairingAgent.m + src/CBError.m DEPENDENCIES system diff --git a/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBAdvertisementData.h b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBAdvertisementData.h new file mode 100644 index 000000000..17208ee00 --- /dev/null +++ b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBAdvertisementData.h @@ -0,0 +1,27 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +extern NSString *const CBAdvertisementDataLocalNameKey; +extern NSString *const CBAdvertisementDataManufacturerDataKey; +extern NSString *const CBAdvertisementDataServiceDataKey; +extern NSString *const CBAdvertisementDataServiceUUIDsKey; +extern NSString *const CBAdvertisementDataOverflowServiceUUIDsKey; +extern NSString *const CBAdvertisementDataTxPowerLevelKey; diff --git a/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBCentralManager.h b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBCentralManager.h index d8d316eb6..7dcf5c8f2 100644 --- a/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBCentralManager.h +++ b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBCentralManager.h @@ -18,6 +18,7 @@ */ #include +#import @interface CBCentralManager : NSObject diff --git a/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBCentralManagerConstants.h b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBCentralManagerConstants.h new file mode 100644 index 000000000..878de32e9 --- /dev/null +++ b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBCentralManagerConstants.h @@ -0,0 +1,22 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +extern NSString *const CBCentralManagerScanOptionAllowDuplicatesKey; diff --git a/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBError.h b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBError.h new file mode 100644 index 000000000..c5de34666 --- /dev/null +++ b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CBError.h @@ -0,0 +1,23 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +extern NSString *const CBErrorDomain; +extern NSString *const CBATTErrorDomain; diff --git a/src/frameworks/CoreBluetooth/include/CoreBluetooth/CoreBluetooth.h b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CoreBluetooth.h index 23c482f9a..887e59aa9 100644 --- a/src/frameworks/CoreBluetooth/include/CoreBluetooth/CoreBluetooth.h +++ b/src/frameworks/CoreBluetooth/include/CoreBluetooth/CoreBluetooth.h @@ -39,7 +39,9 @@ #import #import #import +#import #import +#import #import #import #import diff --git a/src/frameworks/CoreBluetooth/src/CBCentralManager.m b/src/frameworks/CoreBluetooth/src/CBCentralManager.m index dd8f66d6e..e78725be9 100644 --- a/src/frameworks/CoreBluetooth/src/CBCentralManager.m +++ b/src/frameworks/CoreBluetooth/src/CBCentralManager.m @@ -19,6 +19,8 @@ #import +NSString *const CBCentralManagerScanOptionAllowDuplicatesKey = @"kCBScanOptionAllowDuplicates"; + @implementation CBCentralManager - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector diff --git a/src/frameworks/CoreBluetooth/src/CBError.m b/src/frameworks/CoreBluetooth/src/CBError.m new file mode 100644 index 000000000..f778d0691 --- /dev/null +++ b/src/frameworks/CoreBluetooth/src/CBError.m @@ -0,0 +1,23 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +NSString *const CBErrorDomain = @"CBErrorDomain"; +NSString *const CBATTErrorDomain = @"CBATTErrorDomain"; diff --git a/src/frameworks/CoreBluetooth/src/CoreBluetooth.m b/src/frameworks/CoreBluetooth/src/CoreBluetooth.m index 020b8e4c2..fa17f910d 100644 --- a/src/frameworks/CoreBluetooth/src/CoreBluetooth.m +++ b/src/frameworks/CoreBluetooth/src/CoreBluetooth.m @@ -22,6 +22,13 @@ #include #include +NSString *const CBAdvertisementDataLocalNameKey = @"kCBAdvDataLocalName"; +NSString *const CBAdvertisementDataManufacturerDataKey = @"kCBAdvDataManufacturerData"; +NSString *const CBAdvertisementDataServiceDataKey = @"kCBAdvDataServiceData"; +NSString *const CBAdvertisementDataServiceUUIDsKey = @"kCBAdvDataServiceUUIDs"; +NSString *const CBAdvertisementDataOverflowServiceUUIDsKey = @"kCBAdvDataHashedServiceUUIDs"; +NSString *const CBAdvertisementDataTxPowerLevelKey = @"kCBAdvDataTxPowerLevel"; + static int verbose = 0; __attribute__((constructor)) diff --git a/src/frameworks/CoreMIDI/include/CoreMIDI/MIDIServices.h b/src/frameworks/CoreMIDI/include/CoreMIDI/MIDIServices.h index a55d82e1d..e0b9e903b 100644 --- a/src/frameworks/CoreMIDI/include/CoreMIDI/MIDIServices.h +++ b/src/frameworks/CoreMIDI/include/CoreMIDI/MIDIServices.h @@ -6,7 +6,7 @@ /* Identification */ extern const CFStringRef kMIDIPropertyName API_AVAILABLE(macos(10.0)); // extern const CFStringRef kMIDIPropertyModel API_AVAILABLE(macos(10.0)); -// extern const CFStringRef kMIDIPropertyManufacturer API_AVAILABLE(macos(10.0)); +extern const CFStringRef kMIDIPropertyManufacturer API_AVAILABLE(macos(10.0)); extern const CFStringRef kMIDIPropertyUniqueID API_AVAILABLE(macos(10.0)); // extern const CFStringRef kMIDIPropertyDeviceID API_AVAILABLE(macos(10.0)); @@ -23,7 +23,7 @@ extern const CFStringRef kMIDIPropertyUniqueID API_AVAILABLE( /* Presentation */ // extern const CFStringRef kMIDIPropertyImage API_AVAILABLE(macos(10.2)); -// extern const CFStringRef kMIDIPropertyDisplayName API_AVAILABLE(macos(10.4)); +extern const CFStringRef kMIDIPropertyDisplayName API_AVAILABLE(macos(10.4)); /* Audio */ // extern const CFStringRef kMIDIPropertyPanDisruptsStereo API_AVAILABLE(macos(10.2)); @@ -50,7 +50,7 @@ extern const CFStringRef kMIDIPropertyAdvanceScheduleTimeMuSec API_AVAILABLE( /* Drivers */ // extern const CFStringRef kMIDIPropertyDriverOwner API_AVAILABLE(macos(10.1)); -// extern const CFStringRef kMIDIPropertyDriverVersion API_AVAILABLE(macos(10.2)); +extern const CFStringRef kMIDIPropertyDriverVersion API_AVAILABLE(macos(10.2)); /* Connections */ // extern const CFStringRef kMIDIPropertyCanRoute API_AVAILABLE(macos(10.0)); diff --git a/src/frameworks/CoreMIDI/src/MIDIServices.m b/src/frameworks/CoreMIDI/src/MIDIServices.m index 83be599fd..a47c9d115 100644 --- a/src/frameworks/CoreMIDI/src/MIDIServices.m +++ b/src/frameworks/CoreMIDI/src/MIDIServices.m @@ -6,10 +6,17 @@ /* Identification */ const CFStringRef kMIDIPropertyName = nil; +const CFStringRef kMIDIPropertyManufacturer = nil; const CFStringRef kMIDIPropertyUniqueID = nil; +/* Presentation */ +const CFStringRef kMIDIPropertyDisplayName = nil; + /* Timing */ const CFStringRef kMIDIPropertyAdvanceScheduleTimeMuSec = nil; +/* Drivers */ +const CFStringRef kMIDIPropertyDriverVersion = nil; + /* Connections */ const CFStringRef kMIDIPropertyConnectionUniqueID = nil; diff --git a/src/frameworks/CoreMedia/CMakeLists.txt b/src/frameworks/CoreMedia/CMakeLists.txt index 1abf74313..6dd241d35 100644 --- a/src/frameworks/CoreMedia/CMakeLists.txt +++ b/src/frameworks/CoreMedia/CMakeLists.txt @@ -19,7 +19,8 @@ add_framework(CoreMedia SOURCES src/CoreMedia.c - src/CMTime.c + src/CMTime.c + src/CMSampleBuffer.c DEPENDENCIES system diff --git a/src/frameworks/CoreMedia/include/CoreMedia/CMSampleBuffer.h b/src/frameworks/CoreMedia/include/CoreMedia/CMSampleBuffer.h new file mode 100644 index 000000000..9ccdafef4 --- /dev/null +++ b/src/frameworks/CoreMedia/include/CoreMedia/CMSampleBuffer.h @@ -0,0 +1,27 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#ifndef _CMSAMPLEBUFFER_H_ +#define _CMSAMPLEBUFFER_H_ + +#include + +extern const CFStringRef kCMSampleAttachmentKey_DisplayImmediately; + +#endif diff --git a/src/frameworks/CoreMedia/include/CoreMedia/CMTime.h b/src/frameworks/CoreMedia/include/CoreMedia/CMTime.h index 629bace1a..cdd2b7e74 100644 --- a/src/frameworks/CoreMedia/include/CoreMedia/CMTime.h +++ b/src/frameworks/CoreMedia/include/CoreMedia/CMTime.h @@ -20,12 +20,20 @@ #ifndef _CMTIME_H_ #define _CMTIME_H_ +#include #include typedef int64_t CMTimeValue; typedef int32_t CMTimeScale; typedef int64_t CMTimeEpoch; -typedef uint32_t CMTimeFlags; +typedef CF_OPTIONS(uint32_t, CMTimeFlags) { + kCMTimeFlags_Valid = (1UL << 0), + kCMTimeFlags_HasBeenRounded = (1UL << 1), + kCMTimeFlags_PositiveInfinity = (1UL << 2), + kCMTimeFlags_NegativeInfinity = (1UL << 3), + kCMTimeFlags_Indefinite = (1UL << 4), + kCMTimeFlags_ImpliedValueFlagsMask = kCMTimeFlags_PositiveInfinity | kCMTimeFlags_NegativeInfinity | kCMTimeFlags_Indefinite +}; typedef struct { diff --git a/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h b/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h index 37c796a3a..8ad9c4040 100644 --- a/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h +++ b/src/frameworks/CoreMedia/include/CoreMedia/CoreMedia.h @@ -21,8 +21,8 @@ #ifndef _CoreMedia_H_ #define _CoreMedia_H_ - #include +#include void* AudioToolbox_AudioConverterDispose(void); void* AudioToolbox_AudioConverterGetProperty(void); diff --git a/src/frameworks/CoreMedia/src/CMSampleBuffer.c b/src/frameworks/CoreMedia/src/CMSampleBuffer.c new file mode 100644 index 000000000..5f4773c06 --- /dev/null +++ b/src/frameworks/CoreMedia/src/CMSampleBuffer.c @@ -0,0 +1,22 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +const CFStringRef kCMSampleAttachmentKey_DisplayImmediately = CFSTR("DisplayImmediately"); diff --git a/src/frameworks/CoreMedia/src/CMTime.c b/src/frameworks/CoreMedia/src/CMTime.c index 40b7bfe5c..941e6cb91 100644 --- a/src/frameworks/CoreMedia/src/CMTime.c +++ b/src/frameworks/CoreMedia/src/CMTime.c @@ -19,8 +19,37 @@ #include -const CMTime kCMTimeInvalid; -const CMTime kCMTimeIndefinite; -const CMTime kCMTimePositiveInfinity; -const CMTime kCMTimeNegativeInfinity; -const CMTime kCMTimeZero; +const CMTime kCMTimeInvalid = { + .value = 0, + .timescale = 0, + .flags = 0, + .epoch = 0 +}; + +const CMTime kCMTimeIndefinite = { + .value = 0, + .timescale = 0, + .flags = kCMTimeFlags_Valid | kCMTimeFlags_Indefinite, + .epoch = 0 +}; + +const CMTime kCMTimePositiveInfinity = { + .value = 0, + .timescale = 0, + .flags = kCMTimeFlags_Valid | kCMTimeFlags_PositiveInfinity, + .epoch = 0 +}; + +const CMTime kCMTimeNegativeInfinity = { + .value = 0, + .timescale = 0, + .flags = kCMTimeFlags_Valid | kCMTimeFlags_NegativeInfinity, + .epoch = 0 +}; + +const CMTime kCMTimeZero = { + .value = 0, + .timescale = 1, + .flags = kCMTimeFlags_Valid, + .epoch = 0 +}; diff --git a/src/frameworks/CoreServices/include/LaunchServices/LSQuarantine.h b/src/frameworks/CoreServices/include/LaunchServices/LSQuarantine.h new file mode 100644 index 000000000..f6bf789d4 --- /dev/null +++ b/src/frameworks/CoreServices/include/LaunchServices/LSQuarantine.h @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#ifndef __LSQUARANTINE__ +#define __LSQUARANTINE__ + +#include + +extern CFStringRef const kLSQuarantineAgentBundleIdentifierKey; +extern CFStringRef const kLSQuarantineAgentNameKey; +extern CFStringRef const kLSQuarantineDataURLKey; +extern CFStringRef const kLSQuarantineOriginURLKey; +extern CFStringRef const kLSQuarantineTimeStampKey; +extern CFStringRef const kLSQuarantineTypeKey; +extern CFStringRef const kLSQuarantineTypeOtherDownload; +extern CFStringRef const kLSQuarantineTypeWebDownload; + +#endif // __LSQUARANTINE__ diff --git a/src/frameworks/CoreServices/include/LaunchServices/LSSharedFile.h b/src/frameworks/CoreServices/include/LaunchServices/LSSharedFile.h index d8ad39cb9..b2bf7badb 100644 --- a/src/frameworks/CoreServices/include/LaunchServices/LSSharedFile.h +++ b/src/frameworks/CoreServices/include/LaunchServices/LSSharedFile.h @@ -7,7 +7,6 @@ extern const CFStringRef kLSSharedFileListFavoriteVolumes; extern const CFStringRef kLSSharedFileListGlobalLoginItems; // extern const LSSharedFileListRef kLSSharedFileListItemBeforeFirst; extern const CFStringRef kLSSharedFileListItemHidden; -// extern const LSSharedFileListItemRef kLSSharedFileListItemLast; extern const CFStringRef kLSSharedFileListLoginItemHidden; extern const CFStringRef kLSSharedFileListRecentApplicationItems; extern const CFStringRef kLSSharedFileListRecentDocumentItems; diff --git a/src/frameworks/CoreServices/include/LaunchServices/LaunchServices.h b/src/frameworks/CoreServices/include/LaunchServices/LaunchServices.h index 74bf9f998..838028d83 100644 --- a/src/frameworks/CoreServices/include/LaunchServices/LaunchServices.h +++ b/src/frameworks/CoreServices/include/LaunchServices/LaunchServices.h @@ -3,9 +3,9 @@ #include #include +#include #include #include #include #endif - diff --git a/src/frameworks/CoreServices/include/SharedFileList/LSSharedFileList.h b/src/frameworks/CoreServices/include/SharedFileList/LSSharedFileList.h new file mode 100644 index 000000000..724166f85 --- /dev/null +++ b/src/frameworks/CoreServices/include/SharedFileList/LSSharedFileList.h @@ -0,0 +1,29 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#ifndef _CORESERVICES_LSSHAREDFILELIST_H_ +#define _CORESERVICES_LSSHAREDFILELIST_H_ + +#include + +typedef struct OpaqueLSSharedFileListItemRef *LSSharedFileListItemRef; + +extern LSSharedFileListItemRef kLSSharedFileListItemLast; + +#endif diff --git a/src/frameworks/CoreServices/include/SharedFileList/SharedFileList.h b/src/frameworks/CoreServices/include/SharedFileList/SharedFileList.h index e69de29bb..35a193719 100644 --- a/src/frameworks/CoreServices/include/SharedFileList/SharedFileList.h +++ b/src/frameworks/CoreServices/include/SharedFileList/SharedFileList.h @@ -0,0 +1,20 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include diff --git a/src/frameworks/CoreServices/src/LaunchServices/constants.c b/src/frameworks/CoreServices/src/LaunchServices/constants.c index 8996525d4..142f9af69 100644 --- a/src/frameworks/CoreServices/src/LaunchServices/constants.c +++ b/src/frameworks/CoreServices/src/LaunchServices/constants.c @@ -35,7 +35,6 @@ const CFStringRef kLSSharedFileListFavoriteVolumes = CFSTR("com.apple.LSSharedFi const CFStringRef kLSSharedFileListGlobalLoginItems = CFSTR("com.apple.LSSharedFileList.GlobalLoginItems"); // const LSSharedFileListRef kLSSharedFileListItemBeforeFirst; const CFStringRef kLSSharedFileListItemHidden = CFSTR("com.apple.LSSharedFileList.ItemIsHidden"); -// const LSSharedFileListItemRef kLSSharedFileListItemLast; const CFStringRef kLSSharedFileListLoginItemHidden = CFSTR("com.apple.loginitem.HideOnLaunch"); const CFStringRef kLSSharedFileListRecentApplicationItems = CFSTR("com.apple.LSSharedFileList.RecentApplications"); const CFStringRef kLSSharedFileListRecentDocumentItems = CFSTR("com.apple.LSSharedFileList.RecentDocuments"); @@ -53,6 +52,7 @@ const CFStringRef kLSQuarantineOriginURLKey = CFSTR("LSQuarantineOriginURL"); const CFStringRef kLSQuarantineTimeStampKey = CFSTR("LSQuarantineTimeStamp"); const CFStringRef kLSQuarantineTypeKey = CFSTR("LSQuarantineType"); const CFStringRef kLSQuarantineTypeOtherDownload = CFSTR("LSQuarantineTypeOtherDownload"); +const CFStringRef kLSQuarantineTypeWebDownload = CFSTR("LSQuarantineTypeWebDownload"); const CFStringRef kUTExportedTypeDeclarationsKey = CFSTR("UTExportedTypeDeclarations"); const CFStringRef kUTImportedTypeDeclarationsKey = CFSTR("UTImportedTypeDeclarations"); diff --git a/src/frameworks/CoreServices/src/SharedFileList/CMakeLists.txt b/src/frameworks/CoreServices/src/SharedFileList/CMakeLists.txt index c40f58df9..68f71decb 100644 --- a/src/frameworks/CoreServices/src/SharedFileList/CMakeLists.txt +++ b/src/frameworks/CoreServices/src/SharedFileList/CMakeLists.txt @@ -13,7 +13,7 @@ add_framework(SharedFileList PARENT "CoreServices" SOURCES - empty.c + constants.c DEPENDENCIES CoreFoundation diff --git a/src/frameworks/CoreServices/src/SharedFileList/constants.c b/src/frameworks/CoreServices/src/SharedFileList/constants.c new file mode 100644 index 000000000..3e1f4fb52 --- /dev/null +++ b/src/frameworks/CoreServices/src/SharedFileList/constants.c @@ -0,0 +1,25 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +struct OpaqueLSSharedFileListItemRef {}; +static struct OpaqueLSSharedFileListItemRef _insertItemLast = { }; + +LSSharedFileListItemRef kLSSharedFileListItemLast = &_insertItemLast; diff --git a/src/frameworks/CoreServices/src/SharedFileList/empty.c b/src/frameworks/CoreServices/src/SharedFileList/empty.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h b/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h index 7ef741010..cb7a1d0cb 100644 --- a/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h +++ b/src/frameworks/CoreVideo/include/CoreVideo/CVImageBuffer.h @@ -6,4 +6,23 @@ typedef CVBufferRef CVImageBufferRef; +extern const CFStringRef kCVImageBufferPixelAspectRatioKey; +extern const CFStringRef kCVImageBufferGammaLevelKey; +extern const CFStringRef kCVImageBufferYCbCrMatrixKey; +extern const CFStringRef kCVImageBufferColorPrimariesKey; +extern const CFStringRef kCVImageBufferTransferFunctionKey; + +extern CFStringRef const kCVImageBufferPixelAspectRatioHorizontalSpacingKey; +extern CFStringRef const kCVImageBufferPixelAspectRatioVerticalSpacingKey; + +extern CFStringRef const kCVImageBufferYCbCrMatrix_ITU_R_709_2; +extern CFStringRef const kCVImageBufferYCbCrMatrix_ITU_R_601_4; +extern CFStringRef const kCVImageBufferYCbCrMatrix_SMPTE_240M_1995; +extern CFStringRef const kCVImageBufferColorPrimaries_ITU_R_709_2; +extern CFStringRef const kCVImageBufferColorPrimaries_EBU_3213; +extern CFStringRef const kCVImageBufferColorPrimaries_SMPTE_C; +extern CFStringRef const kCVImageBufferTransferFunction_ITU_R_709_2; +extern CFStringRef const kCVImageBufferTransferFunction_SMPTE_240M_1995; +extern CFStringRef const kCVImageBufferTransferFunction_UseGamma; + #endif // _COREVIDEO_CVIMAGEBUFFER_H_ diff --git a/src/frameworks/CoreVideo/src/constants.c b/src/frameworks/CoreVideo/src/constants.c index 919f4e19f..84eee3335 100644 --- a/src/frameworks/CoreVideo/src/constants.c +++ b/src/frameworks/CoreVideo/src/constants.c @@ -1,8 +1,30 @@ #include +const CFStringRef kCVImageBufferPixelAspectRatioKey = CFSTR("CVPixelAspectRatio"); +const CFStringRef kCVImageBufferGammaLevelKey = CFSTR("CVImageBufferGammaLevel"); +const CFStringRef kCVImageBufferYCbCrMatrixKey = CFSTR("CVImageBufferYCbCrMatrix"); +const CFStringRef kCVImageBufferColorPrimariesKey = CFSTR("CVImageBufferColorPrimaries"); +const CFStringRef kCVImageBufferTransferFunctionKey = CFSTR("CVImageBufferTransferFunction"); const CFStringRef kCVImageBufferChromaLocationBottomFieldKey = CFSTR("CVImageBufferChromaLocationBottomField"); const CFStringRef kCVImageBufferChromaLocationTopFieldKey = CFSTR("CVImageBufferChromaLocationTopField"); + +const CFStringRef kCVImageBufferPixelAspectRatioHorizontalSpacingKey = CFSTR("CVImageBufferPixelAspectRatioHorizontalSpacing"); +const CFStringRef kCVImageBufferPixelAspectRatioVerticalSpacingKey = CFSTR("CVImageBufferPixelAspectRatioVerticalSpacing"); + +const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_709_2 = CFSTR("ITU_R_709_2"); +const CFStringRef kCVImageBufferYCbCrMatrix_ITU_R_601_4 = CFSTR("ITU_R_601_4"); +const CFStringRef kCVImageBufferYCbCrMatrix_SMPTE_240M_1995 = CFSTR("SMPTE_240M_1995"); + +const CFStringRef kCVImageBufferColorPrimaries_ITU_R_709_2 = CFSTR("ITU_R_709_2"); +const CFStringRef kCVImageBufferColorPrimaries_EBU_3213 = CFSTR("EBU_3213"); +const CFStringRef kCVImageBufferColorPrimaries_SMPTE_C = CFSTR("SMPTE_C"); + +const CFStringRef kCVImageBufferTransferFunction_ITU_R_709_2 = CFSTR("ITU_R_709_2"); +const CFStringRef kCVImageBufferTransferFunction_SMPTE_240M_1995 = CFSTR("SMPTE_240M_1995"); +const CFStringRef kCVImageBufferTransferFunction_UseGamma = CFSTR("UseGamma"); + const CFStringRef kCVImageBufferChromaLocation_Left = CFSTR("Left"); + const CFStringRef kCVPixelBufferIOSurfacePropertiesKey = CFSTR("IOSurfaceProperties"); const CFStringRef kCVPixelBufferOpenGLCompatibilityKey = CFSTR("OpenGLCompatibility"); const CFStringRef kCVPixelBufferPixelFormatTypeKey = CFSTR("PixelFormatType"); diff --git a/src/frameworks/CoreWLAN/include/CoreWLAN/CoreWLAN.h b/src/frameworks/CoreWLAN/include/CoreWLAN/CoreWLAN.h index 8f3240985..435c26b62 100644 --- a/src/frameworks/CoreWLAN/include/CoreWLAN/CoreWLAN.h +++ b/src/frameworks/CoreWLAN/include/CoreWLAN/CoreWLAN.h @@ -23,6 +23,7 @@ #import +#import #import #import #import diff --git a/src/frameworks/CoreWLAN/include/CoreWLAN/CoreWLANConstants.h b/src/frameworks/CoreWLAN/include/CoreWLAN/CoreWLANConstants.h new file mode 100644 index 000000000..84d15cc3a --- /dev/null +++ b/src/frameworks/CoreWLAN/include/CoreWLAN/CoreWLANConstants.h @@ -0,0 +1,22 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +extern NSString *const kCWScanKeyMerge; diff --git a/src/frameworks/CoreWLAN/src/CoreWLAN.m b/src/frameworks/CoreWLAN/src/CoreWLAN.m index be6eb44b3..d29f556c6 100644 --- a/src/frameworks/CoreWLAN/src/CoreWLAN.m +++ b/src/frameworks/CoreWLAN/src/CoreWLAN.m @@ -22,6 +22,8 @@ #include #include +NSString *const kCWScanKeyMerge = @"SCAN_MERGE"; + static int verbose = 0; __attribute__((constructor)) diff --git a/src/frameworks/SystemConfiguration/SCSchemaDefinitions.c b/src/frameworks/SystemConfiguration/SCSchemaDefinitions.c index dfe7f446b..af21c7984 100644 --- a/src/frameworks/SystemConfiguration/SCSchemaDefinitions.c +++ b/src/frameworks/SystemConfiguration/SCSchemaDefinitions.c @@ -1,6 +1,8 @@ #include #include +const CFStringRef kSCEntNetInterface = CFSTR("Interface"); + const CFStringRef kSCPropNetIPv4Addresses = CFSTR("Addresses"); const CFStringRef kSCPropNetIPv4SubnetMasks = CFSTR("SubnetMasks"); const CFStringRef kSCPropNetProxiesExceptionsList = CFSTR("ExceptionsList"); diff --git a/src/frameworks/VideoToolbox/CMakeLists.txt b/src/frameworks/VideoToolbox/CMakeLists.txt index d47372e7d..959803c9d 100644 --- a/src/frameworks/VideoToolbox/CMakeLists.txt +++ b/src/frameworks/VideoToolbox/CMakeLists.txt @@ -19,6 +19,7 @@ add_framework(VideoToolbox SOURCES src/VideoToolbox.m + src/VTCompressionProperties.c src/FigMetalTransferHelper.m DEPENDENCIES diff --git a/src/frameworks/VideoToolbox/include/VideoToolbox/VTCompressionProperties.h b/src/frameworks/VideoToolbox/include/VideoToolbox/VTCompressionProperties.h new file mode 100644 index 000000000..68242ee34 --- /dev/null +++ b/src/frameworks/VideoToolbox/include/VideoToolbox/VTCompressionProperties.h @@ -0,0 +1,37 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#ifndef _VTCOMPRESSIONPROPERTIES_H_ +#define _VTCOMPRESSIONPROPERTIES_H_ + +#include + +extern CFStringRef const kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration; + +extern CFStringRef const kVTCompressionPropertyKey_DataRateLimits; + +extern CFStringRef const kVTProfileLevel_H264_High_AutoLevel; + +extern CFStringRef const kVTCompressionPropertyKey_MaxFrameDelayCount; + +extern CFStringRef const kVTCompressionPropertyKey_ExpectedFrameRate; + +extern CFStringRef const kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder; + +#endif diff --git a/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h b/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h index faebfe496..98b06ac5c 100644 --- a/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h +++ b/src/frameworks/VideoToolbox/include/VideoToolbox/VideoToolbox.h @@ -24,6 +24,7 @@ #import #import +#import void* COLOR_Y2R24(void); void* COLOR_Y2R32(void); diff --git a/src/frameworks/VideoToolbox/src/VTCompressionProperties.c b/src/frameworks/VideoToolbox/src/VTCompressionProperties.c new file mode 100644 index 000000000..9e363904e --- /dev/null +++ b/src/frameworks/VideoToolbox/src/VTCompressionProperties.c @@ -0,0 +1,32 @@ +/* + This file is part of Darling. + + Copyright (C) 2025 Darling Developers + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +const CFStringRef kVTCompressionPropertyKey_MaxKeyFrameIntervalDuration = CFSTR("MaxKeyFrameIntervalDuration"); + +const CFStringRef kVTCompressionPropertyKey_DataRateLimits = CFSTR("DataRateLimits"); + +const CFStringRef kVTProfileLevel_H264_High_AutoLevel = CFSTR("H264_High_AutoLevel"); + +const CFStringRef kVTCompressionPropertyKey_MaxFrameDelayCount = CFSTR("MaxFrameDelayCount"); + +const CFStringRef kVTCompressionPropertyKey_ExpectedFrameRate = CFSTR("ExpectedFrameRate"); + +const CFStringRef kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder = CFSTR("RequireHardwareAcceleratedVideoEncoder");