From 519e74f476ef97f7d2eee1203b2475bf7d65a668 Mon Sep 17 00:00:00 2001 From: Peter <> Date: Thu, 15 Aug 2019 00:56:18 +0300 Subject: [PATCH] Refactor HashtagSearchUI, StickerPackPreviewUI and related modules [skip ci] --- .../contents.xcworkspacedata | 15 + .../Sources/ChatController.swift | 2 + .../project.pbxproj | 64 ++ .../Sources}/AnimatedStickerNode.swift | 58 +- .../Sources}/AnimatedStickerUtils.swift | 6 +- .../Sources}/AnimationRenderer.swift | 0 .../Sources}/SoftwareAnimationRenderer.swift | 2 +- .../project.pbxproj | 587 ++++++++++++++++ submodules/HashtagSearchUI/Info.plist | 22 + .../Sources}/HashtagSearchController.swift | 6 +- .../HashtagSearchControllerNode.swift | 4 +- .../HashtagSearchUI/Sources/HashtagSearchUI.h | 19 + .../ItemListAvatarAndNameInfoItem/Info.plist | 22 + .../project.pbxproj | 595 +++++++++++++++++ .../Sources/FrameworkBundle.swift | 13 + .../Sources/ItemListAvatarAndNameInfoItem.h | 19 + .../Sources}/ItemListAvatarAndNameItem.swift | 206 +++--- submodules/ItemListPeerActionItem/Info.plist | 22 + .../project.pbxproj | 567 ++++++++++++++++ .../Sources/ItemListPeerActionItem.h | 19 + .../Sources}/ItemListPeerActionItem.swift | 18 +- submodules/StickerPackPreviewUI/Info.plist | 22 + .../StickerPackPreviewController.swift | 22 +- .../StickerPackPreviewControllerNode.swift | 0 .../Sources}/StickerPackPreviewGridItem.swift | 1 + .../Sources/StickerPackPreviewUI.h | 19 + .../Sources}/StickerPreviewController.swift | 20 +- .../StickerPreviewControllerNode.swift | 0 .../Sources}/StickerPreviewPeekContent.swift | 31 +- .../project.pbxproj | 627 ++++++++++++++++++ .../ArchivedStickerPacksController.swift | 1 + .../TelegramUI/BlockedPeersController.swift | 1 + .../TelegramUI/ChannelAdminController.swift | 1 + .../TelegramUI/ChannelAdminsController.swift | 1 + .../ChannelBannedMemberController.swift | 1 + ...hannelDiscussionGroupSetupController.swift | 1 + .../TelegramUI/ChannelInfoController.swift | 1 + .../ChannelPermissionsController.swift | 1 + .../TelegramUI/ChatController.swift | 3 +- .../TelegramUI/ChatMediaInputNode.swift | 1 + .../ChatMediaInputStickerGridItem.swift | 1 + .../ChatMediaInputStickerPackItem.swift | 1 + .../ChatMediaInputTrendingPane.swift | 1 + .../ChatMessageAnimatedStickerItemNode.swift | 1 + .../ChatMessageInteractiveMediaNode.swift | 1 + .../ChatMultipleAvatarsNavigationNode.swift | 60 -- .../ChatRecentActionsControllerNode.swift | 2 + .../TelegramUI/CreateChannelController.swift | 1 + .../TelegramUI/CreateGroupController.swift | 1 + .../DeviceContactInfoController.swift | 1 + .../TelegramUI/EditSettingsController.swift | 1 + .../FeaturedStickerPacksController.swift | 1 + .../FetchCachedRepresentations.swift | 1 + .../TelegramUI/GroupInfoController.swift | 2 + .../GroupStickerPackSetupController.swift | 1 + ...textResultsChatInputContextPanelNode.swift | 1 + ...ListContextResultsChatInputPanelItem.swift | 1 + .../HorizontalStickerGridItem.swift | 1 + ...rizontalStickersChatContextPanelNode.swift | 1 + .../InstalledStickerPacksController.swift | 1 + .../TelegramUI/ItemListStickerPackItem.swift | 1 + .../MediaInputPaneTrendingItem.swift | 1 + .../TelegramUI/MetalAnimationRenderer.swift | 178 ----- .../TelegramUI/MultipleAvatarsNode.swift | 95 --- .../NotificationContentContext.swift | 1 + .../NotificationExceptionControllerNode.swift | 1 + .../TelegramUI/OpenChatMessage.swift | 1 + .../TelegramUI/OpenResolvedUrl.swift | 1 + .../TelegramUI/PeersNearbyController.swift | 1 + ...ectivePrivacySettingsPeersController.swift | 1 + .../TelegramUI/SettingsController.swift | 2 + .../StickerPaneSearchContentNode.swift | 1 + .../StickerPaneSearchStickerItem.swift | 1 + .../StickersChatInputContextPanelNode.swift | 1 + .../TelegramUIPrivate/module.modulemap | 2 - .../TelegramUI/TextLinkHandling.swift | 2 + .../TelegramUI/UserInfoController.swift | 1 + .../project.pbxproj | 393 +---------- .../third-party/astc/astc/bitmanip.h | 168 ----- .../TelegramUI/third-party/astc/astc/colors.h | 132 ---- .../third-party/astc/astc/compress_block.cc | 155 ----- .../third-party/astc/astc/compress_block.h | 12 - .../third-party/astc/astc/compress_texture.cc | 68 -- .../third-party/astc/astc/compress_texture.h | 16 - .../third-party/astc/astc/constants.h | 18 - .../third-party/astc/astc/data_size.h | 21 - .../TelegramUI/third-party/astc/astc/dcheck.h | 7 - .../third-party/astc/astc/endpoints.h | 24 - .../astc/astc/endpoints_bounding_box.h | 32 - .../third-party/astc/astc/endpoints_encode.h | 63 -- .../third-party/astc/astc/endpoints_min_max.h | 47 -- .../astc/endpoints_principal_components.cc | 59 -- .../astc/endpoints_principal_components.h | 22 - .../astc/astc/endpoints_quantize.h | 37 -- .../astc/astc/integer_sequence_encoding.h | 212 ------ .../third-party/astc/astc/matrix.cc | 10 - .../TelegramUI/third-party/astc/astc/matrix.h | 45 -- .../third-party/astc/astc/meson.build | 57 -- .../TelegramUI/third-party/astc/astc/misc.h | 23 - .../TelegramUI/third-party/astc/astc/range.h | 42 -- .../third-party/astc/astc/store_block.h | 113 ---- .../astc/astc/tables_color_quantization.h | 7 - .../third-party/astc/astc/tables_data_size.h | 6 - .../astc/tables_integer_sequence_encoding.h | 7 - .../TelegramUI/third-party/astc/astc/vector.h | 148 ----- .../third-party/astc/astc/weights_quantize.h | 88 --- .../astc/astc/weights_quantize_table.h | 566 ---------------- .../third-party/astc/compress/astc.cc | 74 --- .../third-party/astc/compress/astc.h | 9 - .../TelegramUI/third-party/astc/image/bgra.cc | 18 - .../TelegramUI/third-party/astc/image/bgra.h | 38 -- .../TelegramUI/third-party/astc/image/color.h | 37 -- .../third-party/astc/image/compressed.cc | 44 -- .../third-party/astc/image/compressed.h | 61 -- .../pybits/__pycache__/bise.cpython-37.pyc | Bin 6318 -> 0 bytes .../pybits/__pycache__/bitset.cpython-37.pyc | Bin 3152 -> 0 bytes .../__pycache__/datasize.cpython-37.pyc | Bin 3140 -> 0 bytes .../__pycache__/endpointmodes.cpython-37.pyc | Bin 753 -> 0 bytes .../__pycache__/partitions.cpython-37.pyc | Bin 7628 -> 0 bytes .../__pycache__/quantize.cpython-37.pyc | Bin 4559 -> 0 bytes .../pybits/__pycache__/range.cpython-37.pyc | Bin 1113 -> 0 bytes .../third-party/astc/pybits/bise.py | 229 ------- .../third-party/astc/pybits/bitset.py | 77 --- .../third-party/astc/pybits/codegen.py | 154 ----- .../third-party/astc/pybits/datainfo.py | 46 -- .../third-party/astc/pybits/datasize.py | 137 ---- .../third-party/astc/pybits/endpointmodes.py | 17 - .../astc/pybits/partition-images.py | 59 -- .../third-party/astc/pybits/partitions.py | 289 -------- .../third-party/astc/pybits/quantize.py | 123 ---- .../third-party/astc/pybits/range.py | 67 -- .../third-party/bc1/BC1Compression.cpp | 301 --------- .../third-party/bc1/BC1Compression.h | 51 -- .../TelegramUI/third-party/bc1/BMPImage.cpp | 213 ------ .../TelegramUI/third-party/bc1/BMPImage.h | 59 -- .../TelegramUI/third-party/bc1/ColorVec.h | 103 --- .../TelegramUI/third-party/bc1/DDSImage.cpp | 222 ------- .../TelegramUI/third-party/bc1/DDSImage.h | 51 -- .../TelegramUI/third-party/bc1/Image.cpp | 43 -- submodules/TelegramUI/third-party/bc1/Image.h | 79 --- .../third-party/bc1/TextureCompression.cpp | 37 -- .../third-party/bc1/TextureCompression.h | 13 - .../third-party/bc1/TypeDefinitions.h | 126 ---- submodules/YuvConversion/Info.plist | 22 + .../Sources}/YUV.h | 0 .../Sources}/YUV.m | 0 .../YuvConversion/Sources/YuvConversion.h | 11 + .../YuvConversion.xcodeproj/project.pbxproj | 532 +++++++++++++++ 148 files changed, 3421 insertions(+), 5911 deletions(-) rename submodules/{TelegramUI/TelegramUI => AnimationUI/Sources}/AnimatedStickerNode.swift (93%) rename submodules/{TelegramUI/TelegramUI => AnimationUI/Sources}/AnimatedStickerUtils.swift (97%) rename submodules/{TelegramUI/TelegramUI => AnimationUI/Sources}/AnimationRenderer.swift (100%) rename submodules/{TelegramUI/TelegramUI => AnimationUI/Sources}/SoftwareAnimationRenderer.swift (97%) create mode 100644 submodules/HashtagSearchUI/HashtagSearchUI_Xcode.xcodeproj/project.pbxproj create mode 100644 submodules/HashtagSearchUI/Info.plist rename submodules/{TelegramUI/TelegramUI => HashtagSearchUI/Sources}/HashtagSearchController.swift (96%) rename submodules/{TelegramUI/TelegramUI => HashtagSearchUI/Sources}/HashtagSearchControllerNode.swift (97%) create mode 100644 submodules/HashtagSearchUI/Sources/HashtagSearchUI.h create mode 100644 submodules/ItemListAvatarAndNameInfoItem/Info.plist create mode 100644 submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem_Xcode.xcodeproj/project.pbxproj create mode 100644 submodules/ItemListAvatarAndNameInfoItem/Sources/FrameworkBundle.swift create mode 100644 submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameInfoItem.h rename submodules/{TelegramUI/TelegramUI => ItemListAvatarAndNameInfoItem/Sources}/ItemListAvatarAndNameItem.swift (89%) create mode 100644 submodules/ItemListPeerActionItem/Info.plist create mode 100644 submodules/ItemListPeerActionItem/ItemListPeerActionItem_Xcode.xcodeproj/project.pbxproj create mode 100644 submodules/ItemListPeerActionItem/Sources/ItemListPeerActionItem.h rename submodules/{TelegramUI/TelegramUI => ItemListPeerActionItem/Sources}/ItemListPeerActionItem.swift (91%) create mode 100644 submodules/StickerPackPreviewUI/Info.plist rename submodules/{TelegramUI/TelegramUI => StickerPackPreviewUI/Sources}/StickerPackPreviewController.swift (90%) rename submodules/{TelegramUI/TelegramUI => StickerPackPreviewUI/Sources}/StickerPackPreviewControllerNode.swift (100%) rename submodules/{TelegramUI/TelegramUI => StickerPackPreviewUI/Sources}/StickerPackPreviewGridItem.swift (99%) create mode 100644 submodules/StickerPackPreviewUI/Sources/StickerPackPreviewUI.h rename submodules/{TelegramUI/TelegramUI => StickerPackPreviewUI/Sources}/StickerPreviewController.swift (75%) rename submodules/{TelegramUI/TelegramUI => StickerPackPreviewUI/Sources}/StickerPreviewControllerNode.swift (100%) rename submodules/{TelegramUI/TelegramUI => StickerPackPreviewUI/Sources}/StickerPreviewPeekContent.swift (83%) create mode 100644 submodules/StickerPackPreviewUI/StickerPackPreviewUI_Xcode.xcodeproj/project.pbxproj delete mode 100644 submodules/TelegramUI/TelegramUI/ChatMultipleAvatarsNavigationNode.swift delete mode 100644 submodules/TelegramUI/TelegramUI/MetalAnimationRenderer.swift delete mode 100644 submodules/TelegramUI/TelegramUI/MultipleAvatarsNode.swift delete mode 100644 submodules/TelegramUI/third-party/astc/astc/bitmanip.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/colors.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/compress_block.cc delete mode 100644 submodules/TelegramUI/third-party/astc/astc/compress_block.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/compress_texture.cc delete mode 100644 submodules/TelegramUI/third-party/astc/astc/compress_texture.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/constants.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/data_size.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/dcheck.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/endpoints.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/endpoints_bounding_box.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/endpoints_encode.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/endpoints_min_max.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.cc delete mode 100644 submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/endpoints_quantize.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/integer_sequence_encoding.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/matrix.cc delete mode 100644 submodules/TelegramUI/third-party/astc/astc/matrix.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/meson.build delete mode 100644 submodules/TelegramUI/third-party/astc/astc/misc.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/range.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/store_block.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/tables_color_quantization.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/tables_data_size.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/tables_integer_sequence_encoding.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/vector.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/weights_quantize.h delete mode 100644 submodules/TelegramUI/third-party/astc/astc/weights_quantize_table.h delete mode 100644 submodules/TelegramUI/third-party/astc/compress/astc.cc delete mode 100644 submodules/TelegramUI/third-party/astc/compress/astc.h delete mode 100644 submodules/TelegramUI/third-party/astc/image/bgra.cc delete mode 100644 submodules/TelegramUI/third-party/astc/image/bgra.h delete mode 100644 submodules/TelegramUI/third-party/astc/image/color.h delete mode 100644 submodules/TelegramUI/third-party/astc/image/compressed.cc delete mode 100644 submodules/TelegramUI/third-party/astc/image/compressed.h delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/__pycache__/bise.cpython-37.pyc delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/__pycache__/bitset.cpython-37.pyc delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/__pycache__/datasize.cpython-37.pyc delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/__pycache__/endpointmodes.cpython-37.pyc delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/__pycache__/partitions.cpython-37.pyc delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/__pycache__/quantize.cpython-37.pyc delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/__pycache__/range.cpython-37.pyc delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/bise.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/bitset.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/codegen.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/datainfo.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/datasize.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/endpointmodes.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/partition-images.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/partitions.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/quantize.py delete mode 100644 submodules/TelegramUI/third-party/astc/pybits/range.py delete mode 100644 submodules/TelegramUI/third-party/bc1/BC1Compression.cpp delete mode 100644 submodules/TelegramUI/third-party/bc1/BC1Compression.h delete mode 100644 submodules/TelegramUI/third-party/bc1/BMPImage.cpp delete mode 100644 submodules/TelegramUI/third-party/bc1/BMPImage.h delete mode 100644 submodules/TelegramUI/third-party/bc1/ColorVec.h delete mode 100644 submodules/TelegramUI/third-party/bc1/DDSImage.cpp delete mode 100644 submodules/TelegramUI/third-party/bc1/DDSImage.h delete mode 100644 submodules/TelegramUI/third-party/bc1/Image.cpp delete mode 100644 submodules/TelegramUI/third-party/bc1/Image.h delete mode 100644 submodules/TelegramUI/third-party/bc1/TextureCompression.cpp delete mode 100644 submodules/TelegramUI/third-party/bc1/TextureCompression.h delete mode 100644 submodules/TelegramUI/third-party/bc1/TypeDefinitions.h create mode 100644 submodules/YuvConversion/Info.plist rename submodules/{TelegramUI/TelegramUI => YuvConversion/Sources}/YUV.h (100%) rename submodules/{TelegramUI/TelegramUI => YuvConversion/Sources}/YUV.m (100%) create mode 100644 submodules/YuvConversion/Sources/YuvConversion.h create mode 100644 submodules/YuvConversion/YuvConversion.xcodeproj/project.pbxproj diff --git a/Telegram-iOS.xcworkspace/contents.xcworkspacedata b/Telegram-iOS.xcworkspace/contents.xcworkspacedata index 45460afba4..78ab735223 100644 --- a/Telegram-iOS.xcworkspace/contents.xcworkspacedata +++ b/Telegram-iOS.xcworkspace/contents.xcworkspacedata @@ -89,6 +89,9 @@ + + @@ -278,6 +281,12 @@ + + + + + + + + diff --git a/submodules/AccountContext/Sources/ChatController.swift b/submodules/AccountContext/Sources/ChatController.swift index 598493f70c..080957b67e 100644 --- a/submodules/AccountContext/Sources/ChatController.swift +++ b/submodules/AccountContext/Sources/ChatController.swift @@ -277,6 +277,8 @@ public final class ChatEmbeddedInterfaceState: PeerChatListEmbeddedInterfaceStat public protocol ChatController: ViewController { var chatLocation: ChatLocation { get } var canReadHistory: ValuePromise { get } + var parentController: ViewController? { get set } func updatePresentationMode(_ mode: ChatControllerPresentationMode) + func beginMessageSearch(_ query: String) } diff --git a/submodules/AnimationUI/AnimationUI_Xcode.xcodeproj/project.pbxproj b/submodules/AnimationUI/AnimationUI_Xcode.xcodeproj/project.pbxproj index b19efa1d83..495c71077b 100644 --- a/submodules/AnimationUI/AnimationUI_Xcode.xcodeproj/project.pbxproj +++ b/submodules/AnimationUI/AnimationUI_Xcode.xcodeproj/project.pbxproj @@ -7,6 +7,22 @@ objects = { /* Begin PBXBuildFile section */ + D03E3E4A2304B4CC0049C28B /* RLottie.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E492304B4CC0049C28B /* RLottie.framework */; }; + D03E3E4F2304B50A0049C28B /* AnimatedStickerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E4D2304B50A0049C28B /* AnimatedStickerNode.swift */; }; + D03E3E502304B50A0049C28B /* AnimatedStickerUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E4E2304B50A0049C28B /* AnimatedStickerUtils.swift */; }; + D03E3E522304B51A0049C28B /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E512304B51A0049C28B /* Postbox.framework */; }; + D03E3E542304B51E0049C28B /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E532304B51E0049C28B /* TelegramCore.framework */; }; + D03E3E562304B52F0049C28B /* libcompression.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E552304B52F0049C28B /* libcompression.tbd */; }; + D03E3E582304B53B0049C28B /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E572304B53B0049C28B /* Display.framework */; }; + D03E3E5A2304B5400049C28B /* GZip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E592304B5400049C28B /* GZip.framework */; }; + D03E3E5C2304B5450049C28B /* Tuples.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E5B2304B5450049C28B /* Tuples.framework */; }; + D03E3E5E2304B5490049C28B /* MediaResources.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E5D2304B5490049C28B /* MediaResources.framework */; }; + D03E3E602304B54E0049C28B /* StickerResources.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E5F2304B54E0049C28B /* StickerResources.framework */; }; + D03E3E622304B55F0049C28B /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E612304B55F0049C28B /* SwiftSignalKit.framework */; }; + D03E3E642304B5640049C28B /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E632304B5640049C28B /* MobileCoreServices.framework */; }; + D03E3E672304B61A0049C28B /* AnimationRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E652304B61A0049C28B /* AnimationRenderer.swift */; }; + D03E3E682304B61A0049C28B /* SoftwareAnimationRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E662304B61A0049C28B /* SoftwareAnimationRenderer.swift */; }; + D03E3E8E2304B6EC0049C28B /* YuvConversion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E8D2304B6EC0049C28B /* YuvConversion.framework */; }; D060187122F35FCD00796784 /* AnimationUI.h in Headers */ = {isa = PBXBuildFile; fileRef = D060186F22F35FCD00796784 /* AnimationUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; D06018A422F361E800796784 /* AnimationNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06018A322F361E800796784 /* AnimationNode.swift */; }; D06018A722F361F400796784 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018A622F361F400796784 /* Foundation.framework */; }; @@ -17,6 +33,22 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + D03E3E492304B4CC0049C28B /* RLottie.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RLottie.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E4D2304B50A0049C28B /* AnimatedStickerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedStickerNode.swift; sourceTree = ""; }; + D03E3E4E2304B50A0049C28B /* AnimatedStickerUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedStickerUtils.swift; sourceTree = ""; }; + D03E3E512304B51A0049C28B /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E532304B51E0049C28B /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E552304B52F0049C28B /* libcompression.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcompression.tbd; path = usr/lib/libcompression.tbd; sourceTree = SDKROOT; }; + D03E3E572304B53B0049C28B /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E592304B5400049C28B /* GZip.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = GZip.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E5B2304B5450049C28B /* Tuples.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Tuples.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E5D2304B5490049C28B /* MediaResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MediaResources.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E5F2304B54E0049C28B /* StickerResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = StickerResources.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E612304B55F0049C28B /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E632304B5640049C28B /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + D03E3E652304B61A0049C28B /* AnimationRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationRenderer.swift; sourceTree = ""; }; + D03E3E662304B61A0049C28B /* SoftwareAnimationRenderer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoftwareAnimationRenderer.swift; sourceTree = ""; }; + D03E3E8D2304B6EC0049C28B /* YuvConversion.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = YuvConversion.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D060186C22F35FCD00796784 /* AnimationUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AnimationUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D060186F22F35FCD00796784 /* AnimationUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnimationUI.h; sourceTree = ""; }; D060187022F35FCD00796784 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -33,6 +65,18 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D03E3E8E2304B6EC0049C28B /* YuvConversion.framework in Frameworks */, + D03E3E642304B5640049C28B /* MobileCoreServices.framework in Frameworks */, + D03E3E622304B55F0049C28B /* SwiftSignalKit.framework in Frameworks */, + D03E3E602304B54E0049C28B /* StickerResources.framework in Frameworks */, + D03E3E5E2304B5490049C28B /* MediaResources.framework in Frameworks */, + D03E3E5C2304B5450049C28B /* Tuples.framework in Frameworks */, + D03E3E5A2304B5400049C28B /* GZip.framework in Frameworks */, + D03E3E582304B53B0049C28B /* Display.framework in Frameworks */, + D03E3E562304B52F0049C28B /* libcompression.tbd in Frameworks */, + D03E3E542304B51E0049C28B /* TelegramCore.framework in Frameworks */, + D03E3E522304B51A0049C28B /* Postbox.framework in Frameworks */, + D03E3E4A2304B4CC0049C28B /* RLottie.framework in Frameworks */, D06018AD22F361FF00796784 /* Lottie.framework in Frameworks */, D06018AB22F361FC00796784 /* AsyncDisplayKit.framework in Frameworks */, D06018A922F361F900796784 /* UIKit.framework in Frameworks */, @@ -64,6 +108,10 @@ D060186E22F35FCD00796784 /* Sources */ = { isa = PBXGroup; children = ( + D03E3E652304B61A0049C28B /* AnimationRenderer.swift */, + D03E3E662304B61A0049C28B /* SoftwareAnimationRenderer.swift */, + D03E3E4D2304B50A0049C28B /* AnimatedStickerNode.swift */, + D03E3E4E2304B50A0049C28B /* AnimatedStickerUtils.swift */, D06018A322F361E800796784 /* AnimationNode.swift */, D060186F22F35FCD00796784 /* AnimationUI.h */, D06018AE22F3641F00796784 /* FrameworkBundle.swift */, @@ -74,6 +122,18 @@ D06018A522F361F400796784 /* Frameworks */ = { isa = PBXGroup; children = ( + D03E3E8D2304B6EC0049C28B /* YuvConversion.framework */, + D03E3E632304B5640049C28B /* MobileCoreServices.framework */, + D03E3E612304B55F0049C28B /* SwiftSignalKit.framework */, + D03E3E5F2304B54E0049C28B /* StickerResources.framework */, + D03E3E5D2304B5490049C28B /* MediaResources.framework */, + D03E3E5B2304B5450049C28B /* Tuples.framework */, + D03E3E592304B5400049C28B /* GZip.framework */, + D03E3E572304B53B0049C28B /* Display.framework */, + D03E3E552304B52F0049C28B /* libcompression.tbd */, + D03E3E532304B51E0049C28B /* TelegramCore.framework */, + D03E3E512304B51A0049C28B /* Postbox.framework */, + D03E3E492304B4CC0049C28B /* RLottie.framework */, D06018AC22F361FF00796784 /* Lottie.framework */, D06018AA22F361FC00796784 /* AsyncDisplayKit.framework */, D06018A822F361F800796784 /* UIKit.framework */, @@ -162,7 +222,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + D03E3E672304B61A0049C28B /* AnimationRenderer.swift in Sources */, + D03E3E4F2304B50A0049C28B /* AnimatedStickerNode.swift in Sources */, D06018AF22F3641F00796784 /* FrameworkBundle.swift in Sources */, + D03E3E502304B50A0049C28B /* AnimatedStickerUtils.swift in Sources */, + D03E3E682304B61A0049C28B /* SoftwareAnimationRenderer.swift in Sources */, D06018A422F361E800796784 /* AnimationNode.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/submodules/TelegramUI/TelegramUI/AnimatedStickerNode.swift b/submodules/AnimationUI/Sources/AnimatedStickerNode.swift similarity index 93% rename from submodules/TelegramUI/TelegramUI/AnimatedStickerNode.swift rename to submodules/AnimationUI/Sources/AnimatedStickerNode.swift index da8e1d3c37..460ca98e2c 100644 --- a/submodules/TelegramUI/TelegramUI/AnimatedStickerNode.swift +++ b/submodules/AnimationUI/Sources/AnimatedStickerNode.swift @@ -11,34 +11,6 @@ import Tuples import MediaResources import StickerResources -private final class AnimationFrameCache { - private var cache: [Int: NSPurgeableData] = [:] - - func get(index: Int, _ f: (NSPurgeableData?) -> Void) { - guard let data = self.cache[index] else { - f(nil) - return - } - if data.beginContentAccess() { - f(data) - data.endContentAccess() - } else { - self.cache.removeValue(forKey: index) - f(nil) - } - } - - func set(index: Int, bytes: UnsafeRawPointer, length: Int) { - let data = NSPurgeableData(bytes: bytes, length: length) - data.endContentAccess() - self.cache[index] = data - } - - func removeAll() { - self.cache.removeAll() - } -} - private let sharedQueue = Queue() private class AnimatedStickerNodeDisplayEvents: ASDisplayNode { @@ -70,12 +42,12 @@ private class AnimatedStickerNodeDisplayEvents: ASDisplayNode { } } -enum AnimatedStickerMode { +public enum AnimatedStickerMode { case cached case direct } -enum AnimatedStickerPlaybackMode { +public enum AnimatedStickerPlaybackMode { case once case loop } @@ -329,7 +301,7 @@ public struct AnimatedStickerStatus: Equatable { } } -final class AnimatedStickerNode: ASDisplayNode { +public final class AnimatedStickerNode: ASDisplayNode { private let queue: Queue private var account: Account? private var fileReference: FileMediaReference? @@ -337,8 +309,8 @@ final class AnimatedStickerNode: ASDisplayNode { private let fetchDisposable = MetaDisposable() private let eventsNode: AnimatedStickerNodeDisplayEvents - var started: () -> Void = {} - var reportedStarted = false + public var started: () -> Void = {} + private var reportedStarted = false private let timer = Atomic(value: nil) @@ -355,7 +327,7 @@ final class AnimatedStickerNode: ASDisplayNode { return self.playbackStatus.get() } - var visibility = false { + public var visibility = false { didSet { if self.visibility != oldValue { self.updateIsPlaying() @@ -371,7 +343,7 @@ final class AnimatedStickerNode: ASDisplayNode { } } - override init() { + override public init() { self.queue = sharedQueue self.eventsNode = AnimatedStickerNodeDisplayEvents() @@ -392,7 +364,7 @@ final class AnimatedStickerNode: ASDisplayNode { self.timer.swap(nil)?.invalidate() } - override func didLoad() { + override public func didLoad() { super.didLoad() #if targetEnvironment(simulator) @@ -405,7 +377,7 @@ final class AnimatedStickerNode: ASDisplayNode { self.addSubnode(self.renderer!) } - func setup(account: Account, resource: MediaResource, fitzModifier: EmojiFitzModifier? = nil, width: Int, height: Int, playbackMode: AnimatedStickerPlaybackMode = .loop, mode: AnimatedStickerMode) { + public func setup(account: Account, resource: MediaResource, fitzModifier: EmojiFitzModifier? = nil, width: Int, height: Int, playbackMode: AnimatedStickerPlaybackMode = .loop, mode: AnimatedStickerMode) { if width < 2 || height < 2 { return } @@ -437,7 +409,7 @@ final class AnimatedStickerNode: ASDisplayNode { } } - func reset() { + public func reset() { self.disposable.set(nil) self.fetchDisposable.set(nil) } @@ -454,7 +426,7 @@ final class AnimatedStickerNode: ASDisplayNode { } } - func play() { + public func play() { let directData = self.directData let cachedData = self.cachedData let queue = self.queue @@ -517,12 +489,12 @@ final class AnimatedStickerNode: ASDisplayNode { } } - func stop() { + public func stop() { self.reportedStarted = false self.timer.swap(nil)?.invalidate() } - func seekToStart() { + public func seekToStart() { self.isPlaying = false let directData = self.directData @@ -576,7 +548,7 @@ final class AnimatedStickerNode: ASDisplayNode { } } - func playIfNeeded() -> Bool { + public func playIfNeeded() -> Bool { if !self.isPlaying { self.isPlaying = true self.play() @@ -585,7 +557,7 @@ final class AnimatedStickerNode: ASDisplayNode { return false } - func updateLayout(size: CGSize) { + public func updateLayout(size: CGSize) { self.renderer?.frame = CGRect(origin: CGPoint(), size: size) } } diff --git a/submodules/TelegramUI/TelegramUI/AnimatedStickerUtils.swift b/submodules/AnimationUI/Sources/AnimatedStickerUtils.swift similarity index 97% rename from submodules/TelegramUI/TelegramUI/AnimatedStickerUtils.swift rename to submodules/AnimationUI/Sources/AnimatedStickerUtils.swift index 9d8aeb6d23..5d9c5a81b7 100644 --- a/submodules/TelegramUI/TelegramUI/AnimatedStickerUtils.swift +++ b/submodules/AnimationUI/Sources/AnimatedStickerUtils.swift @@ -4,13 +4,13 @@ import SwiftSignalKit import Postbox import Display import TelegramCore -import TelegramUIPrivateModule import Compression import GZip import RLottie import MediaResources import MobileCoreServices import MediaResources +import YuvConversion let colorKeyRegex = try? NSRegularExpression(pattern: "\"k\":\\[[\\d\\.]+\\,[\\d\\.]+\\,[\\d\\.]+\\,[\\d\\.]+\\]") @@ -85,7 +85,7 @@ private func transformedWithFitzModifier(data: Data, fitzModifier: EmojiFitzModi } } -func fetchCompressedLottieFirstFrameAJpeg(data: Data, size: CGSize, fitzModifier: EmojiFitzModifier? = nil, cacheKey: String) -> Signal { +public func fetchCompressedLottieFirstFrameAJpeg(data: Data, size: CGSize, fitzModifier: EmojiFitzModifier? = nil, cacheKey: String) -> Signal { return Signal({ subscriber in let queue = Queue() @@ -182,7 +182,7 @@ private let threadPool: ThreadPool = { }() @available(iOS 9.0, *) -func experimentalConvertCompressedLottieToCombinedMp4(data: Data, size: CGSize, fitzModifier: EmojiFitzModifier? = nil, cacheKey: String) -> Signal { +public func experimentalConvertCompressedLottieToCombinedMp4(data: Data, size: CGSize, fitzModifier: EmojiFitzModifier? = nil, cacheKey: String) -> Signal { return Signal({ subscriber in let cancelled = Atomic(value: false) diff --git a/submodules/TelegramUI/TelegramUI/AnimationRenderer.swift b/submodules/AnimationUI/Sources/AnimationRenderer.swift similarity index 100% rename from submodules/TelegramUI/TelegramUI/AnimationRenderer.swift rename to submodules/AnimationUI/Sources/AnimationRenderer.swift diff --git a/submodules/TelegramUI/TelegramUI/SoftwareAnimationRenderer.swift b/submodules/AnimationUI/Sources/SoftwareAnimationRenderer.swift similarity index 97% rename from submodules/TelegramUI/TelegramUI/SoftwareAnimationRenderer.swift rename to submodules/AnimationUI/Sources/SoftwareAnimationRenderer.swift index f13c50adea..252cd89ae3 100644 --- a/submodules/TelegramUI/TelegramUI/SoftwareAnimationRenderer.swift +++ b/submodules/AnimationUI/Sources/SoftwareAnimationRenderer.swift @@ -3,7 +3,7 @@ import UIKit import AsyncDisplayKit import Display import SwiftSignalKit -import TelegramUIPrivateModule +import YuvConversion final class SoftwareAnimationRenderer: ASDisplayNode, AnimationRenderer { func render(queue: Queue, width: Int, height: Int, bytesPerRow: Int, data: Data, type: AnimationRendererFrameType, completion: @escaping () -> Void) { diff --git a/submodules/HashtagSearchUI/HashtagSearchUI_Xcode.xcodeproj/project.pbxproj b/submodules/HashtagSearchUI/HashtagSearchUI_Xcode.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..e65fb58175 --- /dev/null +++ b/submodules/HashtagSearchUI/HashtagSearchUI_Xcode.xcodeproj/project.pbxproj @@ -0,0 +1,587 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + D03E3D742304AC350049C28B /* HashtagSearchUI.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E3D722304AC350049C28B /* HashtagSearchUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D03E3D822304ACD90049C28B /* HashtagSearchControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3D802304ACD80049C28B /* HashtagSearchControllerNode.swift */; }; + D03E3D832304ACD90049C28B /* HashtagSearchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3D812304ACD80049C28B /* HashtagSearchController.swift */; }; + D03E3D862304ACE80049C28B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D852304ACE80049C28B /* Foundation.framework */; }; + D03E3D882304ACEC0049C28B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D872304ACEC0049C28B /* UIKit.framework */; }; + D03E3D8A2304ACEF0049C28B /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D892304ACEF0049C28B /* Display.framework */; }; + D03E3D8C2304ACF30049C28B /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D8B2304ACF30049C28B /* TelegramCore.framework */; }; + D03E3D8E2304ACF70049C28B /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D8D2304ACF70049C28B /* Postbox.framework */; }; + D03E3D902304ACFB0049C28B /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D8F2304ACFB0049C28B /* SwiftSignalKit.framework */; }; + D03E3D922304ACFF0049C28B /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D912304ACFF0049C28B /* TelegramPresentationData.framework */; }; + D03E3D942304AD040049C28B /* TelegramBaseController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D932304AD040049C28B /* TelegramBaseController.framework */; }; + D03E3D962304AD090049C28B /* AccountContext.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D952304AD090049C28B /* AccountContext.framework */; }; + D03E3D982304AD0E0049C28B /* ChatListUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D972304AD0E0049C28B /* ChatListUI.framework */; }; + D03E3D9A2304AD1B0049C28B /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D992304AD1B0049C28B /* AsyncDisplayKit.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D03E3D6F2304AC350049C28B /* HashtagSearchUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HashtagSearchUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D722304AC350049C28B /* HashtagSearchUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HashtagSearchUI.h; sourceTree = ""; }; + D03E3D732304AC350049C28B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D03E3D802304ACD80049C28B /* HashtagSearchControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HashtagSearchControllerNode.swift; sourceTree = ""; }; + D03E3D812304ACD80049C28B /* HashtagSearchController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HashtagSearchController.swift; sourceTree = ""; }; + D03E3D852304ACE80049C28B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D03E3D872304ACEC0049C28B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + D03E3D892304ACEF0049C28B /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D8B2304ACF30049C28B /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D8D2304ACF70049C28B /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D8F2304ACFB0049C28B /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D912304ACFF0049C28B /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D932304AD040049C28B /* TelegramBaseController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramBaseController.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D952304AD090049C28B /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D972304AD0E0049C28B /* ChatListUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ChatListUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D992304AD1B0049C28B /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D03E3D6C2304AC350049C28B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3D9A2304AD1B0049C28B /* AsyncDisplayKit.framework in Frameworks */, + D03E3D982304AD0E0049C28B /* ChatListUI.framework in Frameworks */, + D03E3D962304AD090049C28B /* AccountContext.framework in Frameworks */, + D03E3D942304AD040049C28B /* TelegramBaseController.framework in Frameworks */, + D03E3D922304ACFF0049C28B /* TelegramPresentationData.framework in Frameworks */, + D03E3D902304ACFB0049C28B /* SwiftSignalKit.framework in Frameworks */, + D03E3D8E2304ACF70049C28B /* Postbox.framework in Frameworks */, + D03E3D8C2304ACF30049C28B /* TelegramCore.framework in Frameworks */, + D03E3D8A2304ACEF0049C28B /* Display.framework in Frameworks */, + D03E3D882304ACEC0049C28B /* UIKit.framework in Frameworks */, + D03E3D862304ACE80049C28B /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D03E3D652304AC350049C28B = { + isa = PBXGroup; + children = ( + D03E3D732304AC350049C28B /* Info.plist */, + D03E3D712304AC350049C28B /* Sources */, + D03E3D702304AC350049C28B /* Products */, + D03E3D842304ACE70049C28B /* Frameworks */, + ); + sourceTree = ""; + }; + D03E3D702304AC350049C28B /* Products */ = { + isa = PBXGroup; + children = ( + D03E3D6F2304AC350049C28B /* HashtagSearchUI.framework */, + ); + name = Products; + sourceTree = ""; + }; + D03E3D712304AC350049C28B /* Sources */ = { + isa = PBXGroup; + children = ( + D03E3D812304ACD80049C28B /* HashtagSearchController.swift */, + D03E3D802304ACD80049C28B /* HashtagSearchControllerNode.swift */, + D03E3D722304AC350049C28B /* HashtagSearchUI.h */, + ); + path = Sources; + sourceTree = ""; + }; + D03E3D842304ACE70049C28B /* Frameworks */ = { + isa = PBXGroup; + children = ( + D03E3D992304AD1B0049C28B /* AsyncDisplayKit.framework */, + D03E3D972304AD0E0049C28B /* ChatListUI.framework */, + D03E3D952304AD090049C28B /* AccountContext.framework */, + D03E3D932304AD040049C28B /* TelegramBaseController.framework */, + D03E3D912304ACFF0049C28B /* TelegramPresentationData.framework */, + D03E3D8F2304ACFB0049C28B /* SwiftSignalKit.framework */, + D03E3D8D2304ACF70049C28B /* Postbox.framework */, + D03E3D8B2304ACF30049C28B /* TelegramCore.framework */, + D03E3D892304ACEF0049C28B /* Display.framework */, + D03E3D872304ACEC0049C28B /* UIKit.framework */, + D03E3D852304ACE80049C28B /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D03E3D6A2304AC350049C28B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3D742304AC350049C28B /* HashtagSearchUI.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D03E3D6E2304AC350049C28B /* HashtagSearchUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = D03E3D772304AC350049C28B /* Build configuration list for PBXNativeTarget "HashtagSearchUI" */; + buildPhases = ( + D03E3D6A2304AC350049C28B /* Headers */, + D03E3D6B2304AC350049C28B /* Sources */, + D03E3D6C2304AC350049C28B /* Frameworks */, + D03E3D6D2304AC350049C28B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HashtagSearchUI; + productName = HashtagSearchUI; + productReference = D03E3D6F2304AC350049C28B /* HashtagSearchUI.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D03E3D662304AC350049C28B /* Project object */ = { + isa = PBXProject; + attributes = { + DefaultBuildSystemTypeForWorkspace = Latest; + LastUpgradeCheck = 1030; + ORGANIZATIONNAME = "Telegram Messenger LLP"; + TargetAttributes = { + D03E3D6E2304AC350049C28B = { + CreatedOnToolsVersion = 10.3; + LastSwiftMigration = 1030; + }; + }; + }; + buildConfigurationList = D03E3D692304AC350049C28B /* Build configuration list for PBXProject "HashtagSearchUI_Xcode" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D03E3D652304AC350049C28B; + productRefGroup = D03E3D702304AC350049C28B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D03E3D6E2304AC350049C28B /* HashtagSearchUI */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D03E3D6D2304AC350049C28B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D03E3D6B2304AC350049C28B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3D832304ACD90049C28B /* HashtagSearchController.swift in Sources */, + D03E3D822304ACD90049C28B /* HashtagSearchControllerNode.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D03E3D752304AC350049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugAppStoreLLC; + }; + D03E3D762304AC350049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseAppStoreLLC; + }; + D03E3D782304AC350049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.HashtagSearchUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugAppStoreLLC; + }; + D03E3D792304AC350049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.HashtagSearchUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseAppStoreLLC; + }; + D03E3D7A2304AC5C0049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugHockeyapp; + }; + D03E3D7B2304AC5C0049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.HashtagSearchUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugHockeyapp; + }; + D03E3D7C2304AC660049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseHockeyappInternal; + }; + D03E3D7D2304AC660049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.HashtagSearchUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseHockeyappInternal; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D03E3D692304AC350049C28B /* Build configuration list for PBXProject "HashtagSearchUI_Xcode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3D752304AC350049C28B /* DebugAppStoreLLC */, + D03E3D7A2304AC5C0049C28B /* DebugHockeyapp */, + D03E3D762304AC350049C28B /* ReleaseAppStoreLLC */, + D03E3D7C2304AC660049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; + D03E3D772304AC350049C28B /* Build configuration list for PBXNativeTarget "HashtagSearchUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3D782304AC350049C28B /* DebugAppStoreLLC */, + D03E3D7B2304AC5C0049C28B /* DebugHockeyapp */, + D03E3D792304AC350049C28B /* ReleaseAppStoreLLC */, + D03E3D7D2304AC660049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; +/* End XCConfigurationList section */ + }; + rootObject = D03E3D662304AC350049C28B /* Project object */; +} diff --git a/submodules/HashtagSearchUI/Info.plist b/submodules/HashtagSearchUI/Info.plist new file mode 100644 index 0000000000..e1fe4cfb7b --- /dev/null +++ b/submodules/HashtagSearchUI/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/submodules/TelegramUI/TelegramUI/HashtagSearchController.swift b/submodules/HashtagSearchUI/Sources/HashtagSearchController.swift similarity index 96% rename from submodules/TelegramUI/TelegramUI/HashtagSearchController.swift rename to submodules/HashtagSearchUI/Sources/HashtagSearchController.swift index 46acae68f3..602e896b6a 100644 --- a/submodules/TelegramUI/TelegramUI/HashtagSearchController.swift +++ b/submodules/HashtagSearchUI/Sources/HashtagSearchController.swift @@ -9,7 +9,7 @@ import TelegramBaseController import AccountContext import ChatListUI -final class HashtagSearchController: TelegramBaseController { +public final class HashtagSearchController: TelegramBaseController { private let queue = Queue() private let context: AccountContext @@ -24,7 +24,7 @@ final class HashtagSearchController: TelegramBaseController { return self.displayNode as! HashtagSearchControllerNode } - init(context: AccountContext, peer: Peer?, query: String) { + public init(context: AccountContext, peer: Peer?, query: String) { self.context = context self.peer = peer self.query = query @@ -91,7 +91,7 @@ final class HashtagSearchController: TelegramBaseController { self.openMessageFromSearchDisposable.dispose() } - override func loadDisplayNode() { + override public func loadDisplayNode() { self.displayNode = HashtagSearchControllerNode(context: self.context, peer: self.peer, query: self.query, theme: self.presentationData.theme, strings: self.presentationData.strings) if let chatController = self.controllerNode.chatController { chatController.parentController = self diff --git a/submodules/TelegramUI/TelegramUI/HashtagSearchControllerNode.swift b/submodules/HashtagSearchUI/Sources/HashtagSearchControllerNode.swift similarity index 97% rename from submodules/TelegramUI/TelegramUI/HashtagSearchControllerNode.swift rename to submodules/HashtagSearchUI/Sources/HashtagSearchControllerNode.swift index 7fa785a382..163b06c1e8 100644 --- a/submodules/TelegramUI/TelegramUI/HashtagSearchControllerNode.swift +++ b/submodules/HashtagSearchUI/Sources/HashtagSearchControllerNode.swift @@ -13,7 +13,7 @@ final class HashtagSearchControllerNode: ASDisplayNode { private let segmentedControl: UISegmentedControl let listNode: ListView - var chatController: ChatControllerImpl? + var chatController: ChatController? private let context: AccountContext private let query: String @@ -40,7 +40,7 @@ final class HashtagSearchControllerNode: ASDisplayNode { self.segmentedControl.selectedSegmentIndex = 0 if let peer = peer { - self.chatController = ChatControllerImpl(context: context, chatLocation: .peer(peer.id), botStart: nil, mode: .inline) + self.chatController = context.sharedContext.makeChatController(context: context, chatLocation: .peer(peer.id), subject: nil, botStart: nil, mode: .inline) } else { self.chatController = nil } diff --git a/submodules/HashtagSearchUI/Sources/HashtagSearchUI.h b/submodules/HashtagSearchUI/Sources/HashtagSearchUI.h new file mode 100644 index 0000000000..c5be233f9a --- /dev/null +++ b/submodules/HashtagSearchUI/Sources/HashtagSearchUI.h @@ -0,0 +1,19 @@ +// +// HashtagSearchUI.h +// HashtagSearchUI +// +// Created by Peter on 8/14/19. +// Copyright © 2019 Telegram Messenger LLP. All rights reserved. +// + +#import + +//! Project version number for HashtagSearchUI. +FOUNDATION_EXPORT double HashtagSearchUIVersionNumber; + +//! Project version string for HashtagSearchUI. +FOUNDATION_EXPORT const unsigned char HashtagSearchUIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/submodules/ItemListAvatarAndNameInfoItem/Info.plist b/submodules/ItemListAvatarAndNameInfoItem/Info.plist new file mode 100644 index 0000000000..e1fe4cfb7b --- /dev/null +++ b/submodules/ItemListAvatarAndNameInfoItem/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem_Xcode.xcodeproj/project.pbxproj b/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem_Xcode.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..de2f1b650f --- /dev/null +++ b/submodules/ItemListAvatarAndNameInfoItem/ItemListAvatarAndNameInfoItem_Xcode.xcodeproj/project.pbxproj @@ -0,0 +1,595 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + D03E3DAA2304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E3DA82304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D03E3DB52304AF2E0049C28B /* ItemListAvatarAndNameItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3DB42304AF2E0049C28B /* ItemListAvatarAndNameItem.swift */; }; + D03E3DB82304AF3B0049C28B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DB72304AF3A0049C28B /* Foundation.framework */; }; + D03E3DBA2304AF3E0049C28B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DB92304AF3E0049C28B /* UIKit.framework */; }; + D03E3DBC2304AF410049C28B /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DBB2304AF410049C28B /* Display.framework */; }; + D03E3DBE2304AF450049C28B /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DBD2304AF450049C28B /* AsyncDisplayKit.framework */; }; + D03E3DC02304AF490049C28B /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DBF2304AF490049C28B /* Postbox.framework */; }; + D03E3DC22304AF4D0049C28B /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DC12304AF4D0049C28B /* TelegramCore.framework */; }; + D03E3DC42304AF5B0049C28B /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DC32304AF5B0049C28B /* SwiftSignalKit.framework */; }; + D03E3DC62304AF5F0049C28B /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DC52304AF5F0049C28B /* TelegramPresentationData.framework */; }; + D03E3DC82304AF640049C28B /* ItemListUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DC72304AF640049C28B /* ItemListUI.framework */; }; + D03E3DCA2304AF670049C28B /* ActivityIndicator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DC92304AF670049C28B /* ActivityIndicator.framework */; }; + D03E3DCC2304AF6D0049C28B /* AvatarNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DCB2304AF6D0049C28B /* AvatarNode.framework */; }; + D03E3DCE2304AF720049C28B /* TelegramStringFormatting.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DCD2304AF720049C28B /* TelegramStringFormatting.framework */; }; + D03E3DD02304AF760049C28B /* PeerPresenceStatusManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DCF2304AF760049C28B /* PeerPresenceStatusManager.framework */; }; + D03E3DD42304AFE80049C28B /* FrameworkBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3DD32304AFE80049C28B /* FrameworkBundle.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D03E3DA52304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ItemListAvatarAndNameInfoItem.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DA82304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ItemListAvatarAndNameInfoItem.h; sourceTree = ""; }; + D03E3DA92304AEDD0049C28B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D03E3DB42304AF2E0049C28B /* ItemListAvatarAndNameItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListAvatarAndNameItem.swift; sourceTree = ""; }; + D03E3DB72304AF3A0049C28B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D03E3DB92304AF3E0049C28B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + D03E3DBB2304AF410049C28B /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DBD2304AF450049C28B /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DBF2304AF490049C28B /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DC12304AF4D0049C28B /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DC32304AF5B0049C28B /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DC52304AF5F0049C28B /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DC72304AF640049C28B /* ItemListUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ItemListUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DC92304AF670049C28B /* ActivityIndicator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ActivityIndicator.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DCB2304AF6D0049C28B /* AvatarNode.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AvatarNode.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DCD2304AF720049C28B /* TelegramStringFormatting.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramStringFormatting.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DCF2304AF760049C28B /* PeerPresenceStatusManager.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PeerPresenceStatusManager.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DD32304AFE80049C28B /* FrameworkBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkBundle.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D03E3DA22304AEDD0049C28B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3DD02304AF760049C28B /* PeerPresenceStatusManager.framework in Frameworks */, + D03E3DCE2304AF720049C28B /* TelegramStringFormatting.framework in Frameworks */, + D03E3DCC2304AF6D0049C28B /* AvatarNode.framework in Frameworks */, + D03E3DCA2304AF670049C28B /* ActivityIndicator.framework in Frameworks */, + D03E3DC82304AF640049C28B /* ItemListUI.framework in Frameworks */, + D03E3DC62304AF5F0049C28B /* TelegramPresentationData.framework in Frameworks */, + D03E3DC42304AF5B0049C28B /* SwiftSignalKit.framework in Frameworks */, + D03E3DC22304AF4D0049C28B /* TelegramCore.framework in Frameworks */, + D03E3DC02304AF490049C28B /* Postbox.framework in Frameworks */, + D03E3DBE2304AF450049C28B /* AsyncDisplayKit.framework in Frameworks */, + D03E3DBC2304AF410049C28B /* Display.framework in Frameworks */, + D03E3DBA2304AF3E0049C28B /* UIKit.framework in Frameworks */, + D03E3DB82304AF3B0049C28B /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D03E3D9B2304AEDD0049C28B = { + isa = PBXGroup; + children = ( + D03E3DA92304AEDD0049C28B /* Info.plist */, + D03E3DA72304AEDD0049C28B /* Sources */, + D03E3DA62304AEDD0049C28B /* Products */, + D03E3DB62304AF3A0049C28B /* Frameworks */, + ); + sourceTree = ""; + }; + D03E3DA62304AEDD0049C28B /* Products */ = { + isa = PBXGroup; + children = ( + D03E3DA52304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.framework */, + ); + name = Products; + sourceTree = ""; + }; + D03E3DA72304AEDD0049C28B /* Sources */ = { + isa = PBXGroup; + children = ( + D03E3DB42304AF2E0049C28B /* ItemListAvatarAndNameItem.swift */, + D03E3DA82304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.h */, + D03E3DD32304AFE80049C28B /* FrameworkBundle.swift */, + ); + path = Sources; + sourceTree = ""; + }; + D03E3DB62304AF3A0049C28B /* Frameworks */ = { + isa = PBXGroup; + children = ( + D03E3DCF2304AF760049C28B /* PeerPresenceStatusManager.framework */, + D03E3DCD2304AF720049C28B /* TelegramStringFormatting.framework */, + D03E3DCB2304AF6D0049C28B /* AvatarNode.framework */, + D03E3DC92304AF670049C28B /* ActivityIndicator.framework */, + D03E3DC72304AF640049C28B /* ItemListUI.framework */, + D03E3DC52304AF5F0049C28B /* TelegramPresentationData.framework */, + D03E3DC32304AF5B0049C28B /* SwiftSignalKit.framework */, + D03E3DC12304AF4D0049C28B /* TelegramCore.framework */, + D03E3DBF2304AF490049C28B /* Postbox.framework */, + D03E3DBD2304AF450049C28B /* AsyncDisplayKit.framework */, + D03E3DBB2304AF410049C28B /* Display.framework */, + D03E3DB92304AF3E0049C28B /* UIKit.framework */, + D03E3DB72304AF3A0049C28B /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D03E3DA02304AEDD0049C28B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3DAA2304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D03E3DA42304AEDD0049C28B /* ItemListAvatarAndNameInfoItem */ = { + isa = PBXNativeTarget; + buildConfigurationList = D03E3DAD2304AEDD0049C28B /* Build configuration list for PBXNativeTarget "ItemListAvatarAndNameInfoItem" */; + buildPhases = ( + D03E3DA02304AEDD0049C28B /* Headers */, + D03E3DA12304AEDD0049C28B /* Sources */, + D03E3DA22304AEDD0049C28B /* Frameworks */, + D03E3DA32304AEDD0049C28B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ItemListAvatarAndNameInfoItem; + productName = ItemListAvatarAndNameInfoItem; + productReference = D03E3DA52304AEDD0049C28B /* ItemListAvatarAndNameInfoItem.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D03E3D9C2304AEDD0049C28B /* Project object */ = { + isa = PBXProject; + attributes = { + DefaultBuildSystemTypeForWorkspace = Latest; + LastUpgradeCheck = 1030; + ORGANIZATIONNAME = "Telegram Messenger LLP"; + TargetAttributes = { + D03E3DA42304AEDD0049C28B = { + CreatedOnToolsVersion = 10.3; + LastSwiftMigration = 1030; + }; + }; + }; + buildConfigurationList = D03E3D9F2304AEDD0049C28B /* Build configuration list for PBXProject "ItemListAvatarAndNameInfoItem_Xcode" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D03E3D9B2304AEDD0049C28B; + productRefGroup = D03E3DA62304AEDD0049C28B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D03E3DA42304AEDD0049C28B /* ItemListAvatarAndNameInfoItem */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D03E3DA32304AEDD0049C28B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D03E3DA12304AEDD0049C28B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3DD42304AFE80049C28B /* FrameworkBundle.swift in Sources */, + D03E3DB52304AF2E0049C28B /* ItemListAvatarAndNameItem.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D03E3DAB2304AEDD0049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugAppStoreLLC; + }; + D03E3DAC2304AEDD0049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseAppStoreLLC; + }; + D03E3DAE2304AEDD0049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListAvatarAndNameInfoItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugAppStoreLLC; + }; + D03E3DAF2304AEDD0049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListAvatarAndNameInfoItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseAppStoreLLC; + }; + D03E3DB02304AF000049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugHockeyapp; + }; + D03E3DB12304AF000049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListAvatarAndNameInfoItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugHockeyapp; + }; + D03E3DB22304AF080049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseHockeyappInternal; + }; + D03E3DB32304AF080049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListAvatarAndNameInfoItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseHockeyappInternal; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D03E3D9F2304AEDD0049C28B /* Build configuration list for PBXProject "ItemListAvatarAndNameInfoItem_Xcode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3DAB2304AEDD0049C28B /* DebugAppStoreLLC */, + D03E3DB02304AF000049C28B /* DebugHockeyapp */, + D03E3DAC2304AEDD0049C28B /* ReleaseAppStoreLLC */, + D03E3DB22304AF080049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; + D03E3DAD2304AEDD0049C28B /* Build configuration list for PBXNativeTarget "ItemListAvatarAndNameInfoItem" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3DAE2304AEDD0049C28B /* DebugAppStoreLLC */, + D03E3DB12304AF000049C28B /* DebugHockeyapp */, + D03E3DAF2304AEDD0049C28B /* ReleaseAppStoreLLC */, + D03E3DB32304AF080049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; +/* End XCConfigurationList section */ + }; + rootObject = D03E3D9C2304AEDD0049C28B /* Project object */; +} diff --git a/submodules/ItemListAvatarAndNameInfoItem/Sources/FrameworkBundle.swift b/submodules/ItemListAvatarAndNameInfoItem/Sources/FrameworkBundle.swift new file mode 100644 index 0000000000..8ca13d7d92 --- /dev/null +++ b/submodules/ItemListAvatarAndNameInfoItem/Sources/FrameworkBundle.swift @@ -0,0 +1,13 @@ +import Foundation +import UIKit + +private class FrameworkBundleClass: NSObject { +} + +let frameworkBundle: Bundle = Bundle(for: FrameworkBundleClass.self) + +extension UIImage { + convenience init?(bundleImageName: String) { + self.init(named: bundleImageName, in: frameworkBundle, compatibleWith: nil) + } +} diff --git a/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameInfoItem.h b/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameInfoItem.h new file mode 100644 index 0000000000..9335e2fb22 --- /dev/null +++ b/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameInfoItem.h @@ -0,0 +1,19 @@ +// +// ItemListAvatarAndNameInfoItem.h +// ItemListAvatarAndNameInfoItem +// +// Created by Peter on 8/15/19. +// Copyright © 2019 Telegram Messenger LLP. All rights reserved. +// + +#import + +//! Project version number for ItemListAvatarAndNameInfoItem. +FOUNDATION_EXPORT double ItemListAvatarAndNameInfoItemVersionNumber; + +//! Project version string for ItemListAvatarAndNameInfoItem. +FOUNDATION_EXPORT const unsigned char ItemListAvatarAndNameInfoItemVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/submodules/TelegramUI/TelegramUI/ItemListAvatarAndNameItem.swift b/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameItem.swift similarity index 89% rename from submodules/TelegramUI/TelegramUI/ItemListAvatarAndNameItem.swift rename to submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameItem.swift index 475bdaefba..432d266f93 100644 --- a/submodules/TelegramUI/TelegramUI/ItemListAvatarAndNameItem.swift +++ b/submodules/ItemListAvatarAndNameInfoItem/Sources/ItemListAvatarAndNameItem.swift @@ -18,148 +18,108 @@ private func generateClearIcon(color: UIColor) -> UIImage? { return generateTintedImage(image: UIImage(bundleImageName: "Components/Search Bar/Clear"), color: color) } -enum ItemListAvatarAndNameInfoItemTitleType { +public enum ItemListAvatarAndNameInfoItemTitleType { case group case channel } -enum ItemListAvatarAndNameInfoItemName: Equatable { +public enum ItemListAvatarAndNameInfoItemName: Equatable { case personName(firstName: String, lastName: String) case title(title: String, type: ItemListAvatarAndNameInfoItemTitleType) - init(_ peer: Peer) { + public init(_ peer: Peer) { switch peer.indexName { - case let .personName(first, last, _, _): - self = .personName(firstName: first, lastName: last) - case let .title(title, _): - let type: ItemListAvatarAndNameInfoItemTitleType - if let peer = peer as? TelegramChannel, case .broadcast = peer.info { - type = .channel - } else { - type = .group - } - self = .title(title: title, type: type) + case let .personName(first, last, _, _): + self = .personName(firstName: first, lastName: last) + case let .title(title, _): + let type: ItemListAvatarAndNameInfoItemTitleType + if let peer = peer as? TelegramChannel, case .broadcast = peer.info { + type = .channel + } else { + type = .group + } + self = .title(title: title, type: type) } } - var composedTitle: String { + public var composedTitle: String { switch self { - case let .personName(firstName, lastName): - if !firstName.isEmpty && !lastName.isEmpty { - return firstName + " " + lastName - } else if !firstName.isEmpty { - return firstName - } else { - return lastName - } - case let .title(title, _): - return title + case let .personName(firstName, lastName): + if !firstName.isEmpty && !lastName.isEmpty { + return firstName + " " + lastName + } else if !firstName.isEmpty { + return firstName + } else { + return lastName + } + case let .title(title, _): + return title } } - func composedDisplayTitle(strings: PresentationStrings) -> String { + public func composedDisplayTitle(strings: PresentationStrings) -> String { switch self { - case let .personName(firstName, lastName): - if !firstName.isEmpty && !lastName.isEmpty { - return firstName + " " + lastName - } else if !firstName.isEmpty { - return firstName - } else if !lastName.isEmpty { - return lastName - } else { - return strings.User_DeletedAccount - } - case let .title(title, _): - return title + case let .personName(firstName, lastName): + if !firstName.isEmpty && !lastName.isEmpty { + return firstName + " " + lastName + } else if !firstName.isEmpty { + return firstName + } else if !lastName.isEmpty { + return lastName + } else { + return strings.User_DeletedAccount + } + case let .title(title, _): + return title } } - var isEmpty: Bool { + public var isEmpty: Bool { switch self { - case let .personName(firstName, _): - return firstName.isEmpty - case let .title(title, _): - return title.isEmpty - } - } - - static func ==(lhs: ItemListAvatarAndNameInfoItemName, rhs: ItemListAvatarAndNameInfoItemName) -> Bool { - switch lhs { - case let .personName(firstName, lastName): - if case .personName(firstName, lastName) = rhs { - return true - } else { - return false - } - case let .title(title, type): - if case .title(title, type) = rhs { - return true - } else { - return false - } + case let .personName(firstName, _): + return firstName.isEmpty + case let .title(title, _): + return title.isEmpty } } } -struct ItemListAvatarAndNameInfoItemState: Equatable { - let editingName: ItemListAvatarAndNameInfoItemName? - let updatingName: ItemListAvatarAndNameInfoItemName? +public struct ItemListAvatarAndNameInfoItemState: Equatable { + public var editingName: ItemListAvatarAndNameInfoItemName? + public var updatingName: ItemListAvatarAndNameInfoItemName? - init(editingName: ItemListAvatarAndNameInfoItemName? = nil, updatingName: ItemListAvatarAndNameInfoItemName? = nil) { + public init(editingName: ItemListAvatarAndNameInfoItemName? = nil, updatingName: ItemListAvatarAndNameInfoItemName? = nil) { self.editingName = editingName self.updatingName = updatingName } +} + +public final class ItemListAvatarAndNameInfoItemContext { + public var hiddenAvatarRepresentation: TelegramMediaImageRepresentation? - static func ==(lhs: ItemListAvatarAndNameInfoItemState, rhs: ItemListAvatarAndNameInfoItemState) -> Bool { - if lhs.editingName != rhs.editingName { - return false - } - if lhs.updatingName != rhs.updatingName { - return false - } - return true + public init(hiddenAvatarRepresentation: TelegramMediaImageRepresentation? = nil) { + self.hiddenAvatarRepresentation = hiddenAvatarRepresentation } } -final class ItemListAvatarAndNameInfoItemContext { - var hiddenAvatarRepresentation: TelegramMediaImageRepresentation? -} - -enum ItemListAvatarAndNameInfoItemStyle { +public enum ItemListAvatarAndNameInfoItemStyle { case plain case blocks(withTopInset: Bool, withExtendedBottomInset: Bool) } -enum ItemListAvatarAndNameInfoItemUpdatingAvatar: Equatable { +public enum ItemListAvatarAndNameInfoItemUpdatingAvatar: Equatable { case image(TelegramMediaImageRepresentation, Bool) case none - - static func ==(lhs: ItemListAvatarAndNameInfoItemUpdatingAvatar, rhs: ItemListAvatarAndNameInfoItemUpdatingAvatar) -> Bool { - switch lhs { - case let .image(representation, activity): - if case .image(representation, activity) = rhs { - return true - } else { - return false - } - case .none: - if case .none = rhs { - return true - } else { - return false - } - } - } } -enum ItemListAvatarAndNameInfoItemMode { +public enum ItemListAvatarAndNameInfoItemMode { case generic case contact case settings case editSettings } -class ItemListAvatarAndNameInfoItem: ListViewItem, ItemListItem { +public class ItemListAvatarAndNameInfoItem: ListViewItem, ItemListItem { let account: Account let theme: PresentationTheme let strings: PresentationStrings @@ -170,7 +130,7 @@ class ItemListAvatarAndNameInfoItem: ListViewItem, ItemListItem { let label: String? let cachedData: CachedPeerData? let state: ItemListAvatarAndNameInfoItemState - let sectionId: ItemListSectionId + public let sectionId: ItemListSectionId let style: ItemListAvatarAndNameInfoItemStyle let editingNameUpdated: (ItemListAvatarAndNameInfoItemName) -> Void let editingNameCompleted: () -> Void @@ -180,11 +140,11 @@ class ItemListAvatarAndNameInfoItem: ListViewItem, ItemListItem { let call: (() -> Void)? let action: (() -> Void)? let longTapAction: (() -> Void)? - let tag: ItemListItemTag? + public let tag: ItemListItemTag? - let selectable: Bool + public let selectable: Bool - init(account: Account, theme: PresentationTheme, strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat, mode: ItemListAvatarAndNameInfoItemMode, peer: Peer?, presence: PeerPresence?, label: String? = nil, cachedData: CachedPeerData?, state: ItemListAvatarAndNameInfoItemState, sectionId: ItemListSectionId, style: ItemListAvatarAndNameInfoItemStyle, editingNameUpdated: @escaping (ItemListAvatarAndNameInfoItemName) -> Void, editingNameCompleted: @escaping () -> Void = {}, avatarTapped: @escaping () -> Void, context: ItemListAvatarAndNameInfoItemContext? = nil, updatingImage: ItemListAvatarAndNameInfoItemUpdatingAvatar? = nil, call: (() -> Void)? = nil, action: (() -> Void)? = nil, longTapAction: (() -> Void)? = nil, tag: ItemListItemTag? = nil) { + public init(account: Account, theme: PresentationTheme, strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat, mode: ItemListAvatarAndNameInfoItemMode, peer: Peer?, presence: PeerPresence?, label: String? = nil, cachedData: CachedPeerData?, state: ItemListAvatarAndNameInfoItemState, sectionId: ItemListSectionId, style: ItemListAvatarAndNameInfoItemStyle, editingNameUpdated: @escaping (ItemListAvatarAndNameInfoItemName) -> Void, editingNameCompleted: @escaping () -> Void = {}, avatarTapped: @escaping () -> Void, context: ItemListAvatarAndNameInfoItemContext? = nil, updatingImage: ItemListAvatarAndNameInfoItemUpdatingAvatar? = nil, call: (() -> Void)? = nil, action: (() -> Void)? = nil, longTapAction: (() -> Void)? = nil, tag: ItemListItemTag? = nil) { self.account = account self.theme = theme self.strings = strings @@ -214,7 +174,7 @@ class ItemListAvatarAndNameInfoItem: ListViewItem, ItemListItem { } } - func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal?, (ListViewItemApply) -> Void)) -> Void) { + public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal?, (ListViewItemApply) -> Void)) -> Void) { async { let node = ItemListAvatarAndNameInfoItemNode() let (layout, apply) = node.asyncLayout()(self, params, itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem)) @@ -228,7 +188,7 @@ class ItemListAvatarAndNameInfoItem: ListViewItem, ItemListItem { } } - func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) { + public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) { Queue.mainQueue().async { if let nodeValue = node() as? ItemListAvatarAndNameInfoItemNode { var animated = true @@ -249,7 +209,7 @@ class ItemListAvatarAndNameInfoItem: ListViewItem, ItemListItem { } } - func selected(listView: ListView){ + public func selected(listView: ListView){ listView.clearHighlightAnimated(true) self.action?() } @@ -259,7 +219,7 @@ private let avatarFont = UIFont(name: ".SFCompactRounded-Semibold", size: 28.0)! private let nameFont = Font.medium(19.0) private let statusFont = Font.regular(15.0) -class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, ItemListItemFocusableNode, UITextFieldDelegate { +public class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, ItemListItemFocusableNode, UITextFieldDelegate { private let backgroundNode: ASDisplayNode private let highlightedBackgroundNode: ASDisplayNode private let topStripeNode: ASDisplayNode @@ -290,11 +250,11 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite private let hiddenAvatarRepresentationDisposable = MetaDisposable() - var tag: ItemListItemTag? { + public var tag: ItemListItemTag? { return self.item?.tag } - var callButtonFrame: CGRect? { + public var callButtonFrame: CGRect? { if !self.callButton.alpha.isZero && self.callButton.supernode != nil { return self.callButton.frame } else { @@ -302,7 +262,7 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite } } - init() { + public init() { self.backgroundNode = ASDisplayNode() self.backgroundNode.isLayerBacked = true @@ -365,13 +325,13 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite self.hiddenAvatarRepresentationDisposable.dispose() } - override func didLoad() { + override public func didLoad() { super.didLoad() self.avatarNode.view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.avatarTapGesture(_:)))) } - func asyncLayout() -> (_ item: ItemListAvatarAndNameInfoItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, (Bool, Bool) -> Void) { + public func asyncLayout() -> (_ item: ItemListAvatarAndNameInfoItem, _ params: ListViewItemLayoutParams, _ neighbors: ItemListNeighbors) -> (ListViewItemNodeLayout, (Bool, Bool) -> Void) { let layoutNameNode = TextNode.asyncLayout(self.nameNode) let layoutStatusNode = TextNode.asyncLayout(self.statusNode) let currentOverlayImage = self.updatingAvatarOverlay.image @@ -976,7 +936,7 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite } } - override func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) { + override public func setHighlighted(_ highlighted: Bool, at point: CGPoint, animated: Bool) { super.setHighlighted(highlighted, at: point, animated: animated) if highlighted { @@ -1021,7 +981,7 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite button.isHidden = !textField.isFirstResponder || (textField.text?.isEmpty ?? true) } - @objc func textFieldDidChange(_ inputField: UITextField) { + @objc private func textFieldDidChange(_ inputField: UITextField) { if let item = self.item, let currentEditingName = item.state.editingName { var editingName: ItemListAvatarAndNameInfoItemName? if let inputFirstField = self.inputFirstField, let inputSecondField = self.inputSecondField { @@ -1043,7 +1003,7 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite } } - func textFieldDidBeginEditing(_ textField: UITextField) { + public func textFieldDidBeginEditing(_ textField: UITextField) { if textField == self.inputFirstField { self.updateClearButtonVisibility(self.inputFirstClearButton, textField: textField) } else if textField == self.inputSecondField { @@ -1051,7 +1011,7 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite } } - func textFieldDidEndEditing(_ textField: UITextField) { + public func textFieldDidEndEditing(_ textField: UITextField) { if textField == self.inputFirstField { self.updateClearButtonVisibility(self.inputFirstClearButton, textField: textField) } else if textField == self.inputSecondField { @@ -1059,7 +1019,7 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite } } - func textFieldShouldReturn(_ textField: UITextField) -> Bool { + public func textFieldShouldReturn(_ textField: UITextField) -> Bool { if textField == self.inputFirstField { if let inputSecondField = self.inputSecondField { inputSecondField.becomeFirstResponder() @@ -1072,20 +1032,20 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite return true } - @objc func avatarTapGesture(_ recognizer: UITapGestureRecognizer) { + @objc private func avatarTapGesture(_ recognizer: UITapGestureRecognizer) { if let item = self.item { item.avatarTapped() } } - func avatarTransitionNode() -> ((ASDisplayNode, () -> (UIView?, UIView?)), CGRect) { + public func avatarTransitionNode() -> ((ASDisplayNode, () -> (UIView?, UIView?)), CGRect) { let avatarNode = self.avatarNode return ((self.avatarNode, { [weak avatarNode] in return (avatarNode?.view.snapshotContentTree(unhide: true), nil) }), self.avatarNode.bounds) } - func updateAvatarHidden() { + public func updateAvatarHidden() { var hidden = false if let item = self.item, let context = item.context, let peer = item.peer, let hiddenAvatarRepresentation = context.hiddenAvatarRepresentation { for representation in peer.profileImageRepresentations { @@ -1099,29 +1059,29 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite } } - @objc func callButtonPressed() { + @objc private func callButtonPressed() { self.item?.call?() } - @objc func firstClearPressed() { + @objc private func firstClearPressed() { self.inputFirstField?.text = nil self.updateClearButtonVisibility(self.inputFirstClearButton, textField: self.inputFirstField) } - @objc func secondClearPressed() { + @objc private func secondClearPressed() { self.inputSecondField?.text = nil self.updateClearButtonVisibility(self.inputSecondClearButton, textField: self.inputSecondField) } - func focus() { + public func focus() { self.inputFirstField?.becomeFirstResponder() } - override func longTapped() { + override public func longTapped() { self.item?.longTapAction?() } - override var canBeLongTapped: Bool { + override public var canBeLongTapped: Bool { return self.item?.longTapAction != nil } } diff --git a/submodules/ItemListPeerActionItem/Info.plist b/submodules/ItemListPeerActionItem/Info.plist new file mode 100644 index 0000000000..e1fe4cfb7b --- /dev/null +++ b/submodules/ItemListPeerActionItem/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/submodules/ItemListPeerActionItem/ItemListPeerActionItem_Xcode.xcodeproj/project.pbxproj b/submodules/ItemListPeerActionItem/ItemListPeerActionItem_Xcode.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..54daf2b2ea --- /dev/null +++ b/submodules/ItemListPeerActionItem/ItemListPeerActionItem_Xcode.xcodeproj/project.pbxproj @@ -0,0 +1,567 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + D03E3DE42304B2030049C28B /* ItemListPeerActionItem.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E3DE22304B2030049C28B /* ItemListPeerActionItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D03E3DEF2304B25E0049C28B /* ItemListPeerActionItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3DEE2304B25E0049C28B /* ItemListPeerActionItem.swift */; }; + D03E3DF22304B2700049C28B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DF12304B2700049C28B /* Foundation.framework */; }; + D03E3DF42304B2740049C28B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DF32304B2740049C28B /* UIKit.framework */; }; + D03E3DF62304B2770049C28B /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DF52304B2770049C28B /* Display.framework */; }; + D03E3DF82304B27A0049C28B /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DF72304B27A0049C28B /* AsyncDisplayKit.framework */; }; + D03E3DFA2304B2800049C28B /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DF92304B2800049C28B /* SwiftSignalKit.framework */; }; + D03E3DFC2304B2850049C28B /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DFB2304B2850049C28B /* TelegramPresentationData.framework */; }; + D03E3DFE2304B2890049C28B /* ItemListUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DFD2304B2890049C28B /* ItemListUI.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D03E3DDF2304B2030049C28B /* ItemListPeerActionItem.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ItemListPeerActionItem.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DE22304B2030049C28B /* ItemListPeerActionItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ItemListPeerActionItem.h; sourceTree = ""; }; + D03E3DE32304B2030049C28B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D03E3DEE2304B25E0049C28B /* ItemListPeerActionItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListPeerActionItem.swift; sourceTree = ""; }; + D03E3DF12304B2700049C28B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D03E3DF32304B2740049C28B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + D03E3DF52304B2770049C28B /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DF72304B27A0049C28B /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DF92304B2800049C28B /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DFB2304B2850049C28B /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DFD2304B2890049C28B /* ItemListUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ItemListUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D03E3DDC2304B2030049C28B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3DFE2304B2890049C28B /* ItemListUI.framework in Frameworks */, + D03E3DFC2304B2850049C28B /* TelegramPresentationData.framework in Frameworks */, + D03E3DFA2304B2800049C28B /* SwiftSignalKit.framework in Frameworks */, + D03E3DF82304B27A0049C28B /* AsyncDisplayKit.framework in Frameworks */, + D03E3DF62304B2770049C28B /* Display.framework in Frameworks */, + D03E3DF42304B2740049C28B /* UIKit.framework in Frameworks */, + D03E3DF22304B2700049C28B /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D03E3DD52304B2030049C28B = { + isa = PBXGroup; + children = ( + D03E3DE32304B2030049C28B /* Info.plist */, + D03E3DE12304B2030049C28B /* Sources */, + D03E3DE02304B2030049C28B /* Products */, + D03E3DF02304B2700049C28B /* Frameworks */, + ); + sourceTree = ""; + }; + D03E3DE02304B2030049C28B /* Products */ = { + isa = PBXGroup; + children = ( + D03E3DDF2304B2030049C28B /* ItemListPeerActionItem.framework */, + ); + name = Products; + sourceTree = ""; + }; + D03E3DE12304B2030049C28B /* Sources */ = { + isa = PBXGroup; + children = ( + D03E3DEE2304B25E0049C28B /* ItemListPeerActionItem.swift */, + D03E3DE22304B2030049C28B /* ItemListPeerActionItem.h */, + ); + path = Sources; + sourceTree = ""; + }; + D03E3DF02304B2700049C28B /* Frameworks */ = { + isa = PBXGroup; + children = ( + D03E3DFD2304B2890049C28B /* ItemListUI.framework */, + D03E3DFB2304B2850049C28B /* TelegramPresentationData.framework */, + D03E3DF92304B2800049C28B /* SwiftSignalKit.framework */, + D03E3DF72304B27A0049C28B /* AsyncDisplayKit.framework */, + D03E3DF52304B2770049C28B /* Display.framework */, + D03E3DF32304B2740049C28B /* UIKit.framework */, + D03E3DF12304B2700049C28B /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D03E3DDA2304B2030049C28B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3DE42304B2030049C28B /* ItemListPeerActionItem.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D03E3DDE2304B2030049C28B /* ItemListPeerActionItem */ = { + isa = PBXNativeTarget; + buildConfigurationList = D03E3DE72304B2030049C28B /* Build configuration list for PBXNativeTarget "ItemListPeerActionItem" */; + buildPhases = ( + D03E3DDA2304B2030049C28B /* Headers */, + D03E3DDB2304B2030049C28B /* Sources */, + D03E3DDC2304B2030049C28B /* Frameworks */, + D03E3DDD2304B2030049C28B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ItemListPeerActionItem; + productName = ItemListPeerActionItem; + productReference = D03E3DDF2304B2030049C28B /* ItemListPeerActionItem.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D03E3DD62304B2030049C28B /* Project object */ = { + isa = PBXProject; + attributes = { + DefaultBuildSystemTypeForWorkspace = Latest; + LastUpgradeCheck = 1030; + ORGANIZATIONNAME = "Telegram Messenger LLP"; + TargetAttributes = { + D03E3DDE2304B2030049C28B = { + CreatedOnToolsVersion = 10.3; + LastSwiftMigration = 1030; + }; + }; + }; + buildConfigurationList = D03E3DD92304B2030049C28B /* Build configuration list for PBXProject "ItemListPeerActionItem_Xcode" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D03E3DD52304B2030049C28B; + productRefGroup = D03E3DE02304B2030049C28B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D03E3DDE2304B2030049C28B /* ItemListPeerActionItem */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D03E3DDD2304B2030049C28B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D03E3DDB2304B2030049C28B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3DEF2304B25E0049C28B /* ItemListPeerActionItem.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D03E3DE52304B2030049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugAppStoreLLC; + }; + D03E3DE62304B2030049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseAppStoreLLC; + }; + D03E3DE82304B2030049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListPeerActionItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugAppStoreLLC; + }; + D03E3DE92304B2030049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListPeerActionItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseAppStoreLLC; + }; + D03E3DEA2304B22D0049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugHockeyapp; + }; + D03E3DEB2304B22D0049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListPeerActionItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugHockeyapp; + }; + D03E3DEC2304B2350049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseHockeyappInternal; + }; + D03E3DED2304B2350049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.ItemListPeerActionItem; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseHockeyappInternal; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D03E3DD92304B2030049C28B /* Build configuration list for PBXProject "ItemListPeerActionItem_Xcode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3DE52304B2030049C28B /* DebugAppStoreLLC */, + D03E3DEA2304B22D0049C28B /* DebugHockeyapp */, + D03E3DE62304B2030049C28B /* ReleaseAppStoreLLC */, + D03E3DEC2304B2350049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; + D03E3DE72304B2030049C28B /* Build configuration list for PBXNativeTarget "ItemListPeerActionItem" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3DE82304B2030049C28B /* DebugAppStoreLLC */, + D03E3DEB2304B22D0049C28B /* DebugHockeyapp */, + D03E3DE92304B2030049C28B /* ReleaseAppStoreLLC */, + D03E3DED2304B2350049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; +/* End XCConfigurationList section */ + }; + rootObject = D03E3DD62304B2030049C28B /* Project object */; +} diff --git a/submodules/ItemListPeerActionItem/Sources/ItemListPeerActionItem.h b/submodules/ItemListPeerActionItem/Sources/ItemListPeerActionItem.h new file mode 100644 index 0000000000..7cc56b137b --- /dev/null +++ b/submodules/ItemListPeerActionItem/Sources/ItemListPeerActionItem.h @@ -0,0 +1,19 @@ +// +// ItemListPeerActionItem.h +// ItemListPeerActionItem +// +// Created by Peter on 8/15/19. +// Copyright © 2019 Telegram Messenger LLP. All rights reserved. +// + +#import + +//! Project version number for ItemListPeerActionItem. +FOUNDATION_EXPORT double ItemListPeerActionItemVersionNumber; + +//! Project version string for ItemListPeerActionItem. +FOUNDATION_EXPORT const unsigned char ItemListPeerActionItemVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/submodules/TelegramUI/TelegramUI/ItemListPeerActionItem.swift b/submodules/ItemListPeerActionItem/Sources/ItemListPeerActionItem.swift similarity index 91% rename from submodules/TelegramUI/TelegramUI/ItemListPeerActionItem.swift rename to submodules/ItemListPeerActionItem/Sources/ItemListPeerActionItem.swift index eac6c36800..4d763c81a9 100644 --- a/submodules/TelegramUI/TelegramUI/ItemListPeerActionItem.swift +++ b/submodules/ItemListPeerActionItem/Sources/ItemListPeerActionItem.swift @@ -6,22 +6,22 @@ import SwiftSignalKit import TelegramPresentationData import ItemListUI -enum ItemListPeerActionItemHeight { +public enum ItemListPeerActionItemHeight { case generic case peerList } -class ItemListPeerActionItem: ListViewItem, ItemListItem { +public class ItemListPeerActionItem: ListViewItem, ItemListItem { let theme: PresentationTheme let icon: UIImage? let title: String - let alwaysPlain: Bool + public let alwaysPlain: Bool let editing: Bool let height: ItemListPeerActionItemHeight - let sectionId: ItemListSectionId + public let sectionId: ItemListSectionId let action: () -> Void - init(theme: PresentationTheme, icon: UIImage?, title: String, alwaysPlain: Bool = false, sectionId: ItemListSectionId, height: ItemListPeerActionItemHeight = .peerList, editing: Bool, action: @escaping () -> Void) { + public init(theme: PresentationTheme, icon: UIImage?, title: String, alwaysPlain: Bool = false, sectionId: ItemListSectionId, height: ItemListPeerActionItemHeight = .peerList, editing: Bool, action: @escaping () -> Void) { self.theme = theme self.icon = icon self.title = title @@ -32,7 +32,7 @@ class ItemListPeerActionItem: ListViewItem, ItemListItem { self.action = action } - func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal?, (ListViewItemApply) -> Void)) -> Void) { + public func nodeConfiguredForParams(async: @escaping (@escaping () -> Void) -> Void, params: ListViewItemLayoutParams, synchronousLoads: Bool, previousItem: ListViewItem?, nextItem: ListViewItem?, completion: @escaping (ListViewItemNode, @escaping () -> (Signal?, (ListViewItemApply) -> Void)) -> Void) { async { let node = ItemListPeerActionItemNode() var neighbors = itemListNeighbors(item: self, topItem: previousItem as? ItemListItem, bottomItem: nextItem as? ItemListItem) @@ -52,7 +52,7 @@ class ItemListPeerActionItem: ListViewItem, ItemListItem { } } - func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) { + public func updateNode(async: @escaping (@escaping () -> Void) -> Void, node: @escaping () -> ListViewItemNode, params: ListViewItemLayoutParams, previousItem: ListViewItem?, nextItem: ListViewItem?, animation: ListViewItemUpdateAnimation, completion: @escaping (ListViewItemNodeLayout, @escaping (ListViewItemApply) -> Void) -> Void) { Queue.mainQueue().async { if let nodeValue = node() as? ItemListPeerActionItemNode { let makeLayout = nodeValue.asyncLayout() @@ -78,9 +78,9 @@ class ItemListPeerActionItem: ListViewItem, ItemListItem { } } - var selectable: Bool = true + public var selectable: Bool = true - func selected(listView: ListView){ + public func selected(listView: ListView){ listView.clearHighlightAnimated(true) self.action() } diff --git a/submodules/StickerPackPreviewUI/Info.plist b/submodules/StickerPackPreviewUI/Info.plist new file mode 100644 index 0000000000..e1fe4cfb7b --- /dev/null +++ b/submodules/StickerPackPreviewUI/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/submodules/TelegramUI/TelegramUI/StickerPackPreviewController.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewController.swift similarity index 90% rename from submodules/TelegramUI/TelegramUI/StickerPackPreviewController.swift rename to submodules/StickerPackPreviewUI/Sources/StickerPackPreviewController.swift index cbeb03f226..18a1d34318 100644 --- a/submodules/TelegramUI/TelegramUI/StickerPackPreviewController.swift +++ b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewController.swift @@ -11,12 +11,12 @@ import ShareController import StickerResources import AlertUI -enum StickerPackPreviewControllerMode { +public enum StickerPackPreviewControllerMode { case `default` case settings } -final class StickerPackPreviewController: ViewController { +public final class StickerPackPreviewController: ViewController { private var controllerNode: StickerPackPreviewControllerNode { return self.displayNode as! StickerPackPreviewControllerNode } @@ -42,7 +42,7 @@ final class StickerPackPreviewController: ViewController { private var presentationDataDisposable: Disposable? - var sendSticker: ((FileMediaReference, ASDisplayNode, CGRect) -> Bool)? { + public var sendSticker: ((FileMediaReference, ASDisplayNode, CGRect) -> Bool)? { didSet { if self.isNodeLoaded { if let sendSticker = self.sendSticker { @@ -61,7 +61,7 @@ final class StickerPackPreviewController: ViewController { } } - init(context: AccountContext, stickerPack: StickerPackReference, mode: StickerPackPreviewControllerMode = .default, parentNavigationController: NavigationController?) { + public init(context: AccountContext, stickerPack: StickerPackReference, mode: StickerPackPreviewControllerMode = .default, parentNavigationController: NavigationController?) { self.context = context self.mode = mode self.parentNavigationController = parentNavigationController @@ -82,7 +82,7 @@ final class StickerPackPreviewController: ViewController { }) } - required init(coder aDecoder: NSCoder) { + required public init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -93,7 +93,7 @@ final class StickerPackPreviewController: ViewController { self.presentationDataDisposable?.dispose() } - override func loadDisplayNode() { + override public func loadDisplayNode() { var openShareImpl: (() -> Void)? if self.mode == .settings { openShareImpl = { [weak self] in @@ -126,9 +126,9 @@ final class StickerPackPreviewController: ViewController { guard let strongSelf = self else { return } - if let peer = peer { + if let peer = peer, let parentNavigationController = strongSelf.parentNavigationController { strongSelf.dismiss() - strongSelf.parentNavigationController?.pushViewController(ChatControllerImpl(context: strongSelf.context, chatLocation: .peer(peer.id))) + strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: parentNavigationController, context: strongSelf.context, chatLocation: .peer(peer.id), animated: true)) } })) }) @@ -217,7 +217,7 @@ final class StickerPackPreviewController: ViewController { self.ready.set(self.controllerNode.ready.get()) } - override func viewDidAppear(_ animated: Bool) { + override public func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) if !self.animatedIn { @@ -226,7 +226,7 @@ final class StickerPackPreviewController: ViewController { } } - override func dismiss(completion: (() -> Void)? = nil) { + override public func dismiss(completion: (() -> Void)? = nil) { if !self.dismissed { self.dismissed = true } else { @@ -235,7 +235,7 @@ final class StickerPackPreviewController: ViewController { self.controllerNode.animateOut(completion: completion) } - override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { + override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { super.containerLayoutUpdated(layout, transition: transition) self.controllerNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationHeight, transition: transition) diff --git a/submodules/TelegramUI/TelegramUI/StickerPackPreviewControllerNode.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewControllerNode.swift similarity index 100% rename from submodules/TelegramUI/TelegramUI/StickerPackPreviewControllerNode.swift rename to submodules/StickerPackPreviewUI/Sources/StickerPackPreviewControllerNode.swift diff --git a/submodules/TelegramUI/TelegramUI/StickerPackPreviewGridItem.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewGridItem.swift similarity index 99% rename from submodules/TelegramUI/TelegramUI/StickerPackPreviewGridItem.swift rename to submodules/StickerPackPreviewUI/Sources/StickerPackPreviewGridItem.swift index b36ba0efa4..d8f5105cf4 100644 --- a/submodules/TelegramUI/TelegramUI/StickerPackPreviewGridItem.swift +++ b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewGridItem.swift @@ -7,6 +7,7 @@ import AsyncDisplayKit import Postbox import StickerResources import AccountContext +import AnimationUI final class StickerPackPreviewInteraction { var previewedItem: StickerPreviewPeekItem? diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewUI.h b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewUI.h new file mode 100644 index 0000000000..f1eca381ba --- /dev/null +++ b/submodules/StickerPackPreviewUI/Sources/StickerPackPreviewUI.h @@ -0,0 +1,19 @@ +// +// StickerPackPreviewUI.h +// StickerPackPreviewUI +// +// Created by Peter on 8/15/19. +// Copyright © 2019 Telegram Messenger LLP. All rights reserved. +// + +#import + +//! Project version number for StickerPackPreviewUI. +FOUNDATION_EXPORT double StickerPackPreviewUIVersionNumber; + +//! Project version string for StickerPackPreviewUI. +FOUNDATION_EXPORT const unsigned char StickerPackPreviewUIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/submodules/TelegramUI/TelegramUI/StickerPreviewController.swift b/submodules/StickerPackPreviewUI/Sources/StickerPreviewController.swift similarity index 75% rename from submodules/TelegramUI/TelegramUI/StickerPreviewController.swift rename to submodules/StickerPackPreviewUI/Sources/StickerPreviewController.swift index 11521ec2a4..0f7109cd64 100644 --- a/submodules/TelegramUI/TelegramUI/StickerPreviewController.swift +++ b/submodules/StickerPackPreviewUI/Sources/StickerPreviewController.swift @@ -7,15 +7,15 @@ import TelegramCore import SwiftSignalKit import AccountContext -final class StickerPreviewControllerPresentationArguments { +public final class StickerPreviewControllerPresentationArguments { let transitionNode: (StickerPackItem) -> ASDisplayNode? - init(transitionNode: @escaping (StickerPackItem) -> ASDisplayNode?) { + public init(transitionNode: @escaping (StickerPackItem) -> ASDisplayNode?) { self.transitionNode = transitionNode } } -final class StickerPreviewController: ViewController { +public final class StickerPreviewController: ViewController { private var controllerNode: StickerPreviewControllerNode { return self.displayNode as! StickerPreviewControllerNode } @@ -25,7 +25,7 @@ final class StickerPreviewController: ViewController { private let context: AccountContext private var item: StickerPackItem - init(context: AccountContext, item: StickerPackItem) { + public init(context: AccountContext, item: StickerPackItem) { self.context = context self.item = item @@ -34,11 +34,11 @@ final class StickerPreviewController: ViewController { self.statusBar.statusBarStyle = .Ignore } - required init(coder aDecoder: NSCoder) { + required public init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } - override func loadDisplayNode() { + override public func loadDisplayNode() { self.displayNode = StickerPreviewControllerNode(context: self.context) self.controllerNode.dismiss = { [weak self] in self?.presentingViewController?.dismiss(animated: false, completion: nil) @@ -52,7 +52,7 @@ final class StickerPreviewController: ViewController { self.ready.set(.single(true)) } - override func viewDidAppear(_ animated: Bool) { + override public func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) if !self.animatedIn { @@ -61,17 +61,17 @@ final class StickerPreviewController: ViewController { } } - override func dismiss(completion: (() -> Void)? = nil) { + override public func dismiss(completion: (() -> Void)? = nil) { self.controllerNode.animateOut(targetNode: (self.presentationArguments as? StickerPreviewControllerPresentationArguments)?.transitionNode(self.item), completion: completion) } - override func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { + override public func containerLayoutUpdated(_ layout: ContainerViewLayout, transition: ContainedViewLayoutTransition) { super.containerLayoutUpdated(layout, transition: transition) self.controllerNode.containerLayoutUpdated(layout, navigationBarHeight: self.navigationHeight, transition: transition) } - func updateItem(_ item: StickerPackItem) { + public func updateItem(_ item: StickerPackItem) { self.item = item self.controllerNode.updateItem(item) } diff --git a/submodules/TelegramUI/TelegramUI/StickerPreviewControllerNode.swift b/submodules/StickerPackPreviewUI/Sources/StickerPreviewControllerNode.swift similarity index 100% rename from submodules/TelegramUI/TelegramUI/StickerPreviewControllerNode.swift rename to submodules/StickerPackPreviewUI/Sources/StickerPreviewControllerNode.swift diff --git a/submodules/TelegramUI/TelegramUI/StickerPreviewPeekContent.swift b/submodules/StickerPackPreviewUI/Sources/StickerPreviewPeekContent.swift similarity index 83% rename from submodules/TelegramUI/TelegramUI/StickerPreviewPeekContent.swift rename to submodules/StickerPackPreviewUI/Sources/StickerPreviewPeekContent.swift index 98b0827b4c..d7ee4cdc8c 100644 --- a/submodules/TelegramUI/TelegramUI/StickerPreviewPeekContent.swift +++ b/submodules/StickerPackPreviewUI/Sources/StickerPreviewPeekContent.swift @@ -6,53 +6,54 @@ import Postbox import TelegramCore import SwiftSignalKit import StickerResources +import AnimationUI -enum StickerPreviewPeekItem: Equatable { +public enum StickerPreviewPeekItem: Equatable { case pack(StickerPackItem) case found(FoundStickerItem) - var file: TelegramMediaFile { + public var file: TelegramMediaFile { switch self { - case let .pack(item): - return item.file - case let .found(item): - return item.file + case let .pack(item): + return item.file + case let .found(item): + return item.file } } } -final class StickerPreviewPeekContent: PeekControllerContent { +public final class StickerPreviewPeekContent: PeekControllerContent { let account: Account - let item: StickerPreviewPeekItem + public let item: StickerPreviewPeekItem let menu: [PeekControllerMenuItem] - init(account: Account, item: StickerPreviewPeekItem, menu: [PeekControllerMenuItem]) { + public init(account: Account, item: StickerPreviewPeekItem, menu: [PeekControllerMenuItem]) { self.account = account self.item = item self.menu = menu } - func presentation() -> PeekControllerContentPresentation { + public func presentation() -> PeekControllerContentPresentation { return .freeform } - func menuActivation() -> PeerkControllerMenuActivation { + public func menuActivation() -> PeerkControllerMenuActivation { return .press } - func menuItems() -> [PeekControllerMenuItem] { + public func menuItems() -> [PeekControllerMenuItem] { return self.menu } - func node() -> PeekControllerContentNode & ASDisplayNode { + public func node() -> PeekControllerContentNode & ASDisplayNode { return StickerPreviewPeekContentNode(account: self.account, item: self.item) } - func topAccessoryNode() -> ASDisplayNode? { + public func topAccessoryNode() -> ASDisplayNode? { return nil } - func isEqual(to: PeekControllerContent) -> Bool { + public func isEqual(to: PeekControllerContent) -> Bool { if let to = to as? StickerPreviewPeekContent { return self.item == to.item } else { diff --git a/submodules/StickerPackPreviewUI/StickerPackPreviewUI_Xcode.xcodeproj/project.pbxproj b/submodules/StickerPackPreviewUI/StickerPackPreviewUI_Xcode.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..9b6370c6be --- /dev/null +++ b/submodules/StickerPackPreviewUI/StickerPackPreviewUI_Xcode.xcodeproj/project.pbxproj @@ -0,0 +1,627 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + D03E3E102304B3440049C28B /* StickerPackPreviewUI.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E3E0E2304B3440049C28B /* StickerPackPreviewUI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D03E3E202304B39A0049C28B /* StickerPreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E1A2304B3990049C28B /* StickerPreviewController.swift */; }; + D03E3E212304B39A0049C28B /* StickerPackPreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E1B2304B3990049C28B /* StickerPackPreviewController.swift */; }; + D03E3E222304B39A0049C28B /* StickerPreviewPeekContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E1C2304B3990049C28B /* StickerPreviewPeekContent.swift */; }; + D03E3E232304B39A0049C28B /* StickerPackPreviewControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E1D2304B3990049C28B /* StickerPackPreviewControllerNode.swift */; }; + D03E3E242304B39A0049C28B /* StickerPreviewControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E1E2304B3990049C28B /* StickerPreviewControllerNode.swift */; }; + D03E3E252304B39A0049C28B /* StickerPackPreviewGridItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E1F2304B3990049C28B /* StickerPackPreviewGridItem.swift */; }; + D03E3E282304B3FE0049C28B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E272304B3FE0049C28B /* Foundation.framework */; }; + D03E3E2A2304B4020049C28B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E292304B4020049C28B /* UIKit.framework */; }; + D03E3E2C2304B4040049C28B /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E2B2304B4040049C28B /* Display.framework */; }; + D03E3E2E2304B4070049C28B /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E2D2304B4070049C28B /* AsyncDisplayKit.framework */; }; + D03E3E302304B40B0049C28B /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E2F2304B40B0049C28B /* Postbox.framework */; }; + D03E3E322304B4110049C28B /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E312304B4110049C28B /* TelegramCore.framework */; }; + D03E3E342304B4150049C28B /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E332304B4150049C28B /* SwiftSignalKit.framework */; }; + D03E3E362304B41A0049C28B /* TelegramUIPreferences.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E352304B41A0049C28B /* TelegramUIPreferences.framework */; }; + D03E3E382304B41E0049C28B /* AccountContext.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E372304B41E0049C28B /* AccountContext.framework */; }; + D03E3E3A2304B4240049C28B /* ShareController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E392304B4240049C28B /* ShareController.framework */; }; + D03E3E3C2304B4290049C28B /* StickerResources.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E3B2304B4290049C28B /* StickerResources.framework */; }; + D03E3E3E2304B42E0049C28B /* AlertUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E3D2304B42E0049C28B /* AlertUI.framework */; }; + D03E3E402304B4360049C28B /* TextFormat.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E3F2304B4360049C28B /* TextFormat.framework */; }; + D03E3E422304B43E0049C28B /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E412304B43E0049C28B /* TelegramPresentationData.framework */; }; + D03E3E442304B4410049C28B /* MergeLists.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E432304B4410049C28B /* MergeLists.framework */; }; + D03E3E462304B4450049C28B /* ActivityIndicator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E452304B4450049C28B /* ActivityIndicator.framework */; }; + D03E3E4C2304B4E20049C28B /* AnimationUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E4B2304B4E20049C28B /* AnimationUI.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D03E3E0B2304B3440049C28B /* StickerPackPreviewUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = StickerPackPreviewUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E0E2304B3440049C28B /* StickerPackPreviewUI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StickerPackPreviewUI.h; sourceTree = ""; }; + D03E3E0F2304B3440049C28B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D03E3E1A2304B3990049C28B /* StickerPreviewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPreviewController.swift; sourceTree = ""; }; + D03E3E1B2304B3990049C28B /* StickerPackPreviewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPackPreviewController.swift; sourceTree = ""; }; + D03E3E1C2304B3990049C28B /* StickerPreviewPeekContent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPreviewPeekContent.swift; sourceTree = ""; }; + D03E3E1D2304B3990049C28B /* StickerPackPreviewControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPackPreviewControllerNode.swift; sourceTree = ""; }; + D03E3E1E2304B3990049C28B /* StickerPreviewControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPreviewControllerNode.swift; sourceTree = ""; }; + D03E3E1F2304B3990049C28B /* StickerPackPreviewGridItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPackPreviewGridItem.swift; sourceTree = ""; }; + D03E3E272304B3FE0049C28B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D03E3E292304B4020049C28B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + D03E3E2B2304B4040049C28B /* Display.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Display.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E2D2304B4070049C28B /* AsyncDisplayKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AsyncDisplayKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E2F2304B40B0049C28B /* Postbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Postbox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E312304B4110049C28B /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E332304B4150049C28B /* SwiftSignalKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = SwiftSignalKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E352304B41A0049C28B /* TelegramUIPreferences.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramUIPreferences.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E372304B41E0049C28B /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E392304B4240049C28B /* ShareController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ShareController.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E3B2304B4290049C28B /* StickerResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = StickerResources.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E3D2304B42E0049C28B /* AlertUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AlertUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E3F2304B4360049C28B /* TextFormat.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TextFormat.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E412304B43E0049C28B /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E432304B4410049C28B /* MergeLists.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MergeLists.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E452304B4450049C28B /* ActivityIndicator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ActivityIndicator.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E4B2304B4E20049C28B /* AnimationUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AnimationUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D03E3E082304B3440049C28B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3E4C2304B4E20049C28B /* AnimationUI.framework in Frameworks */, + D03E3E462304B4450049C28B /* ActivityIndicator.framework in Frameworks */, + D03E3E442304B4410049C28B /* MergeLists.framework in Frameworks */, + D03E3E422304B43E0049C28B /* TelegramPresentationData.framework in Frameworks */, + D03E3E402304B4360049C28B /* TextFormat.framework in Frameworks */, + D03E3E3E2304B42E0049C28B /* AlertUI.framework in Frameworks */, + D03E3E3C2304B4290049C28B /* StickerResources.framework in Frameworks */, + D03E3E3A2304B4240049C28B /* ShareController.framework in Frameworks */, + D03E3E382304B41E0049C28B /* AccountContext.framework in Frameworks */, + D03E3E362304B41A0049C28B /* TelegramUIPreferences.framework in Frameworks */, + D03E3E342304B4150049C28B /* SwiftSignalKit.framework in Frameworks */, + D03E3E322304B4110049C28B /* TelegramCore.framework in Frameworks */, + D03E3E302304B40B0049C28B /* Postbox.framework in Frameworks */, + D03E3E2E2304B4070049C28B /* AsyncDisplayKit.framework in Frameworks */, + D03E3E2C2304B4040049C28B /* Display.framework in Frameworks */, + D03E3E2A2304B4020049C28B /* UIKit.framework in Frameworks */, + D03E3E282304B3FE0049C28B /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D03E3E012304B3440049C28B = { + isa = PBXGroup; + children = ( + D03E3E0F2304B3440049C28B /* Info.plist */, + D03E3E0D2304B3440049C28B /* Sources */, + D03E3E0C2304B3440049C28B /* Products */, + D03E3E262304B3FE0049C28B /* Frameworks */, + ); + sourceTree = ""; + }; + D03E3E0C2304B3440049C28B /* Products */ = { + isa = PBXGroup; + children = ( + D03E3E0B2304B3440049C28B /* StickerPackPreviewUI.framework */, + ); + name = Products; + sourceTree = ""; + }; + D03E3E0D2304B3440049C28B /* Sources */ = { + isa = PBXGroup; + children = ( + D03E3E1B2304B3990049C28B /* StickerPackPreviewController.swift */, + D03E3E1D2304B3990049C28B /* StickerPackPreviewControllerNode.swift */, + D03E3E1F2304B3990049C28B /* StickerPackPreviewGridItem.swift */, + D03E3E1A2304B3990049C28B /* StickerPreviewController.swift */, + D03E3E1E2304B3990049C28B /* StickerPreviewControllerNode.swift */, + D03E3E1C2304B3990049C28B /* StickerPreviewPeekContent.swift */, + D03E3E0E2304B3440049C28B /* StickerPackPreviewUI.h */, + ); + path = Sources; + sourceTree = ""; + }; + D03E3E262304B3FE0049C28B /* Frameworks */ = { + isa = PBXGroup; + children = ( + D03E3E4B2304B4E20049C28B /* AnimationUI.framework */, + D03E3E452304B4450049C28B /* ActivityIndicator.framework */, + D03E3E432304B4410049C28B /* MergeLists.framework */, + D03E3E412304B43E0049C28B /* TelegramPresentationData.framework */, + D03E3E3F2304B4360049C28B /* TextFormat.framework */, + D03E3E3D2304B42E0049C28B /* AlertUI.framework */, + D03E3E3B2304B4290049C28B /* StickerResources.framework */, + D03E3E392304B4240049C28B /* ShareController.framework */, + D03E3E372304B41E0049C28B /* AccountContext.framework */, + D03E3E352304B41A0049C28B /* TelegramUIPreferences.framework */, + D03E3E332304B4150049C28B /* SwiftSignalKit.framework */, + D03E3E312304B4110049C28B /* TelegramCore.framework */, + D03E3E2F2304B40B0049C28B /* Postbox.framework */, + D03E3E2D2304B4070049C28B /* AsyncDisplayKit.framework */, + D03E3E2B2304B4040049C28B /* Display.framework */, + D03E3E292304B4020049C28B /* UIKit.framework */, + D03E3E272304B3FE0049C28B /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D03E3E062304B3440049C28B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3E102304B3440049C28B /* StickerPackPreviewUI.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D03E3E0A2304B3440049C28B /* StickerPackPreviewUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = D03E3E132304B3440049C28B /* Build configuration list for PBXNativeTarget "StickerPackPreviewUI" */; + buildPhases = ( + D03E3E062304B3440049C28B /* Headers */, + D03E3E072304B3440049C28B /* Sources */, + D03E3E082304B3440049C28B /* Frameworks */, + D03E3E092304B3440049C28B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StickerPackPreviewUI; + productName = StickerPackPreviewUI; + productReference = D03E3E0B2304B3440049C28B /* StickerPackPreviewUI.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D03E3E022304B3440049C28B /* Project object */ = { + isa = PBXProject; + attributes = { + DefaultBuildSystemTypeForWorkspace = Latest; + LastUpgradeCheck = 1030; + ORGANIZATIONNAME = "Telegram Messenger LLP"; + TargetAttributes = { + D03E3E0A2304B3440049C28B = { + CreatedOnToolsVersion = 10.3; + LastSwiftMigration = 1030; + }; + }; + }; + buildConfigurationList = D03E3E052304B3440049C28B /* Build configuration list for PBXProject "StickerPackPreviewUI_Xcode" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D03E3E012304B3440049C28B; + productRefGroup = D03E3E0C2304B3440049C28B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D03E3E0A2304B3440049C28B /* StickerPackPreviewUI */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D03E3E092304B3440049C28B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D03E3E072304B3440049C28B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3E202304B39A0049C28B /* StickerPreviewController.swift in Sources */, + D03E3E242304B39A0049C28B /* StickerPreviewControllerNode.swift in Sources */, + D03E3E252304B39A0049C28B /* StickerPackPreviewGridItem.swift in Sources */, + D03E3E232304B39A0049C28B /* StickerPackPreviewControllerNode.swift in Sources */, + D03E3E222304B39A0049C28B /* StickerPreviewPeekContent.swift in Sources */, + D03E3E212304B39A0049C28B /* StickerPackPreviewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D03E3E112304B3440049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugAppStoreLLC; + }; + D03E3E122304B3440049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseAppStoreLLC; + }; + D03E3E142304B3440049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.StickerPackPreviewUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugAppStoreLLC; + }; + D03E3E152304B3440049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.StickerPackPreviewUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseAppStoreLLC; + }; + D03E3E162304B3700049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugHockeyapp; + }; + D03E3E172304B3700049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.StickerPackPreviewUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugHockeyapp; + }; + D03E3E182304B37D0049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseHockeyappInternal; + }; + D03E3E192304B37D0049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.StickerPackPreviewUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseHockeyappInternal; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D03E3E052304B3440049C28B /* Build configuration list for PBXProject "StickerPackPreviewUI_Xcode" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3E112304B3440049C28B /* DebugAppStoreLLC */, + D03E3E162304B3700049C28B /* DebugHockeyapp */, + D03E3E122304B3440049C28B /* ReleaseAppStoreLLC */, + D03E3E182304B37D0049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; + D03E3E132304B3440049C28B /* Build configuration list for PBXNativeTarget "StickerPackPreviewUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3E142304B3440049C28B /* DebugAppStoreLLC */, + D03E3E172304B3700049C28B /* DebugHockeyapp */, + D03E3E152304B3440049C28B /* ReleaseAppStoreLLC */, + D03E3E192304B37D0049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; +/* End XCConfigurationList section */ + }; + rootObject = D03E3E022304B3440049C28B /* Project object */; +} diff --git a/submodules/TelegramUI/TelegramUI/ArchivedStickerPacksController.swift b/submodules/TelegramUI/TelegramUI/ArchivedStickerPacksController.swift index 4cb56f3f09..7fd8a0a2f3 100644 --- a/submodules/TelegramUI/TelegramUI/ArchivedStickerPacksController.swift +++ b/submodules/TelegramUI/TelegramUI/ArchivedStickerPacksController.swift @@ -9,6 +9,7 @@ import TelegramUIPreferences import ItemListUI import OverlayStatusController import AccountContext +import StickerPackPreviewUI public enum ArchivedStickerPacksControllerMode { case stickers diff --git a/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift b/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift index 5552cd9881..87cf3fe738 100644 --- a/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift +++ b/submodules/TelegramUI/TelegramUI/BlockedPeersController.swift @@ -9,6 +9,7 @@ import TelegramUIPreferences import ItemListUI import AccountContext import ItemListPeerItem +import ItemListPeerActionItem private final class BlockedPeersControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ChannelAdminController.swift b/submodules/TelegramUI/TelegramUI/ChannelAdminController.swift index 438a835f44..aa1f14d837 100644 --- a/submodules/TelegramUI/TelegramUI/ChannelAdminController.swift +++ b/submodules/TelegramUI/TelegramUI/ChannelAdminController.swift @@ -8,6 +8,7 @@ import TelegramPresentationData import ItemListUI import AccountContext import AlertUI +import ItemListAvatarAndNameInfoItem private let rankMaxLength: Int32 = 16 diff --git a/submodules/TelegramUI/TelegramUI/ChannelAdminsController.swift b/submodules/TelegramUI/TelegramUI/ChannelAdminsController.swift index dc234bdc4d..5cbe125deb 100644 --- a/submodules/TelegramUI/TelegramUI/ChannelAdminsController.swift +++ b/submodules/TelegramUI/TelegramUI/ChannelAdminsController.swift @@ -12,6 +12,7 @@ import TemporaryCachedPeerDataManager import AlertUI import UndoUI import ItemListPeerItem +import ItemListPeerActionItem private final class ChannelAdminsControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ChannelBannedMemberController.swift b/submodules/TelegramUI/TelegramUI/ChannelBannedMemberController.swift index 07d760f42c..56d02aaf79 100644 --- a/submodules/TelegramUI/TelegramUI/ChannelBannedMemberController.swift +++ b/submodules/TelegramUI/TelegramUI/ChannelBannedMemberController.swift @@ -10,6 +10,7 @@ import TelegramStringFormatting import OverlayStatusController import AccountContext import AlertUI +import ItemListAvatarAndNameInfoItem private final class ChannelBannedMemberControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ChannelDiscussionGroupSetupController.swift b/submodules/TelegramUI/TelegramUI/ChannelDiscussionGroupSetupController.swift index 741107be1e..cec9b12b20 100644 --- a/submodules/TelegramUI/TelegramUI/ChannelDiscussionGroupSetupController.swift +++ b/submodules/TelegramUI/TelegramUI/ChannelDiscussionGroupSetupController.swift @@ -11,6 +11,7 @@ import OverlayStatusController import AccountContext import AlertUI import ItemListPeerItem +import ItemListPeerActionItem private final class ChannelDiscussionGroupSetupControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ChannelInfoController.swift b/submodules/TelegramUI/TelegramUI/ChannelInfoController.swift index 7f14099b91..1e0d553f1b 100644 --- a/submodules/TelegramUI/TelegramUI/ChannelInfoController.swift +++ b/submodules/TelegramUI/TelegramUI/ChannelInfoController.swift @@ -17,6 +17,7 @@ import AlertUI import GalleryUI import LegacyUI import ChatListUI +import ItemListAvatarAndNameInfoItem private final class ChannelInfoControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift b/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift index 659b16319e..bbc31cf414 100644 --- a/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift +++ b/submodules/TelegramUI/TelegramUI/ChannelPermissionsController.swift @@ -13,6 +13,7 @@ import TemporaryCachedPeerDataManager import AlertUI import ItemListPeerItem import TelegramPermissionsUI +import ItemListPeerActionItem private final class ChannelPermissionsControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ChatController.swift b/submodules/TelegramUI/TelegramUI/ChatController.swift index f4b50b4c8f..0ee8253e43 100644 --- a/submodules/TelegramUI/TelegramUI/ChatController.swift +++ b/submodules/TelegramUI/TelegramUI/ChatController.swift @@ -35,6 +35,7 @@ import InstantPageUI import LocationUI import BotPaymentsUI import DeleteChatPeerActionSheetItem +import HashtagSearchUI public enum ChatControllerPeekActions { case standard @@ -120,7 +121,7 @@ let ChatControllerCount = Atomic(value: 0) public final class ChatControllerImpl: TelegramBaseController, ChatController, GalleryHiddenMediaTarget, UIDropInteractionDelegate { private var validLayout: ContainerViewLayout? - weak var parentController: ViewController? + public weak var parentController: ViewController? public var peekActions: ChatControllerPeekActions = .standard private var didSetup3dTouch: Bool = false diff --git a/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift b/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift index 7e7062793f..6609bc5d86 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMediaInputNode.swift @@ -8,6 +8,7 @@ import SwiftSignalKit import TelegramPresentationData import MergeLists import AccountContext +import StickerPackPreviewUI private struct PeerSpecificPackData { let peer: Peer diff --git a/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerGridItem.swift b/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerGridItem.swift index 75b78065e9..d1b0ab25f5 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerGridItem.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerGridItem.swift @@ -8,6 +8,7 @@ import Postbox import TelegramPresentationData import StickerResources import AccountContext +import AnimationUI enum ChatMediaInputStickerGridSectionAccessory { case none diff --git a/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerPackItem.swift b/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerPackItem.swift index e95b29b651..841ba69cf5 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerPackItem.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMediaInputStickerPackItem.swift @@ -7,6 +7,7 @@ import SwiftSignalKit import Postbox import TelegramPresentationData import StickerResources +import AnimationUI final class ChatMediaInputStickerPackItem: ListViewItem { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ChatMediaInputTrendingPane.swift b/submodules/TelegramUI/TelegramUI/ChatMediaInputTrendingPane.swift index fe878f5dc6..9b2568f367 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMediaInputTrendingPane.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMediaInputTrendingPane.swift @@ -9,6 +9,7 @@ import TelegramPresentationData import MergeLists import OverlayStatusController import AccountContext +import StickerPackPreviewUI final class TrendingPaneInteraction { let installPack: (ItemCollectionInfo) -> Void diff --git a/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift b/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift index 6381993a97..142d556664 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessageAnimatedStickerItemNode.swift @@ -13,6 +13,7 @@ import AccountContext import MediaResources import StickerResources import ContextUI +import AnimationUI private let nameFont = Font.medium(14.0) private let inlineBotPrefixFont = Font.regular(14.0) diff --git a/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift b/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift index 9129113bcf..92a08fded4 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift @@ -16,6 +16,7 @@ import PhotoResources import TelegramUniversalVideoContent import TelegramStringFormatting import GalleryUI +import AnimationUI private struct FetchControls { let fetch: (Bool) -> Void diff --git a/submodules/TelegramUI/TelegramUI/ChatMultipleAvatarsNavigationNode.swift b/submodules/TelegramUI/TelegramUI/ChatMultipleAvatarsNavigationNode.swift deleted file mode 100644 index cdaff6cf5f..0000000000 --- a/submodules/TelegramUI/TelegramUI/ChatMultipleAvatarsNavigationNode.swift +++ /dev/null @@ -1,60 +0,0 @@ -import Foundation -import UIKit -import AsyncDisplayKit -import Display -import TelegramCore -import Postbox -import TelegramPresentationData - -final class ChatMultipleAvatarsNavigationNode: ASDisplayNode { - private let multipleAvatarsNode: MultipleAvatarsNode - - private weak var account: Account? - private var theme: PresentationTheme? - private var peers: [Peer] = [] - - override init() { - self.multipleAvatarsNode = MultipleAvatarsNode() - - super.init() - - self.addSubnode(self.multipleAvatarsNode) - } - - override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize { - if constrainedSize.height.isLessThanOrEqualTo(32.0) { - return CGSize(width: 26.0, height: 26.0) - } else { - return CGSize(width: 37.0, height: 37.0) - } - } - - override func layout() { - super.layout() - - let bounds = self.bounds - if let account = self.account, let theme = self.theme, !bounds.width.isZero { - let avatarsLayout = MultipleAvatarsNode.asyncLayout(self.multipleAvatarsNode) - let apply = avatarsLayout(account, theme, self.peers, bounds.size) - let _ = apply(false) - } - if self.bounds.size.height.isLessThanOrEqualTo(26.0) { - self.multipleAvatarsNode.frame = bounds.offsetBy(dx: 8.0, dy: 0.0) - } else { - self.multipleAvatarsNode.frame = bounds.offsetBy(dx: 10.0, dy: 1.0) - } - } - - func setPeers(account: Account, theme: PresentationTheme, peers: [Peer], animated: Bool) { - self.account = account - self.peers = peers - - let bounds = self.bounds - if !bounds.width.isZero { - let avatarsLayout = MultipleAvatarsNode.asyncLayout(self.multipleAvatarsNode) - let apply = avatarsLayout(account, theme, peers, bounds.size) - let _ = apply(animated) - } - } -} - diff --git a/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift b/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift index 28dcdf6c74..ecf33966e7 100644 --- a/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatRecentActionsControllerNode.swift @@ -13,6 +13,8 @@ import TemporaryCachedPeerDataManager import AlertUI import OpenInExternalAppUI import InstantPageUI +import HashtagSearchUI +import StickerPackPreviewUI private final class ChatRecentActionsListOpaqueState { let entries: [ChatRecentActionsEntry] diff --git a/submodules/TelegramUI/TelegramUI/CreateChannelController.swift b/submodules/TelegramUI/TelegramUI/CreateChannelController.swift index 5b50078d8b..6137e54c5e 100644 --- a/submodules/TelegramUI/TelegramUI/CreateChannelController.swift +++ b/submodules/TelegramUI/TelegramUI/CreateChannelController.swift @@ -10,6 +10,7 @@ import ItemListUI import AccountContext import AlertUI import LegacyUI +import ItemListAvatarAndNameInfoItem private struct CreateChannelArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/CreateGroupController.swift b/submodules/TelegramUI/TelegramUI/CreateGroupController.swift index 7d0bb3f77e..039267df06 100644 --- a/submodules/TelegramUI/TelegramUI/CreateGroupController.swift +++ b/submodules/TelegramUI/TelegramUI/CreateGroupController.swift @@ -15,6 +15,7 @@ import PhotoResources import LegacyUI import LocationUI import ItemListPeerItem +import ItemListAvatarAndNameInfoItem public enum CreateGroupMode { case generic diff --git a/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift b/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift index ecb652b84e..9751eac50c 100644 --- a/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift +++ b/submodules/TelegramUI/TelegramUI/DeviceContactInfoController.swift @@ -12,6 +12,7 @@ import AccountContext import AlertUI import PhotoResources import MediaResources +import ItemListAvatarAndNameInfoItem private enum DeviceContactInfoAction { case sendMessage diff --git a/submodules/TelegramUI/TelegramUI/EditSettingsController.swift b/submodules/TelegramUI/TelegramUI/EditSettingsController.swift index 1c82330411..3ad3d275c5 100644 --- a/submodules/TelegramUI/TelegramUI/EditSettingsController.swift +++ b/submodules/TelegramUI/TelegramUI/EditSettingsController.swift @@ -11,6 +11,7 @@ import ItemListUI import AccountContext import GalleryUI import LegacyUI +import ItemListAvatarAndNameInfoItem private struct EditSettingsItemArguments { let context: AccountContext diff --git a/submodules/TelegramUI/TelegramUI/FeaturedStickerPacksController.swift b/submodules/TelegramUI/TelegramUI/FeaturedStickerPacksController.swift index 09d19e9971..d3f9261d7c 100644 --- a/submodules/TelegramUI/TelegramUI/FeaturedStickerPacksController.swift +++ b/submodules/TelegramUI/TelegramUI/FeaturedStickerPacksController.swift @@ -8,6 +8,7 @@ import TelegramPresentationData import TelegramUIPreferences import ItemListUI import AccountContext +import StickerPackPreviewUI private final class FeaturedStickerPacksControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/FetchCachedRepresentations.swift b/submodules/TelegramUI/TelegramUI/FetchCachedRepresentations.swift index 594b343e71..dcf3de2e9f 100644 --- a/submodules/TelegramUI/TelegramUI/FetchCachedRepresentations.swift +++ b/submodules/TelegramUI/TelegramUI/FetchCachedRepresentations.swift @@ -17,6 +17,7 @@ import TelegramUIPrivateModule import MediaResources import PhotoResources import ImageBlur +import AnimationUI public func fetchCachedResourceRepresentation(account: Account, resource: MediaResource, representation: CachedMediaResourceRepresentation) -> Signal { if let representation = representation as? CachedStickerAJpegRepresentation { diff --git a/submodules/TelegramUI/TelegramUI/GroupInfoController.swift b/submodules/TelegramUI/TelegramUI/GroupInfoController.swift index 77da42fb97..283267db4c 100644 --- a/submodules/TelegramUI/TelegramUI/GroupInfoController.swift +++ b/submodules/TelegramUI/TelegramUI/GroupInfoController.swift @@ -24,6 +24,8 @@ import LocationUI import ItemListPeerItem import ContactListUI import ChatListUI +import ItemListAvatarAndNameInfoItem +import ItemListPeerActionItem private final class GroupInfoArguments { let context: AccountContext diff --git a/submodules/TelegramUI/TelegramUI/GroupStickerPackSetupController.swift b/submodules/TelegramUI/TelegramUI/GroupStickerPackSetupController.swift index a516fd4ea3..5b91e6caba 100644 --- a/submodules/TelegramUI/TelegramUI/GroupStickerPackSetupController.swift +++ b/submodules/TelegramUI/TelegramUI/GroupStickerPackSetupController.swift @@ -8,6 +8,7 @@ import TelegramPresentationData import TelegramUIPreferences import ItemListUI import AccountContext +import StickerPackPreviewUI private final class GroupStickerPackSetupControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputContextPanelNode.swift b/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputContextPanelNode.swift index caa47666e3..60dfca9fb6 100644 --- a/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputContextPanelNode.swift @@ -8,6 +8,7 @@ import SwiftSignalKit import TelegramPresentationData import MergeLists import AccountContext +import StickerPackPreviewUI private struct ChatContextResultStableId: Hashable { let result: ChatContextResult diff --git a/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputPanelItem.swift b/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputPanelItem.swift index 18ca1cca26..923495c013 100644 --- a/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputPanelItem.swift +++ b/submodules/TelegramUI/TelegramUI/HorizontalListContextResultsChatInputPanelItem.swift @@ -9,6 +9,7 @@ import AVFoundation import RadialStatusNode import StickerResources import PhotoResources +import AnimationUI final class HorizontalListContextResultsChatInputPanelItem: ListViewItem { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift b/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift index bc29ecdd14..44d68c2eb5 100755 --- a/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift +++ b/submodules/TelegramUI/TelegramUI/HorizontalStickerGridItem.swift @@ -7,6 +7,7 @@ import AsyncDisplayKit import Postbox import StickerResources import AccountContext +import AnimationUI final class HorizontalStickerGridItem: GridItem { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/HorizontalStickersChatContextPanelNode.swift b/submodules/TelegramUI/TelegramUI/HorizontalStickersChatContextPanelNode.swift index eca241287f..b63b7ce1b7 100755 --- a/submodules/TelegramUI/TelegramUI/HorizontalStickersChatContextPanelNode.swift +++ b/submodules/TelegramUI/TelegramUI/HorizontalStickersChatContextPanelNode.swift @@ -8,6 +8,7 @@ import SwiftSignalKit import TelegramPresentationData import MergeLists import AccountContext +import StickerPackPreviewUI final class HorizontalStickersChatContextPanelInteraction { var previewedStickerItem: StickerPackItem? diff --git a/submodules/TelegramUI/TelegramUI/InstalledStickerPacksController.swift b/submodules/TelegramUI/TelegramUI/InstalledStickerPacksController.swift index 6944ff5efa..123e11d297 100644 --- a/submodules/TelegramUI/TelegramUI/InstalledStickerPacksController.swift +++ b/submodules/TelegramUI/TelegramUI/InstalledStickerPacksController.swift @@ -9,6 +9,7 @@ import TelegramUIPreferences import ItemListUI import TextFormat import AccountContext +import StickerPackPreviewUI private final class InstalledStickerPacksControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/ItemListStickerPackItem.swift b/submodules/TelegramUI/TelegramUI/ItemListStickerPackItem.swift index c0ebed6aba..ebcb752b22 100644 --- a/submodules/TelegramUI/TelegramUI/ItemListStickerPackItem.swift +++ b/submodules/TelegramUI/TelegramUI/ItemListStickerPackItem.swift @@ -8,6 +8,7 @@ import TelegramCore import TelegramPresentationData import ItemListUI import StickerResources +import AnimationUI struct ItemListStickerPackItemEditing: Equatable { let editable: Bool diff --git a/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift b/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift index 46d4e54d00..ba165be0e8 100644 --- a/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift +++ b/submodules/TelegramUI/TelegramUI/MediaInputPaneTrendingItem.swift @@ -8,6 +8,7 @@ import TelegramCore import TelegramPresentationData import StickerResources import AccountContext +import AnimationUI class MediaInputPaneTrendingItem: ListViewItem { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/MetalAnimationRenderer.swift b/submodules/TelegramUI/TelegramUI/MetalAnimationRenderer.swift deleted file mode 100644 index 6bb38a85f7..0000000000 --- a/submodules/TelegramUI/TelegramUI/MetalAnimationRenderer.swift +++ /dev/null @@ -1,178 +0,0 @@ -import Foundation -import UIKit -import AsyncDisplayKit -import SwiftSignalKit -import Metal - -#if false//!targetEnvironment(simulator) - -final class MetalAnimationRenderer: ASDisplayNode, AnimationRenderer { - private let device: MTLDevice - private let pipelineState: MTLRenderPipelineState - private let commandQueue: MTLCommandQueue - private let vertexBuffer: MTLBuffer - private let colorTexture: MTLTexture - private let alphaTexture: MTLTexture - private let samplerColor: MTLSamplerState - private let samplerAlpha: MTLSamplerState - - private var metalLayer: CAMetalLayer { - return self.layer as! CAMetalLayer - } - - override init() { - let device = MTLCreateSystemDefaultDevice()! - - self.device = device - - do { - let library = try device.makeLibrary(source: - """ -using namespace metal; - -struct VertexIn { - packed_float3 position; - packed_float2 texCoord; -}; - -struct VertexOut { - float4 position [[position]]; - float2 texCoord; -}; - -vertex VertexOut basic_vertex( - const device VertexIn* vertex_array [[ buffer(0) ]], - unsigned int vid [[ vertex_id ]] -) { - VertexIn VertexIn = vertex_array[vid]; - - VertexOut VertexOut; - VertexOut.position = float4(VertexIn.position, 1.0); - VertexOut.texCoord = VertexIn.texCoord; - - return VertexOut; -} - -fragment float4 basic_fragment( - VertexOut interpolated [[stage_in]], - texture2d texColor [[ texture(0) ]], - sampler samplerColor [[ sampler(0) ]]//, - //texture2d texA [[ texture(1) ]], - //sampler samplerA [[ sampler(1) ]] -) { - float4 color = texColor.sample(samplerColor, interpolated.texCoord); - float4 alpha = 1.0;//texA.sample(samplerA, interpolated.texCoord); - return float4(color.r * alpha.a, color.g * alpha.a, color.b * alpha.a, alpha.a); -} -""", options: nil) - - let fragmentProgram = library.makeFunction(name: "basic_fragment") - let vertexProgram = library.makeFunction(name: "basic_vertex") - - let pipelineStateDescriptor = MTLRenderPipelineDescriptor() - pipelineStateDescriptor.vertexFunction = vertexProgram - pipelineStateDescriptor.fragmentFunction = fragmentProgram - pipelineStateDescriptor.colorAttachments[0].pixelFormat = .bgra8Unorm - - self.pipelineState = try! device.makeRenderPipelineState(descriptor: pipelineStateDescriptor) - - self.commandQueue = device.makeCommandQueue()! - - let vertexData: [Float] = [ - -1.0, -1.0, 0.0, 0.0, 1.0, - -1.0, 1.0, 0.0, 0.0, 0.0, - 1.0, -1.0, 0.0, 1.0, 1.0, - 1.0, -1.0, 0.0, 1.0, 1.0, - -1.0, 1.0, 0.0, 0.0, 0.0, - 1.0, 1.0, 0.0, 1.0, 0.0 - ] - - let dataSize = vertexData.count * MemoryLayout.size(ofValue: vertexData[0]) - self.vertexBuffer = device.makeBuffer(bytes: vertexData, length: dataSize, options: [])! - - let colorTextureDesc: MTLTextureDescriptor = MTLTextureDescriptor.texture2DDescriptor(pixelFormat: .pvrtc_rgb_4bpp, width: 512, height: 512, mipmapped: false) - colorTextureDesc.sampleCount = 1 - if #available(iOS 9.0, *) { - colorTextureDesc.storageMode = .private - colorTextureDesc.usage = .shaderRead - } - colorTextureDesc.textureType = .type2D - - self.colorTexture = device.makeTexture(descriptor: colorTextureDesc)! - - let alphaTextureDesc: MTLTextureDescriptor = MTLTextureDescriptor.texture2DDescriptor(pixelFormat: .a8Unorm, width: 320, height: 320, mipmapped: false) - alphaTextureDesc.sampleCount = 1 - if #available(iOS 9.0, *) { - alphaTextureDesc.storageMode = .private - alphaTextureDesc.usage = .shaderRead - } - alphaTextureDesc.textureType = .type2D - - self.alphaTexture = device.makeTexture(descriptor: alphaTextureDesc)! - - let sampler = MTLSamplerDescriptor() - sampler.minFilter = MTLSamplerMinMagFilter.nearest - sampler.magFilter = MTLSamplerMinMagFilter.nearest - sampler.mipFilter = MTLSamplerMipFilter.nearest - sampler.maxAnisotropy = 1 - sampler.sAddressMode = MTLSamplerAddressMode.clampToEdge - sampler.tAddressMode = MTLSamplerAddressMode.clampToEdge - sampler.rAddressMode = MTLSamplerAddressMode.clampToEdge - sampler.normalizedCoordinates = true - sampler.lodMinClamp = 0.0 - sampler.lodMaxClamp = .greatestFiniteMagnitude - self.samplerColor = device.makeSamplerState(descriptor: sampler)! - self.samplerAlpha = device.makeSamplerState(descriptor: sampler)! - } catch let e { - print(e) - preconditionFailure() - } - - super.init() - - self.setLayerBlock { () -> CALayer in - return CAMetalLayer() - } - - self.metalLayer.device = self.device - self.metalLayer.pixelFormat = .bgra8Unorm - self.metalLayer.framebufferOnly = true - self.metalLayer.isOpaque = false - self.metalLayer.contentsScale = 2.0 - } - - func render(queue: Queue, width: Int, height: Int, bytes: UnsafeRawPointer, length: Int, completion: @escaping () -> Void) { - if self.metalLayer.bounds.width.isZero { - return - } - - let bgrgLength = width * 2 * height - //let alphaLength = width * height - - self.colorTexture.replace(region: MTLRegionMake2D(0, 0, width, height), mipmapLevel: 0, withBytes: bytes.assumingMemoryBound(to: UInt8.self), bytesPerRow: width / 2) - //self.alphaTexture.replace(region: MTLRegionMake2D(0, 0, width, height), mipmapLevel: 0, withBytes: bytes.assumingMemoryBound(to: UInt8.self).advanced(by: bgrgLength), bytesPerRow: width) - - let renderPassDescriptor = MTLRenderPassDescriptor() - let drawable = self.metalLayer.nextDrawable()! - renderPassDescriptor.colorAttachments[0].texture = drawable.texture - renderPassDescriptor.colorAttachments[0].loadAction = .clear - renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0) - - let commandBuffer = commandQueue.makeCommandBuffer()! - - let renderEncoder = commandBuffer.makeRenderCommandEncoder(descriptor: renderPassDescriptor)! - renderEncoder.setRenderPipelineState(self.pipelineState) - renderEncoder.setVertexBuffer(self.vertexBuffer, offset: 0, index: 0) - renderEncoder.setFragmentTexture(self.colorTexture, index: 0) - renderEncoder.setFragmentSamplerState(self.samplerColor, index: 0) - renderEncoder.setFragmentTexture(self.alphaTexture, index: 1) - renderEncoder.setFragmentSamplerState(self.samplerAlpha, index: 1) - renderEncoder.drawPrimitives(type: .triangle, vertexStart: 0, vertexCount: 6, instanceCount: 1) - renderEncoder.endEncoding() - - commandBuffer.present(drawable) - commandBuffer.commit() - } -} - -#endif diff --git a/submodules/TelegramUI/TelegramUI/MultipleAvatarsNode.swift b/submodules/TelegramUI/TelegramUI/MultipleAvatarsNode.swift deleted file mode 100644 index aa493aabaa..0000000000 --- a/submodules/TelegramUI/TelegramUI/MultipleAvatarsNode.swift +++ /dev/null @@ -1,95 +0,0 @@ -import Foundation -import UIKit -import Display -import AsyncDisplayKit -import Postbox -import TelegramCore -import TelegramPresentationData -import AvatarNode - -private let avatarFont = UIFont(name: ".SFCompactRounded-Semibold", size: 13.0)! - -final class MultipleAvatarsNode: ASDisplayNode { - private var nodes: [(Peer, AvatarNode)] = [] - - static func asyncLayout(_ current: MultipleAvatarsNode?) -> (Account, PresentationTheme, [Peer], CGSize) -> (Bool) -> MultipleAvatarsNode { - let currentNodes: [(Peer, AvatarNode)] = current?.nodes ?? [] - return { account, theme, peers, size in - var node: MultipleAvatarsNode - if let current = current { - node = current - } else { - node = MultipleAvatarsNode() - } - - var resultNodes: [(Peer, AvatarNode)] = [] - for peer in peers { - var found = false - inner: for (currentPeer, currentNode) in currentNodes { - if currentPeer.id == peer.id { - resultNodes.append((peer, currentNode)) - found = true - break inner - } - } - if !found { - resultNodes.append((peer, AvatarNode(font: avatarFont))) - } - if resultNodes.count == 4 { - break - } - } - - return { animated in - let partitionSize = floor(size.width / 2.0) - let singleSize = partitionSize - 1.0 - - var index = 0 - for (peer, avatarNode) in resultNodes { - let xPosition: CGFloat = index % 2 == 0 ? 0.0 : size.width - singleSize - let yPosition = index / 2 == 0 ? 0.0 : size.height - singleSize - let avatarFrame = CGRect(origin: CGPoint(x: xPosition, y: yPosition), size: CGSize(width: singleSize, height: singleSize)) - if avatarNode.supernode == nil { - node.addSubnode(avatarNode) - avatarNode.frame = avatarFrame - if animated { - avatarNode.layer.animateScale(from: 0.2, to: 1.0, duration: 0.2) - avatarNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) - } - } else { - let distance = CGPoint(x: avatarNode.frame.midX - avatarFrame.midX, y: avatarNode.frame.midY - avatarFrame.midY) - avatarNode.frame = avatarFrame - if animated { - avatarNode.layer.animatePosition(from: distance, to: CGPoint(), duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, additive: true) - } - } - avatarNode.setPeer(account: account, theme: theme, peer: peer) - index += 1 - } - index += 1 - for (_, currentNode) in node.nodes { - var found = false - inner: for (_, resultNode) in resultNodes { - if currentNode === resultNode { - found = true - break inner - } - } - if !found { - if animated { - currentNode.layer.animateScale(from: 1.0, to: 0.4, duration: 0.2, removeOnCompletion: false) - currentNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak currentNode] _ in - currentNode?.removeFromSupernode() - }) - } else { - currentNode.removeFromSupernode() - } - } - } - node.nodes = resultNodes - - return node - } - } - } -} diff --git a/submodules/TelegramUI/TelegramUI/NotificationContentContext.swift b/submodules/TelegramUI/TelegramUI/NotificationContentContext.swift index 35e9911d54..a491dea674 100644 --- a/submodules/TelegramUI/TelegramUI/NotificationContentContext.swift +++ b/submodules/TelegramUI/TelegramUI/NotificationContentContext.swift @@ -12,6 +12,7 @@ import AccountContext import Tuples import StickerResources import PhotoResources +import AnimationUI private enum NotificationContentAuthorizationError { case unauthorized diff --git a/submodules/TelegramUI/TelegramUI/NotificationExceptionControllerNode.swift b/submodules/TelegramUI/TelegramUI/NotificationExceptionControllerNode.swift index de32a97c3a..bc983464f7 100644 --- a/submodules/TelegramUI/TelegramUI/NotificationExceptionControllerNode.swift +++ b/submodules/TelegramUI/TelegramUI/NotificationExceptionControllerNode.swift @@ -16,6 +16,7 @@ import ItemListPeerItem import ContactsPeerItem import ChatListSearchItemHeader import ChatListUI +import ItemListPeerActionItem private final class NotificationExceptionState : Equatable { let mode:NotificationExceptionMode diff --git a/submodules/TelegramUI/TelegramUI/OpenChatMessage.swift b/submodules/TelegramUI/TelegramUI/OpenChatMessage.swift index c6647dc801..7d142e3a17 100644 --- a/submodules/TelegramUI/TelegramUI/OpenChatMessage.swift +++ b/submodules/TelegramUI/TelegramUI/OpenChatMessage.swift @@ -12,6 +12,7 @@ import AccountContext import GalleryUI import InstantPageUI import LocationUI +import StickerPackPreviewUI private enum ChatMessageGalleryControllerData { case url(String) diff --git a/submodules/TelegramUI/TelegramUI/OpenResolvedUrl.swift b/submodules/TelegramUI/TelegramUI/OpenResolvedUrl.swift index 25285e852c..d0b62f9c96 100644 --- a/submodules/TelegramUI/TelegramUI/OpenResolvedUrl.swift +++ b/submodules/TelegramUI/TelegramUI/OpenResolvedUrl.swift @@ -10,6 +10,7 @@ import OverlayStatusController import AlertUI import PassportUI import InstantPageUI +import StickerPackPreviewUI private func defaultNavigationForPeerId(_ peerId: PeerId?, navigation: ChatControllerInteractionNavigateToPeer) -> ChatControllerInteractionNavigateToPeer { if case .default = navigation { diff --git a/submodules/TelegramUI/TelegramUI/PeersNearbyController.swift b/submodules/TelegramUI/TelegramUI/PeersNearbyController.swift index cb519ac4f2..af1fd979d6 100644 --- a/submodules/TelegramUI/TelegramUI/PeersNearbyController.swift +++ b/submodules/TelegramUI/TelegramUI/PeersNearbyController.swift @@ -14,6 +14,7 @@ import AccountContext import AlertUI import ItemListPeerItem import TelegramPermissionsUI +import ItemListPeerActionItem private struct PeerNearbyEntry { let peer: (Peer, CachedPeerData?) diff --git a/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift b/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift index 4110931c60..a57298d29e 100644 --- a/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift +++ b/submodules/TelegramUI/TelegramUI/SelectivePrivacySettingsPeersController.swift @@ -9,6 +9,7 @@ import TelegramUIPreferences import ItemListUI import AccountContext import ItemListPeerItem +import ItemListPeerActionItem private final class SelectivePrivacyPeersControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI/SettingsController.swift b/submodules/TelegramUI/TelegramUI/SettingsController.swift index 1e9ffb4884..fa3a56963b 100644 --- a/submodules/TelegramUI/TelegramUI/SettingsController.swift +++ b/submodules/TelegramUI/TelegramUI/SettingsController.swift @@ -27,6 +27,8 @@ import SearchUI import ItemListPeerItem import CallListUI import ChatListUI +import ItemListAvatarAndNameInfoItem +import ItemListPeerActionItem private let maximumNumberOfAccounts = 3 diff --git a/submodules/TelegramUI/TelegramUI/StickerPaneSearchContentNode.swift b/submodules/TelegramUI/TelegramUI/StickerPaneSearchContentNode.swift index a93d6abf0a..0c4a462ccc 100644 --- a/submodules/TelegramUI/TelegramUI/StickerPaneSearchContentNode.swift +++ b/submodules/TelegramUI/TelegramUI/StickerPaneSearchContentNode.swift @@ -10,6 +10,7 @@ import LegacyComponents import TelegramUIPrivateModule import MergeLists import AccountContext +import StickerPackPreviewUI final class StickerPaneSearchInteraction { let open: (StickerPackCollectionInfo) -> Void diff --git a/submodules/TelegramUI/TelegramUI/StickerPaneSearchStickerItem.swift b/submodules/TelegramUI/TelegramUI/StickerPaneSearchStickerItem.swift index bf7412d1ed..e2aeaeed17 100644 --- a/submodules/TelegramUI/TelegramUI/StickerPaneSearchStickerItem.swift +++ b/submodules/TelegramUI/TelegramUI/StickerPaneSearchStickerItem.swift @@ -8,6 +8,7 @@ import Postbox import TelegramPresentationData import StickerResources import AccountContext +import AnimationUI final class StickerPaneSearchStickerSection: GridSection { let code: String diff --git a/submodules/TelegramUI/TelegramUI/StickersChatInputContextPanelNode.swift b/submodules/TelegramUI/TelegramUI/StickersChatInputContextPanelNode.swift index 5bceb506a0..33e5ac327a 100644 --- a/submodules/TelegramUI/TelegramUI/StickersChatInputContextPanelNode.swift +++ b/submodules/TelegramUI/TelegramUI/StickersChatInputContextPanelNode.swift @@ -8,6 +8,7 @@ import SwiftSignalKit import TelegramPresentationData import MergeLists import AccountContext +import StickerPackPreviewUI private struct StickersChatInputContextPanelEntryStableId: Hashable { let ids: [MediaId] diff --git a/submodules/TelegramUI/TelegramUI/TelegramUIPrivate/module.modulemap b/submodules/TelegramUI/TelegramUI/TelegramUIPrivate/module.modulemap index f861574e52..4ebced82c3 100644 --- a/submodules/TelegramUI/TelegramUI/TelegramUIPrivate/module.modulemap +++ b/submodules/TelegramUI/TelegramUI/TelegramUIPrivate/module.modulemap @@ -15,6 +15,4 @@ module TelegramUIPrivateModule { header "../TGPresentationAutoNightPreferences.h" header "../TGProxyItem.h" header "../UIImage+ImageEffects.h" - header "../YUV.h" - header "../../third-party/bc1/TextureCompression.h" } diff --git a/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift b/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift index 635c02d0e4..9464091b4f 100644 --- a/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift +++ b/submodules/TelegramUI/TelegramUI/TextLinkHandling.swift @@ -10,6 +10,8 @@ import AccountContext import SafariServices import OpenInExternalAppUI import InstantPageUI +import HashtagSearchUI +import StickerPackPreviewUI func handleTextLinkActionImpl(context: AccountContext, peerId: PeerId?, navigateDisposable: MetaDisposable, controller: ViewController, action: TextLinkItemActionType, itemLink: TextLinkItem) { let presentImpl: (ViewController, Any?) -> Void = { controllerToPresent, _ in diff --git a/submodules/TelegramUI/TelegramUI/UserInfoController.swift b/submodules/TelegramUI/TelegramUI/UserInfoController.swift index 68d39a969d..f5e6f9b0dd 100644 --- a/submodules/TelegramUI/TelegramUI/UserInfoController.swift +++ b/submodules/TelegramUI/TelegramUI/UserInfoController.swift @@ -17,6 +17,7 @@ import ShareController import AlertUI import TelegramNotices import GalleryUI +import ItemListAvatarAndNameInfoItem private final class UserInfoControllerArguments { let account: Account diff --git a/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj b/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj index 32da6406ee..59bc522823 100644 --- a/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj +++ b/submodules/TelegramUI/TelegramUI_Xcode.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ 0910B0F121FB3DE100F8F87D /* WallpaperPatternPanelNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0910B0F021FB3DE100F8F87D /* WallpaperPatternPanelNode.swift */; }; 091417F221EF4E5D00C8325A /* WallpaperGalleryController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 091417F121EF4E5D00C8325A /* WallpaperGalleryController.swift */; }; 091417F421EF4F5F00C8325A /* WallpaperGalleryItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 091417F321EF4F5F00C8325A /* WallpaperGalleryItem.swift */; }; - 091954792294754E00E11046 /* AnimatedStickerUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 091954782294754E00E11046 /* AnimatedStickerUtils.swift */; }; 091BEAB3214552D9003AEA30 /* Vision.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D02DADBE2138D76F00116225 /* Vision.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 0921F60E228EE000001A13D7 /* ChatMessageActionUrlAuthController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0921F60D228EE000001A13D7 /* ChatMessageActionUrlAuthController.swift */; }; 092F368D2154AAEA001A9F49 /* SFCompactRounded-Semibold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 092F368C2154AAE9001A9F49 /* SFCompactRounded-Semibold.otf */; }; @@ -179,23 +178,6 @@ D00ACA5A2022897D0045D427 /* ProcessedPeerRestrictionText.swift in Sources */ = {isa = PBXBuildFile; fileRef = D00ACA592022897D0045D427 /* ProcessedPeerRestrictionText.swift */; }; D00BDA1F1EE5B69200C64C5E /* ChannelAdminController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D00BDA1E1EE5B69200C64C5E /* ChannelAdminController.swift */; }; D010E17D22C238BC009324D4 /* RLottie.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D010E17C22C238BC009324D4 /* RLottie.framework */; }; - D01590A622BD460C0017C33E /* MetalAnimationRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01590A522BD460C0017C33E /* MetalAnimationRenderer.swift */; }; - D01590A822BD462C0017C33E /* SoftwareAnimationRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01590A722BD462C0017C33E /* SoftwareAnimationRenderer.swift */; }; - D01590AB22BD467B0017C33E /* AnimationRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01590AA22BD467B0017C33E /* AnimationRenderer.swift */; }; - D01590AE22BD58AD0017C33E /* YUV.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590AC22BD58AD0017C33E /* YUV.h */; }; - D01590AF22BD58AD0017C33E /* YUV.m in Sources */ = {isa = PBXBuildFile; fileRef = D01590AD22BD58AD0017C33E /* YUV.m */; }; - D01590BA22BDAEBC0017C33E /* ColorVec.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590B022BDAEB30017C33E /* ColorVec.h */; }; - D01590BB22BDAEBC0017C33E /* BC1Compression.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590B122BDAEBB0017C33E /* BC1Compression.h */; }; - D01590BC22BDAEBC0017C33E /* BMPImage.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590B222BDAEBB0017C33E /* BMPImage.h */; }; - D01590BD22BDAEBC0017C33E /* DDSImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D01590B322BDAEBB0017C33E /* DDSImage.cpp */; }; - D01590BE22BDAEBC0017C33E /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D01590B422BDAEBB0017C33E /* Image.cpp */; }; - D01590BF22BDAEBC0017C33E /* Image.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590B522BDAEBC0017C33E /* Image.h */; }; - D01590C022BDAEBC0017C33E /* BC1Compression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D01590B622BDAEBC0017C33E /* BC1Compression.cpp */; }; - D01590C122BDAEBC0017C33E /* DDSImage.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590B722BDAEBC0017C33E /* DDSImage.h */; }; - D01590C222BDAEBC0017C33E /* TypeDefinitions.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590B822BDAEBC0017C33E /* TypeDefinitions.h */; }; - D01590C322BDAEBC0017C33E /* BMPImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D01590B922BDAEBC0017C33E /* BMPImage.cpp */; }; - D01590C722BE61CB0017C33E /* TextureCompression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D01590C522BE61CB0017C33E /* TextureCompression.cpp */; }; - D01590C922BE62C40017C33E /* TextureCompression.h in Headers */ = {isa = PBXBuildFile; fileRef = D01590C822BE62C40017C33E /* TextureCompression.h */; }; D015E04F225D2E5900CB9E8A /* WebP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D015E04E225D2E5900CB9E8A /* WebP.framework */; }; D017734C22049BF800DA06A7 /* UpgradedAccounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = D017734B22049BF800DA06A7 /* UpgradedAccounts.swift */; }; D01776BE1F1E76920044446D /* PeerMediaCollectionSectionsNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01776BD1F1E76920044446D /* PeerMediaCollectionSectionsNode.swift */; }; @@ -238,11 +220,15 @@ D0383EE6207D299600C45548 /* EmojisChatInputPanelItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0383EE5207D299600C45548 /* EmojisChatInputPanelItem.swift */; }; D038AC5322F88A3600320981 /* ImageBlur.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D038AC5222F88A3600320981 /* ImageBlur.framework */; }; D03AA4DF202DBF6F0056C405 /* ChatContextResultPeekContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03AA4DE202DBF6F0056C405 /* ChatContextResultPeekContentNode.swift */; }; - D03AA4E5202DF8840056C405 /* StickerPreviewPeekContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03AA4E4202DF8840056C405 /* StickerPreviewPeekContent.swift */; }; D03AE67322B9459C0078411C /* HockeySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03AE67222B9459C0078411C /* HockeySDK.framework */; }; D03AE67522B945D30078411C /* BuildConfig.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03AE67422B945D30078411C /* BuildConfig.framework */; }; D03E3D2B23045B120049C28B /* ChatMessageRestrictedBubbleContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E3D2A23045B120049C28B /* ChatMessageRestrictedBubbleContentNode.swift */; }; D03E3D4D23045E410049C28B /* PlatformRestrictionMatching.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D4C23045E410049C28B /* PlatformRestrictionMatching.framework */; }; + D03E3D7F2304ACB40049C28B /* HashtagSearchUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3D7E2304ACB40049C28B /* HashtagSearchUI.framework */; }; + D03E3DD22304AF8E0049C28B /* ItemListAvatarAndNameInfoItem.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DD12304AF8E0049C28B /* ItemListAvatarAndNameInfoItem.framework */; }; + D03E3E002304B2AC0049C28B /* ItemListPeerActionItem.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3DFF2304B2AC0049C28B /* ItemListPeerActionItem.framework */; }; + D03E3E482304B4670049C28B /* StickerPackPreviewUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E472304B4670049C28B /* StickerPackPreviewUI.framework */; }; + D03E3E8C2304B6E10049C28B /* YuvConversion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E8B2304B6E10049C28B /* YuvConversion.framework */; }; D04203152037162700490EA5 /* MediaInputPaneTrendingItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04203142037162700490EA5 /* MediaInputPaneTrendingItem.swift */; }; D04281EF200E3D88009DDE36 /* GroupInfoSearchItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281EE200E3D88009DDE36 /* GroupInfoSearchItem.swift */; }; D04281F1200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F0200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift */; }; @@ -307,7 +293,6 @@ D081E108217F583F003CD921 /* LanguageLinkPreviewContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D081E107217F583F003CD921 /* LanguageLinkPreviewContentNode.swift */; }; D083491C209361DC008CFD52 /* AvatarGalleryItemFooterContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D083491B209361DC008CFD52 /* AvatarGalleryItemFooterContentNode.swift */; }; D084023420E295F000065674 /* GroupStickerPackSetupController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D084023320E295F000065674 /* GroupStickerPackSetupController.swift */; }; - D08557E722C5FEB90026D6D2 /* AnimatedStickerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D08557E622C5FEB90026D6D2 /* AnimatedStickerNode.swift */; }; D08799F022F649A600C4D6B3 /* TelegramBaseController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D08799EF22F649A600C4D6B3 /* TelegramBaseController.framework */; }; D0879A0D22F64E4C00C4D6B3 /* DeviceLocationManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0879A0C22F64E4C00C4D6B3 /* DeviceLocationManager.framework */; }; D0879B1F22F7189600C4D6B3 /* AvatarNode.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0879B1E22F7189600C4D6B3 /* AvatarNode.framework */; }; @@ -329,8 +314,6 @@ D091C7A41F8EBB1E00D7DE13 /* ChatPresentationData.swift in Sources */ = {isa = PBXBuildFile; fileRef = D091C7A31F8EBB1E00D7DE13 /* ChatPresentationData.swift */; }; D091C7A61F8ECEA300D7DE13 /* SettingsThemeWallpaperNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D091C7A51F8ECEA300D7DE13 /* SettingsThemeWallpaperNode.swift */; }; D09250061FE5371D003F693F /* GlobalExperimentalSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = D09250051FE5371D003F693F /* GlobalExperimentalSettings.swift */; }; - D0943AF61FDAAE7E001522CC /* MultipleAvatarsNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0943AF51FDAAE7E001522CC /* MultipleAvatarsNode.swift */; }; - D0943AFE1FDAE454001522CC /* ChatMultipleAvatarsNavigationNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0943AFD1FDAE454001522CC /* ChatMultipleAvatarsNavigationNode.swift */; }; D0943B001FDAE852001522CC /* ChatFeedNavigationInputPanelNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0943AFF1FDAE852001522CC /* ChatFeedNavigationInputPanelNode.swift */; }; D0943B051FDDFDA0001522CC /* OverlayInstantVideoNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0943B041FDDFDA0001522CC /* OverlayInstantVideoNode.swift */; }; D0943B071FDEC529001522CC /* InstantVideoRadialStatusNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0943B061FDEC528001522CC /* InstantVideoRadialStatusNode.swift */; }; @@ -380,42 +363,6 @@ D0AEAE272080D6970013176E /* PaneSearchBarNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AEAE262080D6970013176E /* PaneSearchBarNode.swift */; }; D0AEAE292080FD660013176E /* StickerPaneSearchGlobaltem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AEAE282080FD660013176E /* StickerPaneSearchGlobaltem.swift */; }; D0AF323A1FB1D8D60097362B /* ChatOverlayNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AF32391FB1D8D60097362B /* ChatOverlayNavigationBar.swift */; }; - D0AF796E22C2E26500CECCB8 /* astc.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0AF793622C2E26500CECCB8 /* astc.cc */; }; - D0AF796F22C2E26500CECCB8 /* compress_texture.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF793822C2E26500CECCB8 /* compress_texture.h */; }; - D0AF797022C2E26500CECCB8 /* integer_sequence_encoding.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF793922C2E26500CECCB8 /* integer_sequence_encoding.h */; }; - D0AF797122C2E26500CECCB8 /* range.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF793A22C2E26500CECCB8 /* range.h */; }; - D0AF797222C2E26500CECCB8 /* misc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF793B22C2E26500CECCB8 /* misc.h */; }; - D0AF797322C2E26500CECCB8 /* tables_data_size.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF793C22C2E26500CECCB8 /* tables_data_size.h */; }; - D0AF797422C2E26500CECCB8 /* matrix.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF793D22C2E26500CECCB8 /* matrix.h */; }; - D0AF797522C2E26500CECCB8 /* colors.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF793E22C2E26500CECCB8 /* colors.h */; }; - D0AF797622C2E26500CECCB8 /* endpoints_principal_components.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0AF793F22C2E26500CECCB8 /* endpoints_principal_components.cc */; }; - D0AF797722C2E26500CECCB8 /* data_size.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794022C2E26500CECCB8 /* data_size.h */; }; - D0AF797822C2E26500CECCB8 /* meson.build in Resources */ = {isa = PBXBuildFile; fileRef = D0AF794122C2E26500CECCB8 /* meson.build */; }; - D0AF797922C2E26500CECCB8 /* endpoints_bounding_box.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794222C2E26500CECCB8 /* endpoints_bounding_box.h */; }; - D0AF797A22C2E26500CECCB8 /* tables_color_quantization.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794322C2E26500CECCB8 /* tables_color_quantization.h */; }; - D0AF797B22C2E26500CECCB8 /* tables_integer_sequence_encoding.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794422C2E26500CECCB8 /* tables_integer_sequence_encoding.h */; }; - D0AF797C22C2E26500CECCB8 /* constants.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794522C2E26500CECCB8 /* constants.h */; }; - D0AF797D22C2E26500CECCB8 /* endpoints_min_max.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794622C2E26500CECCB8 /* endpoints_min_max.h */; }; - D0AF797E22C2E26500CECCB8 /* dcheck.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794722C2E26500CECCB8 /* dcheck.h */; }; - D0AF797F22C2E26500CECCB8 /* weights_quantize_table.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794822C2E26500CECCB8 /* weights_quantize_table.h */; }; - D0AF798022C2E26500CECCB8 /* compress_block.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0AF794922C2E26500CECCB8 /* compress_block.cc */; }; - D0AF798122C2E26500CECCB8 /* endpoints_principal_components.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794A22C2E26500CECCB8 /* endpoints_principal_components.h */; }; - D0AF798222C2E26500CECCB8 /* bitmanip.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794B22C2E26500CECCB8 /* bitmanip.h */; }; - D0AF798322C2E26500CECCB8 /* endpoints.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794C22C2E26500CECCB8 /* endpoints.h */; }; - D0AF798422C2E26500CECCB8 /* compress_block.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794D22C2E26500CECCB8 /* compress_block.h */; }; - D0AF798522C2E26500CECCB8 /* endpoints_encode.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794E22C2E26500CECCB8 /* endpoints_encode.h */; }; - D0AF798622C2E26500CECCB8 /* weights_quantize.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF794F22C2E26500CECCB8 /* weights_quantize.h */; }; - D0AF798722C2E26500CECCB8 /* compress_texture.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0AF795022C2E26500CECCB8 /* compress_texture.cc */; }; - D0AF798822C2E26500CECCB8 /* matrix.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0AF795122C2E26500CECCB8 /* matrix.cc */; }; - D0AF798922C2E26500CECCB8 /* vector.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF795222C2E26500CECCB8 /* vector.h */; }; - D0AF798A22C2E26500CECCB8 /* endpoints_quantize.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF795322C2E26500CECCB8 /* endpoints_quantize.h */; }; - D0AF798B22C2E26500CECCB8 /* store_block.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF795422C2E26500CECCB8 /* store_block.h */; }; - D0AF798C22C2E26500CECCB8 /* color.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF795622C2E26500CECCB8 /* color.h */; }; - D0AF798D22C2E26500CECCB8 /* bgra.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0AF795722C2E26500CECCB8 /* bgra.cc */; }; - D0AF798E22C2E26500CECCB8 /* compressed.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF795822C2E26500CECCB8 /* compressed.h */; }; - D0AF798F22C2E26500CECCB8 /* compressed.cc in Sources */ = {isa = PBXBuildFile; fileRef = D0AF795922C2E26500CECCB8 /* compressed.cc */; }; - D0AF799022C2E26500CECCB8 /* bgra.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF795A22C2E26500CECCB8 /* bgra.h */; }; - D0AF79A322C2E36400CECCB8 /* astc.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AF79A222C2E36400CECCB8 /* astc.h */; }; D0B21B15220D85DD003F741D /* TabBarAccountSwitchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B21B14220D85DD003F741D /* TabBarAccountSwitchController.swift */; }; D0B21B17220D85E7003F741D /* TabBarAccountSwitchControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B21B16220D85E7003F741D /* TabBarAccountSwitchControllerNode.swift */; }; D0B21B1F22156D92003F741D /* LegacyCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B21B1E22156D92003F741D /* LegacyCache.swift */; }; @@ -640,8 +587,6 @@ D0EC6D731EB9F58800EBF1C3 /* AuthorizationSequenceSignUpController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F53BF61E79593500117362 /* AuthorizationSequenceSignUpController.swift */; }; D0EC6D741EB9F58800EBF1C3 /* AuthorizationSequenceSignUpControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F53BF81E79593F00117362 /* AuthorizationSequenceSignUpControllerNode.swift */; }; D0EC6D751EB9F58800EBF1C3 /* TelegramRootController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D05174C21EAE583800A1BF36 /* TelegramRootController.swift */; }; - D0EC6D7F1EB9F58800EBF1C3 /* HashtagSearchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01749501E1067E40057C89A /* HashtagSearchController.swift */; }; - D0EC6D801EB9F58800EBF1C3 /* HashtagSearchControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01749521E1068820057C89A /* HashtagSearchControllerNode.swift */; }; D0EC6D811EB9F58800EBF1C3 /* ChatController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F69E0E1D6B8ACF0046BCD6 /* ChatController.swift */; }; D0EC6D821EB9F58800EBF1C3 /* ChatControllerInteraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F69E0F1D6B8ACF0046BCD6 /* ChatControllerInteraction.swift */; }; D0EC6D831EB9F58800EBF1C3 /* ChatControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F69E101D6B8ACF0046BCD6 /* ChatControllerNode.swift */; }; @@ -752,11 +697,6 @@ D0EC6DF91EB9F58900EBF1C3 /* PeerMediaCollectionInterfaceStateButtons.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0DE77241D93225E002B8809 /* PeerMediaCollectionInterfaceStateButtons.swift */; }; D0EC6DFB1EB9F58900EBF1C3 /* AvatarGalleryController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0575AF91EA0FDA7006F2541 /* AvatarGalleryController.swift */; }; D0EC6E0E1EB9F58900EBF1C3 /* PeerAvatarImageGalleryItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0575AFB1EA104A6006F2541 /* PeerAvatarImageGalleryItem.swift */; }; - D0EC6E231EB9F58900EBF1C3 /* StickerPackPreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D748051E7AF63800F4B1F6 /* StickerPackPreviewController.swift */; }; - D0EC6E241EB9F58900EBF1C3 /* StickerPackPreviewControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D748071E7AF64400F4B1F6 /* StickerPackPreviewControllerNode.swift */; }; - D0EC6E251EB9F58900EBF1C3 /* StickerPackPreviewGridItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D7480E1E7B1BD600F4B1F6 /* StickerPackPreviewGridItem.swift */; }; - D0EC6E261EB9F58900EBF1C3 /* StickerPreviewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0BE383B1E7C3E51000079AF /* StickerPreviewController.swift */; }; - D0EC6E271EB9F58900EBF1C3 /* StickerPreviewControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0BE931A1E92DFBA00DCC1E6 /* StickerPreviewControllerNode.swift */; }; D0EC6E2B1EB9F58900EBF1C3 /* ComposeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D087750F1E3F46A400A97350 /* ComposeController.swift */; }; D0EC6E2C1EB9F58900EBF1C3 /* ComposeControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D08775111E3F46AB00A97350 /* ComposeControllerNode.swift */; }; D0EC6E2D1EB9F58900EBF1C3 /* CounterContollerTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D087751D1E3F579300A97350 /* CounterContollerTitleView.swift */; }; @@ -766,8 +706,6 @@ D0EC6E311EB9F58900EBF1C3 /* ContactSelectionControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0BC38801E40F1D80044D6FE /* ContactSelectionControllerNode.swift */; }; D0EC6E321EB9F58900EBF1C3 /* CreateGroupController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0BC38691E3FB94D0044D6FE /* CreateGroupController.swift */; }; D0EC6E331EB9F58900EBF1C3 /* CreateChannelController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D018D3341E6489EC00C5E089 /* CreateChannelController.swift */; }; - D0EC6E351EB9F58900EBF1C3 /* ItemListAvatarAndNameItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D003702D1DA43052004308D3 /* ItemListAvatarAndNameItem.swift */; }; - D0EC6E3C1EB9F58900EBF1C3 /* ItemListPeerActionItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B843DA1DAAB138005F29E1 /* ItemListPeerActionItem.swift */; }; D0EC6E4D1EB9F58900EBF1C3 /* PeerInfoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B843CC1DA903BB005F29E1 /* PeerInfoController.swift */; }; D0EC6E4E1EB9F58900EBF1C3 /* GroupInfoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0486F091E523C8500091F0C /* GroupInfoController.swift */; }; D0EC6E4F1EB9F58900EBF1C3 /* ChannelVisibilityController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03E5E0E1E55F8B90029569A /* ChannelVisibilityController.swift */; }; @@ -867,7 +805,6 @@ 0910B0F021FB3DE100F8F87D /* WallpaperPatternPanelNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperPatternPanelNode.swift; sourceTree = ""; }; 091417F121EF4E5D00C8325A /* WallpaperGalleryController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperGalleryController.swift; sourceTree = ""; }; 091417F321EF4F5F00C8325A /* WallpaperGalleryItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperGalleryItem.swift; sourceTree = ""; }; - 091954782294754E00E11046 /* AnimatedStickerUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedStickerUtils.swift; sourceTree = ""; }; 0921F60D228EE000001A13D7 /* ChatMessageActionUrlAuthController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMessageActionUrlAuthController.swift; sourceTree = ""; }; 092F368C2154AAE9001A9F49 /* SFCompactRounded-Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SFCompactRounded-Semibold.otf"; sourceTree = ""; }; 092F368F2157AB46001A9F49 /* ItemListCallListItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemListCallListItem.swift; sourceTree = ""; }; @@ -985,7 +922,6 @@ D002A0D81E9BEC8100A81812 /* SoftwareVideoLayerFrameManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoftwareVideoLayerFrameManager.swift; sourceTree = ""; }; D002A0DA1E9C190700A81812 /* SoftwareVideoThumbnailLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SoftwareVideoThumbnailLayer.swift; sourceTree = ""; }; D002A0DC1E9CD52A00A81812 /* ChatMediaInputRecentGifsItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatMediaInputRecentGifsItem.swift; sourceTree = ""; }; - D003702D1DA43052004308D3 /* ItemListAvatarAndNameItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListAvatarAndNameItem.swift; sourceTree = ""; }; D0068FA721760FA300D1B315 /* StoreDownloadedMedia.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreDownloadedMedia.swift; sourceTree = ""; }; D007019B2029E8F2006B9E34 /* LegacyICloudFileController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyICloudFileController.swift; sourceTree = ""; }; D007019D2029EFDD006B9E34 /* ICloudResources.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICloudResources.swift; sourceTree = ""; }; @@ -1039,26 +975,7 @@ D0105D591D80B957008755D8 /* ChatChannelSubscriberInputPanelNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatChannelSubscriberInputPanelNode.swift; sourceTree = ""; }; D010E17C22C238BC009324D4 /* RLottie.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RLottie.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D0127A0C1E6424AC003BFF2E /* ChatPinnedMessageTitlePanelNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatPinnedMessageTitlePanelNode.swift; sourceTree = ""; }; - D01590A522BD460C0017C33E /* MetalAnimationRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetalAnimationRenderer.swift; sourceTree = ""; }; - D01590A722BD462C0017C33E /* SoftwareAnimationRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoftwareAnimationRenderer.swift; sourceTree = ""; }; - D01590AA22BD467B0017C33E /* AnimationRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationRenderer.swift; sourceTree = ""; }; - D01590AC22BD58AD0017C33E /* YUV.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YUV.h; sourceTree = ""; }; - D01590AD22BD58AD0017C33E /* YUV.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YUV.m; sourceTree = ""; }; - D01590B022BDAEB30017C33E /* ColorVec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColorVec.h; path = "third-party/bc1/ColorVec.h"; sourceTree = SOURCE_ROOT; }; - D01590B122BDAEBB0017C33E /* BC1Compression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BC1Compression.h; path = "third-party/bc1/BC1Compression.h"; sourceTree = SOURCE_ROOT; }; - D01590B222BDAEBB0017C33E /* BMPImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BMPImage.h; path = "third-party/bc1/BMPImage.h"; sourceTree = SOURCE_ROOT; }; - D01590B322BDAEBB0017C33E /* DDSImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DDSImage.cpp; path = "third-party/bc1/DDSImage.cpp"; sourceTree = SOURCE_ROOT; }; - D01590B422BDAEBB0017C33E /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Image.cpp; path = "third-party/bc1/Image.cpp"; sourceTree = SOURCE_ROOT; }; - D01590B522BDAEBC0017C33E /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Image.h; path = "third-party/bc1/Image.h"; sourceTree = SOURCE_ROOT; }; - D01590B622BDAEBC0017C33E /* BC1Compression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BC1Compression.cpp; path = "third-party/bc1/BC1Compression.cpp"; sourceTree = SOURCE_ROOT; }; - D01590B722BDAEBC0017C33E /* DDSImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDSImage.h; path = "third-party/bc1/DDSImage.h"; sourceTree = SOURCE_ROOT; }; - D01590B822BDAEBC0017C33E /* TypeDefinitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeDefinitions.h; path = "third-party/bc1/TypeDefinitions.h"; sourceTree = SOURCE_ROOT; }; - D01590B922BDAEBC0017C33E /* BMPImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BMPImage.cpp; path = "third-party/bc1/BMPImage.cpp"; sourceTree = SOURCE_ROOT; }; - D01590C522BE61CB0017C33E /* TextureCompression.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = TextureCompression.cpp; path = "../third-party/bc1/TextureCompression.cpp"; sourceTree = ""; }; - D01590C822BE62C40017C33E /* TextureCompression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TextureCompression.h; path = "third-party/bc1/TextureCompression.h"; sourceTree = SOURCE_ROOT; }; D015E04E225D2E5900CB9E8A /* WebP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WebP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D01749501E1067E40057C89A /* HashtagSearchController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HashtagSearchController.swift; sourceTree = ""; }; - D01749521E1068820057C89A /* HashtagSearchControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HashtagSearchControllerNode.swift; sourceTree = ""; }; D01749561E1087CC0057C89A /* ChatBotStartInputPanelNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatBotStartInputPanelNode.swift; sourceTree = ""; }; D017734B22049BF800DA06A7 /* UpgradedAccounts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpgradedAccounts.swift; sourceTree = ""; }; D01776BD1F1E76920044446D /* PeerMediaCollectionSectionsNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerMediaCollectionSectionsNode.swift; sourceTree = ""; }; @@ -1135,7 +1052,6 @@ D039EB071DEC725600886EBC /* ChatTextInputAudioRecordingTimeNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatTextInputAudioRecordingTimeNode.swift; sourceTree = ""; }; D039EB091DEC7A8700886EBC /* ChatTextInputAudioRecordingCancelIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatTextInputAudioRecordingCancelIndicator.swift; sourceTree = ""; }; D03AA4DE202DBF6F0056C405 /* ChatContextResultPeekContentNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatContextResultPeekContentNode.swift; sourceTree = ""; }; - D03AA4E4202DF8840056C405 /* StickerPreviewPeekContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StickerPreviewPeekContent.swift; sourceTree = ""; }; D03ADB471D703268005A521C /* ChatInterfaceState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatInterfaceState.swift; sourceTree = ""; }; D03ADB4A1D70443F005A521C /* ReplyAccessoryPanelNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplyAccessoryPanelNode.swift; sourceTree = ""; }; D03ADB4C1D7045C9005A521C /* ChatInterfaceStateAccessoryPanels.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatInterfaceStateAccessoryPanels.swift; sourceTree = ""; }; @@ -1144,6 +1060,11 @@ D03AE67422B945D30078411C /* BuildConfig.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = BuildConfig.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D03E3D2A23045B120049C28B /* ChatMessageRestrictedBubbleContentNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMessageRestrictedBubbleContentNode.swift; sourceTree = ""; }; D03E3D4C23045E410049C28B /* PlatformRestrictionMatching.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PlatformRestrictionMatching.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3D7E2304ACB40049C28B /* HashtagSearchUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = HashtagSearchUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DD12304AF8E0049C28B /* ItemListAvatarAndNameInfoItem.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ItemListAvatarAndNameInfoItem.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3DFF2304B2AC0049C28B /* ItemListPeerActionItem.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ItemListPeerActionItem.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E472304B4670049C28B /* StickerPackPreviewUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = StickerPackPreviewUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E8B2304B6E10049C28B /* YuvConversion.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = YuvConversion.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D03E5E081E55C49C0029569A /* DebugAccountsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DebugAccountsController.swift; sourceTree = ""; }; D03E5E0E1E55F8B90029569A /* ChannelVisibilityController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelVisibilityController.swift; sourceTree = ""; }; D04203142037162700490EA5 /* MediaInputPaneTrendingItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaInputPaneTrendingItem.swift; sourceTree = ""; }; @@ -1264,7 +1185,6 @@ D081E107217F583F003CD921 /* LanguageLinkPreviewContentNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageLinkPreviewContentNode.swift; sourceTree = ""; }; D083491B209361DC008CFD52 /* AvatarGalleryItemFooterContentNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AvatarGalleryItemFooterContentNode.swift; sourceTree = ""; }; D084023320E295F000065674 /* GroupStickerPackSetupController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupStickerPackSetupController.swift; sourceTree = ""; }; - D08557E622C5FEB90026D6D2 /* AnimatedStickerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedStickerNode.swift; sourceTree = ""; }; D08775081E3E59DE00A97350 /* PeerNotificationSoundStrings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerNotificationSoundStrings.swift; sourceTree = ""; }; D087750F1E3F46A400A97350 /* ComposeController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComposeController.swift; sourceTree = ""; }; D08775111E3F46AB00A97350 /* ComposeControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComposeControllerNode.swift; sourceTree = ""; }; @@ -1299,8 +1219,6 @@ D091C7A31F8EBB1E00D7DE13 /* ChatPresentationData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatPresentationData.swift; sourceTree = ""; }; D091C7A51F8ECEA300D7DE13 /* SettingsThemeWallpaperNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsThemeWallpaperNode.swift; sourceTree = ""; }; D09250051FE5371D003F693F /* GlobalExperimentalSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalExperimentalSettings.swift; sourceTree = ""; }; - D0943AF51FDAAE7E001522CC /* MultipleAvatarsNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultipleAvatarsNode.swift; sourceTree = ""; }; - D0943AFD1FDAE454001522CC /* ChatMultipleAvatarsNavigationNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMultipleAvatarsNavigationNode.swift; sourceTree = ""; }; D0943AFF1FDAE852001522CC /* ChatFeedNavigationInputPanelNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatFeedNavigationInputPanelNode.swift; sourceTree = ""; }; D0943B041FDDFDA0001522CC /* OverlayInstantVideoNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverlayInstantVideoNode.swift; sourceTree = ""; }; D0943B061FDEC528001522CC /* InstantVideoRadialStatusNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstantVideoRadialStatusNode.swift; sourceTree = ""; }; @@ -1363,42 +1281,6 @@ D0AEAE262080D6970013176E /* PaneSearchBarNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaneSearchBarNode.swift; sourceTree = ""; }; D0AEAE282080FD660013176E /* StickerPaneSearchGlobaltem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StickerPaneSearchGlobaltem.swift; sourceTree = ""; }; D0AF32391FB1D8D60097362B /* ChatOverlayNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatOverlayNavigationBar.swift; sourceTree = ""; }; - D0AF793622C2E26500CECCB8 /* astc.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = astc.cc; sourceTree = ""; }; - D0AF793822C2E26500CECCB8 /* compress_texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compress_texture.h; sourceTree = ""; }; - D0AF793922C2E26500CECCB8 /* integer_sequence_encoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = integer_sequence_encoding.h; sourceTree = ""; }; - D0AF793A22C2E26500CECCB8 /* range.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = range.h; sourceTree = ""; }; - D0AF793B22C2E26500CECCB8 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = misc.h; sourceTree = ""; }; - D0AF793C22C2E26500CECCB8 /* tables_data_size.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tables_data_size.h; sourceTree = ""; }; - D0AF793D22C2E26500CECCB8 /* matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = matrix.h; sourceTree = ""; }; - D0AF793E22C2E26500CECCB8 /* colors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = colors.h; sourceTree = ""; }; - D0AF793F22C2E26500CECCB8 /* endpoints_principal_components.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = endpoints_principal_components.cc; sourceTree = ""; }; - D0AF794022C2E26500CECCB8 /* data_size.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = data_size.h; sourceTree = ""; }; - D0AF794122C2E26500CECCB8 /* meson.build */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = meson.build; sourceTree = ""; }; - D0AF794222C2E26500CECCB8 /* endpoints_bounding_box.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = endpoints_bounding_box.h; sourceTree = ""; }; - D0AF794322C2E26500CECCB8 /* tables_color_quantization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tables_color_quantization.h; sourceTree = ""; }; - D0AF794422C2E26500CECCB8 /* tables_integer_sequence_encoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tables_integer_sequence_encoding.h; sourceTree = ""; }; - D0AF794522C2E26500CECCB8 /* constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = constants.h; sourceTree = ""; }; - D0AF794622C2E26500CECCB8 /* endpoints_min_max.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = endpoints_min_max.h; sourceTree = ""; }; - D0AF794722C2E26500CECCB8 /* dcheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dcheck.h; sourceTree = ""; }; - D0AF794822C2E26500CECCB8 /* weights_quantize_table.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = weights_quantize_table.h; sourceTree = ""; }; - D0AF794922C2E26500CECCB8 /* compress_block.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = compress_block.cc; sourceTree = ""; }; - D0AF794A22C2E26500CECCB8 /* endpoints_principal_components.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = endpoints_principal_components.h; sourceTree = ""; }; - D0AF794B22C2E26500CECCB8 /* bitmanip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bitmanip.h; sourceTree = ""; }; - D0AF794C22C2E26500CECCB8 /* endpoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = endpoints.h; sourceTree = ""; }; - D0AF794D22C2E26500CECCB8 /* compress_block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compress_block.h; sourceTree = ""; }; - D0AF794E22C2E26500CECCB8 /* endpoints_encode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = endpoints_encode.h; sourceTree = ""; }; - D0AF794F22C2E26500CECCB8 /* weights_quantize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = weights_quantize.h; sourceTree = ""; }; - D0AF795022C2E26500CECCB8 /* compress_texture.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = compress_texture.cc; sourceTree = ""; }; - D0AF795122C2E26500CECCB8 /* matrix.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = matrix.cc; sourceTree = ""; }; - D0AF795222C2E26500CECCB8 /* vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vector.h; sourceTree = ""; }; - D0AF795322C2E26500CECCB8 /* endpoints_quantize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = endpoints_quantize.h; sourceTree = ""; }; - D0AF795422C2E26500CECCB8 /* store_block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = store_block.h; sourceTree = ""; }; - D0AF795622C2E26500CECCB8 /* color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = color.h; sourceTree = ""; }; - D0AF795722C2E26500CECCB8 /* bgra.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bgra.cc; sourceTree = ""; }; - D0AF795822C2E26500CECCB8 /* compressed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compressed.h; sourceTree = ""; }; - D0AF795922C2E26500CECCB8 /* compressed.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = compressed.cc; sourceTree = ""; }; - D0AF795A22C2E26500CECCB8 /* bgra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bgra.h; sourceTree = ""; }; - D0AF79A222C2E36400CECCB8 /* astc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = astc.h; sourceTree = ""; }; D0B21B14220D85DD003F741D /* TabBarAccountSwitchController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarAccountSwitchController.swift; sourceTree = ""; }; D0B21B16220D85E7003F741D /* TabBarAccountSwitchControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarAccountSwitchControllerNode.swift; sourceTree = ""; }; D0B21B1E22156D92003F741D /* LegacyCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyCache.swift; sourceTree = ""; }; @@ -1415,7 +1297,6 @@ D0B7F8E11D8A18070045D939 /* PeerMediaCollectionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerMediaCollectionController.swift; sourceTree = ""; }; D0B7F8E71D8A1F5F0045D939 /* PeerMediaCollectionControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerMediaCollectionControllerNode.swift; sourceTree = ""; }; D0B843CC1DA903BB005F29E1 /* PeerInfoController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerInfoController.swift; sourceTree = ""; }; - D0B843DA1DAAB138005F29E1 /* ItemListPeerActionItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemListPeerActionItem.swift; sourceTree = ""; }; D0B85C1B1FF6F76000E795B4 /* AuthorizationSequencePasswordRecoveryController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorizationSequencePasswordRecoveryController.swift; sourceTree = ""; }; D0B85C1D1FF6F76600E795B4 /* AuthorizationSequencePasswordRecoveryControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorizationSequencePasswordRecoveryControllerNode.swift; sourceTree = ""; }; D0B85C201FF70BEC00E795B4 /* AuthorizationSequenceAwaitingAccountResetControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorizationSequenceAwaitingAccountResetControllerNode.swift; sourceTree = ""; }; @@ -1431,8 +1312,6 @@ D0BCC3D1203F0A6C008126C2 /* StringForMessageTimestampStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringForMessageTimestampStatus.swift; sourceTree = ""; }; D0BCC3D320404CC7008126C2 /* ChatMessageActionSheetController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMessageActionSheetController.swift; sourceTree = ""; }; D0BCC3D520404CD8008126C2 /* ChatMessageActionSheetControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMessageActionSheetControllerNode.swift; sourceTree = ""; }; - D0BE383B1E7C3E51000079AF /* StickerPreviewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPreviewController.swift; sourceTree = ""; }; - D0BE931A1E92DFBA00DCC1E6 /* StickerPreviewControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPreviewControllerNode.swift; sourceTree = ""; }; D0BFAE4520AB04FB00793CF2 /* ChatRestrictedInputPanelNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRestrictedInputPanelNode.swift; sourceTree = ""; }; D0BFAE4D20AB1D7B00793CF2 /* DisabledContextResultsChatInputContextPanelNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisabledContextResultsChatInputContextPanelNode.swift; sourceTree = ""; }; D0BFAE4F20AB2A1300793CF2 /* PeerBanTimeoutController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeerBanTimeoutController.swift; sourceTree = ""; }; @@ -1554,9 +1433,6 @@ D0D268991D79CF9F00C422DA /* ChatPanelInterfaceInteraction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatPanelInterfaceInteraction.swift; sourceTree = ""; }; D0D3281322F31B3000D07EE2 /* TelegramUpdateUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TelegramUpdateUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D0D4345B1F97CEAA00CC1806 /* ProxyServerSettingsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProxyServerSettingsController.swift; sourceTree = ""; }; - D0D748051E7AF63800F4B1F6 /* StickerPackPreviewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPackPreviewController.swift; sourceTree = ""; }; - D0D748071E7AF64400F4B1F6 /* StickerPackPreviewControllerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPackPreviewControllerNode.swift; sourceTree = ""; }; - D0D7480E1E7B1BD600F4B1F6 /* StickerPackPreviewGridItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerPackPreviewGridItem.swift; sourceTree = ""; }; D0DC35431DE32230000195EB /* ChatInterfaceStateContextQueries.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatInterfaceStateContextQueries.swift; sourceTree = ""; }; D0DC35451DE35805000195EB /* MentionChatInputPanelItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MentionChatInputPanelItem.swift; sourceTree = ""; }; D0DC35491DE366CD000195EB /* CommandChatInputContextPanelNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommandChatInputContextPanelNode.swift; sourceTree = ""; }; @@ -1738,6 +1614,11 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D03E3E8C2304B6E10049C28B /* YuvConversion.framework in Frameworks */, + D03E3E482304B4670049C28B /* StickerPackPreviewUI.framework in Frameworks */, + D03E3E002304B2AC0049C28B /* ItemListPeerActionItem.framework in Frameworks */, + D03E3DD22304AF8E0049C28B /* ItemListAvatarAndNameInfoItem.framework in Frameworks */, + D03E3D7F2304ACB40049C28B /* HashtagSearchUI.framework in Frameworks */, D03E3D4D23045E410049C28B /* PlatformRestrictionMatching.framework in Frameworks */, D0C9CBD72302C09000FAB518 /* TextSelectionNode.framework in Frameworks */, D0C9CBB62302B65600FAB518 /* LanguageSuggestionUI.framework in Frameworks */, @@ -1892,15 +1773,6 @@ name = "Peers Nearby"; sourceTree = ""; }; - 0919546D229458E900E11046 /* Animated Stickers */ = { - isa = PBXGroup; - children = ( - 091954782294754E00E11046 /* AnimatedStickerUtils.swift */, - D08557E622C5FEB90026D6D2 /* AnimatedStickerNode.swift */, - ); - name = "Animated Stickers"; - sourceTree = ""; - }; 092F368B2154AAD6001A9F49 /* Fonts */ = { isa = PBXGroup; children = ( @@ -1979,13 +1851,6 @@ name = "Recent Sessions"; sourceTree = ""; }; - 09CC52A7210615AA000578F8 /* Web Embed */ = { - isa = PBXGroup; - children = ( - ); - name = "Web Embed"; - sourceTree = ""; - }; 09CE950F2237F3A300A7D2C3 /* Search */ = { isa = PBXGroup; children = ( @@ -2115,44 +1980,10 @@ D01590A922BD46690017C33E /* Animation */ = { isa = PBXGroup; children = ( - D0AF793422C2E26500CECCB8 /* astc */, - D01590B622BDAEBC0017C33E /* BC1Compression.cpp */, - D01590B122BDAEBB0017C33E /* BC1Compression.h */, - D01590B922BDAEBC0017C33E /* BMPImage.cpp */, - D01590B222BDAEBB0017C33E /* BMPImage.h */, - D01590B022BDAEB30017C33E /* ColorVec.h */, - D01590B322BDAEBB0017C33E /* DDSImage.cpp */, - D01590B722BDAEBC0017C33E /* DDSImage.h */, - D01590B422BDAEBB0017C33E /* Image.cpp */, - D01590B522BDAEBC0017C33E /* Image.h */, - D01590B822BDAEBC0017C33E /* TypeDefinitions.h */, - D01590AA22BD467B0017C33E /* AnimationRenderer.swift */, - D01590A522BD460C0017C33E /* MetalAnimationRenderer.swift */, - D01590A722BD462C0017C33E /* SoftwareAnimationRenderer.swift */, - D01590AC22BD58AD0017C33E /* YUV.h */, - D01590AD22BD58AD0017C33E /* YUV.m */, - D01590C822BE62C40017C33E /* TextureCompression.h */, - D01590C522BE61CB0017C33E /* TextureCompression.cpp */, ); name = Animation; sourceTree = ""; }; - D017494F1E1067C00057C89A /* Hashtag Search */ = { - isa = PBXGroup; - children = ( - D01749501E1067E40057C89A /* HashtagSearchController.swift */, - D01749521E1068820057C89A /* HashtagSearchControllerNode.swift */, - ); - name = "Hashtag Search"; - sourceTree = ""; - }; - D01776B61F1D6CCF0044446D /* Radial Status */ = { - isa = PBXGroup; - children = ( - ); - name = "Radial Status"; - sourceTree = ""; - }; D01848F021A2323D00B6DEBD /* Strings */ = { isa = PBXGroup; children = ( @@ -2175,14 +2006,6 @@ name = "Create Channel"; sourceTree = ""; }; - D01B27931E38F3920022A4C0 /* Item List */ = { - isa = PBXGroup; - children = ( - D0E6521D1E3A2305004EEA91 /* Items */, - ); - name = "Item List"; - sourceTree = ""; - }; D01C06AD1FBB45ED001561AB /* Join Link Preview */ = { isa = PBXGroup; children = ( @@ -2386,7 +2209,6 @@ D0477D191F617E4B00412B44 /* Video */ = { isa = PBXGroup; children = ( - 09CC52A7210615AA000578F8 /* Web Embed */, D0943B041FDDFDA0001522CC /* OverlayInstantVideoNode.swift */, D0CFBB941FD8B05000B65C0D /* OverlayInstantVideoDecoration.swift */, D0943B061FDEC528001522CC /* InstantVideoRadialStatusNode.swift */, @@ -2591,6 +2413,11 @@ D08D45281D5E340200A7428A /* Frameworks */ = { isa = PBXGroup; children = ( + D03E3E8B2304B6E10049C28B /* YuvConversion.framework */, + D03E3E472304B4670049C28B /* StickerPackPreviewUI.framework */, + D03E3DFF2304B2AC0049C28B /* ItemListPeerActionItem.framework */, + D03E3DD12304AF8E0049C28B /* ItemListAvatarAndNameInfoItem.framework */, + D03E3D7E2304ACB40049C28B /* HashtagSearchUI.framework */, D03E3D4C23045E410049C28B /* PlatformRestrictionMatching.framework */, D0C9CBD62302C09000FAB518 /* TextSelectionNode.framework */, D0C9CBB52302B65600FAB518 /* LanguageSuggestionUI.framework */, @@ -2766,74 +2593,6 @@ path = "Bridge Audio"; sourceTree = ""; }; - D0AF793422C2E26500CECCB8 /* astc */ = { - isa = PBXGroup; - children = ( - D0AF793522C2E26500CECCB8 /* compress */, - D0AF793722C2E26500CECCB8 /* astc */, - D0AF795522C2E26500CECCB8 /* image */, - ); - name = astc; - path = "third-party/astc"; - sourceTree = SOURCE_ROOT; - }; - D0AF793522C2E26500CECCB8 /* compress */ = { - isa = PBXGroup; - children = ( - D0AF79A222C2E36400CECCB8 /* astc.h */, - D0AF793622C2E26500CECCB8 /* astc.cc */, - ); - path = compress; - sourceTree = ""; - }; - D0AF793722C2E26500CECCB8 /* astc */ = { - isa = PBXGroup; - children = ( - D0AF793822C2E26500CECCB8 /* compress_texture.h */, - D0AF793922C2E26500CECCB8 /* integer_sequence_encoding.h */, - D0AF793A22C2E26500CECCB8 /* range.h */, - D0AF793B22C2E26500CECCB8 /* misc.h */, - D0AF793C22C2E26500CECCB8 /* tables_data_size.h */, - D0AF793D22C2E26500CECCB8 /* matrix.h */, - D0AF793E22C2E26500CECCB8 /* colors.h */, - D0AF793F22C2E26500CECCB8 /* endpoints_principal_components.cc */, - D0AF794022C2E26500CECCB8 /* data_size.h */, - D0AF794122C2E26500CECCB8 /* meson.build */, - D0AF794222C2E26500CECCB8 /* endpoints_bounding_box.h */, - D0AF794322C2E26500CECCB8 /* tables_color_quantization.h */, - D0AF794422C2E26500CECCB8 /* tables_integer_sequence_encoding.h */, - D0AF794522C2E26500CECCB8 /* constants.h */, - D0AF794622C2E26500CECCB8 /* endpoints_min_max.h */, - D0AF794722C2E26500CECCB8 /* dcheck.h */, - D0AF794822C2E26500CECCB8 /* weights_quantize_table.h */, - D0AF794922C2E26500CECCB8 /* compress_block.cc */, - D0AF794A22C2E26500CECCB8 /* endpoints_principal_components.h */, - D0AF794B22C2E26500CECCB8 /* bitmanip.h */, - D0AF794C22C2E26500CECCB8 /* endpoints.h */, - D0AF794D22C2E26500CECCB8 /* compress_block.h */, - D0AF794E22C2E26500CECCB8 /* endpoints_encode.h */, - D0AF794F22C2E26500CECCB8 /* weights_quantize.h */, - D0AF795022C2E26500CECCB8 /* compress_texture.cc */, - D0AF795122C2E26500CECCB8 /* matrix.cc */, - D0AF795222C2E26500CECCB8 /* vector.h */, - D0AF795322C2E26500CECCB8 /* endpoints_quantize.h */, - D0AF795422C2E26500CECCB8 /* store_block.h */, - ); - path = astc; - sourceTree = ""; - }; - D0AF795522C2E26500CECCB8 /* image */ = { - isa = PBXGroup; - children = ( - D0AF795622C2E26500CECCB8 /* color.h */, - D0AF795722C2E26500CECCB8 /* bgra.cc */, - D0AF795822C2E26500CECCB8 /* compressed.h */, - D0AF795922C2E26500CECCB8 /* compressed.cc */, - D0AF795A22C2E26500CECCB8 /* bgra.h */, - ); - path = image; - sourceTree = ""; - }; D0AF7C441ED84BB000CD8E0F /* Language Selection */ = { isa = PBXGroup; children = ( @@ -3086,19 +2845,6 @@ name = "Peer Selection"; sourceTree = ""; }; - D0D748041E7AF62000F4B1F6 /* Stickers */ = { - isa = PBXGroup; - children = ( - D0D748051E7AF63800F4B1F6 /* StickerPackPreviewController.swift */, - D0D748071E7AF64400F4B1F6 /* StickerPackPreviewControllerNode.swift */, - D0D7480E1E7B1BD600F4B1F6 /* StickerPackPreviewGridItem.swift */, - D0BE383B1E7C3E51000079AF /* StickerPreviewController.swift */, - D0BE931A1E92DFBA00DCC1E6 /* StickerPreviewControllerNode.swift */, - D03AA4E4202DF8840056C405 /* StickerPreviewPeekContent.swift */, - ); - name = Stickers; - sourceTree = ""; - }; D0DC35481DE366B4000195EB /* Commands */ = { isa = PBXGroup; children = ( @@ -3183,15 +2929,6 @@ name = "Vertical List"; sourceTree = ""; }; - D0E6521D1E3A2305004EEA91 /* Items */ = { - isa = PBXGroup; - children = ( - D003702D1DA43052004308D3 /* ItemListAvatarAndNameItem.swift */, - D0B843DA1DAAB138005F29E1 /* ItemListPeerActionItem.swift */, - ); - name = Items; - sourceTree = ""; - }; D0E7A1BB1D8C17EB00C37A6F /* Chat History Node */ = { isa = PBXGroup; children = ( @@ -3332,7 +3069,6 @@ D0FE4DE31F0AEBB900E8A0B3 /* SharedVideoContextManager.swift */, D09E637D1F0E8C66003444CD /* Shared Media Player */, D0D03AE61DECB0D200220C46 /* Audio Recorder */, - 0919546D229458E900E11046 /* Animated Stickers */, D0F69E9D1D6B8E240046BCD6 /* Resources */, D0177B831DFB095000A5083A /* FileMediaResourceStatus.swift */, D0ADF965212E05A300310BBC /* TonePlayer.swift */, @@ -3345,7 +3081,6 @@ isa = PBXGroup; children = ( D0F69DBF1D6B89AE0046BCD6 /* Nodes */, - D0F69DD31D6B8A160046BCD6 /* Controllers */, D0E7A1BB1D8C17EB00C37A6F /* Chat History Node */, ); name = Components; @@ -3354,12 +3089,9 @@ D0F69DBF1D6B89AE0046BCD6 /* Nodes */ = { isa = PBXGroup; children = ( - D01776B61F1D6CCF0044446D /* Radial Status */, - D0F69DCA1D6B89F20046BCD6 /* Search */, D0477D191F617E4B00412B44 /* Video */, D0F69DC41D6B89E10046BCD6 /* RadialProgressNode.swift */, D00C7CE51E378FD00080C3D5 /* RadialTimeoutNode.swift */, - D0943AF51FDAAE7E001522CC /* MultipleAvatarsNode.swift */, D0568AAC1DF198130022E7DA /* AudioWaveformNode.swift */, D0BC38621E3F9EFA0044D6FE /* EditableTokenListNode.swift */, D0B2F76B2052A7D600D3BFB9 /* SinglePhoneInputNode.swift */, @@ -3370,27 +3102,11 @@ name = Nodes; sourceTree = ""; }; - D0F69DCA1D6B89F20046BCD6 /* Search */ = { - isa = PBXGroup; - children = ( - ); - name = Search; - sourceTree = ""; - }; - D0F69DD31D6B8A160046BCD6 /* Controllers */ = { - isa = PBXGroup; - children = ( - D01B27931E38F3920022A4C0 /* Item List */, - ); - name = Controllers; - sourceTree = ""; - }; D0F69DE61D6B8A4E0046BCD6 /* Controllers */ = { isa = PBXGroup; children = ( D0F69DE71D6B8A590046BCD6 /* Authorization */, D05174C11EAE582A00A1BF36 /* Root */, - D017494F1E1067C00057C89A /* Hashtag Search */, D0F69E0D1D6B8AB90046BCD6 /* Chat */, D04281F2200E5A70009DDE36 /* Chat Recent Actions */, D00DE6961E8E8E21003F0D76 /* Share */, @@ -3432,7 +3148,6 @@ D0F69E111D6B8ACF0046BCD6 /* ChatHistoryEntry.swift */, D0F69E121D6B8ACF0046BCD6 /* ChatHistoryLocation.swift */, D0D268681D78865300C422DA /* ChatAvatarNavigationNode.swift */, - D0943AFD1FDAE454001522CC /* ChatMultipleAvatarsNavigationNode.swift */, D0DE76FF1D92F1EB002B8809 /* ChatTitleView.swift */, D02383761DDF16B2004018B6 /* ChatControllerTitlePanelNodeContainer.swift */, D00C7CE81E379B820080C3D5 /* ChatSecretAutoremoveTimerActionSheet.swift */, @@ -3559,7 +3274,6 @@ D0575AF81EA0FD94006F2541 /* Avatar Gallery */, D0EEE99F2165583B001292A6 /* Document */, D07827CC1E03F32C00071108 /* Instant Page */, - D0D748041E7AF62000F4B1F6 /* Stickers */, D020A9D81FEAE611008C66F7 /* Player */, D01C06AD1FBB45ED001561AB /* Join Link Preview */, D081E102217F57B2003CD921 /* Language Link Preview */, @@ -3776,57 +3490,21 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D0AF798622C2E26500CECCB8 /* weights_quantize.h in Headers */, - D0AF799022C2E26500CECCB8 /* bgra.h in Headers */, - D01590C222BDAEBC0017C33E /* TypeDefinitions.h in Headers */, D0AE303622B1D3620058D3BC /* TGBridgeAudioDecoder.h in Headers */, D0208AD51FA33D14001F0D5F /* RaiseToListenActivator.h in Headers */, D00817DA22B47A14008A895F /* TGPresentationAutoNightPreferences.h in Headers */, - D0AF797D22C2E26500CECCB8 /* endpoints_min_max.h in Headers */, - D0AF797222C2E26500CECCB8 /* misc.h in Headers */, - D0AF798222C2E26500CECCB8 /* bitmanip.h in Headers */, - D0AF797C22C2E26500CECCB8 /* constants.h in Headers */, D00817E022B47A14008A895F /* UIImage+ImageEffects.h in Headers */, - D01590BA22BDAEBC0017C33E /* ColorVec.h in Headers */, - D0AF797422C2E26500CECCB8 /* matrix.h in Headers */, - D0AF79A322C2E36400CECCB8 /* astc.h in Headers */, D08803C51F6064CF00DD7951 /* TelegramUI.h in Headers */, D0EB42001F30ED4F00838FE6 /* LegacyImageProcessors.h in Headers */, - D01590AE22BD58AD0017C33E /* YUV.h in Headers */, D008177B22B46B7E008A895F /* TGContactModel.h in Headers */, - D0AF797922C2E26500CECCB8 /* endpoints_bounding_box.h in Headers */, D00701A12029F6D0006B9E34 /* TGMimeTypeMap.h in Headers */, - D0AF798A22C2E26500CECCB8 /* endpoints_quantize.h in Headers */, - D0AF797322C2E26500CECCB8 /* tables_data_size.h in Headers */, - D0AF797E22C2E26500CECCB8 /* dcheck.h in Headers */, - D0AF797F22C2E26500CECCB8 /* weights_quantize_table.h in Headers */, D0208AD91FA34017001F0D5F /* DeviceProximityManager.h in Headers */, - D0AF798B22C2E26500CECCB8 /* store_block.h in Headers */, - D0AF797122C2E26500CECCB8 /* range.h in Headers */, - D0AF797722C2E26500CECCB8 /* data_size.h in Headers */, D0AE303722B1D3620058D3BC /* TGBridgeAudioEncoder.h in Headers */, - D0AF798422C2E26500CECCB8 /* compress_block.h in Headers */, - D0AF798E22C2E26500CECCB8 /* compressed.h in Headers */, D00817CD22B47A14008A895F /* TGAutoDownloadPreferences.h in Headers */, - D01590C122BDAEBC0017C33E /* DDSImage.h in Headers */, - D0AF798122C2E26500CECCB8 /* endpoints_principal_components.h in Headers */, D008177C22B46B7E008A895F /* TGItemProviderSignals.h in Headers */, - D0AF798322C2E26500CECCB8 /* endpoints.h in Headers */, - D01590BB22BDAEBC0017C33E /* BC1Compression.h in Headers */, - D01590BC22BDAEBC0017C33E /* BMPImage.h in Headers */, - D0AF797522C2E26500CECCB8 /* colors.h in Headers */, - D0AF797B22C2E26500CECCB8 /* tables_integer_sequence_encoding.h in Headers */, - D0AF798C22C2E26500CECCB8 /* color.h in Headers */, D00817D722B47A14008A895F /* TGBridgeServer.h in Headers */, - D0AF796F22C2E26500CECCB8 /* compress_texture.h in Headers */, - D0AF798922C2E26500CECCB8 /* vector.h in Headers */, D00817CE22B47A14008A895F /* TGProxyItem.h in Headers */, - D01590C922BE62C40017C33E /* TextureCompression.h in Headers */, - D0AF797A22C2E26500CECCB8 /* tables_color_quantization.h in Headers */, D008177A22B46B7E008A895F /* TGShareLocationSignals.h in Headers */, - D0AF798522C2E26500CECCB8 /* endpoints_encode.h in Headers */, - D01590BF22BDAEBC0017C33E /* Image.h in Headers */, - D0AF797022C2E26500CECCB8 /* integer_sequence_encoding.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3987,7 +3665,6 @@ D0E9BA981F056F4C00F079A4 /* stp_card_applepay_template@3x.png in Resources */, D0E9BAA51F056F4C00F079A4 /* stp_card_form_applepay@2x.png in Resources */, D0E9BAB81F056F4C00F079A4 /* stp_card_visa_template@3x.png in Resources */, - D0AF797822C2E26500CECCB8 /* meson.build in Resources */, D0E9BA9B1F056F4C00F079A4 /* stp_card_cvc_amex@2x.png in Resources */, D0E9BAB61F056F4C00F079A4 /* stp_card_visa@3x.png in Resources */, D0E9BAA61F056F4C00F079A4 /* stp_card_form_applepay@3x.png in Resources */, @@ -4022,7 +3699,6 @@ D04281F6200E5AC2009DDE36 /* ChatRecentActionsControllerNode.swift in Sources */, 09DD5D5221ED175300D7007A /* WallpaperColorPickerNode.swift in Sources */, D0B2F76820528E3D00D3BFB9 /* UserInfoEditingPhoneActionItem.swift in Sources */, - D0AF798D22C2E26500CECCB8 /* bgra.cc in Sources */, 09F79A0321C8225600820234 /* WebSearchVideoGalleryItem.swift in Sources */, D01848E821A03BDA00B6DEBD /* ChatSearchState.swift in Sources */, D0208ADC1FA346A4001F0D5F /* RaiseToListen.swift in Sources */, @@ -4042,7 +3718,6 @@ D00817D522B47A14008A895F /* ApplicationShortcutItem.swift in Sources */, D077C5C122B59A800097D617 /* ApplicationContext.swift in Sources */, D0EC6CC71EB9F58800EBF1C3 /* PeerNotificationSoundStrings.swift in Sources */, - D0AF798F22C2E26500CECCB8 /* compressed.cc in Sources */, D081E108217F583F003CD921 /* LanguageLinkPreviewContentNode.swift in Sources */, D0EC6CC91EB9F58800EBF1C3 /* ConvertToWebP.swift in Sources */, D09E637F1F0E8C9F003444CD /* PeerMessagesMediaPlaylist.swift in Sources */, @@ -4061,7 +3736,6 @@ D0380DB8204EE0A5000414AB /* ChatInstantVideoMessageDurationNode.swift in Sources */, D0EC6CDC1EB9F58800EBF1C3 /* TelegramAccountAuxiliaryMethods.swift in Sources */, D0642EFC1F3E1E7B00792790 /* ChatHistoryNavigationButtons.swift in Sources */, - D03AA4E5202DF8840056C405 /* StickerPreviewPeekContent.swift in Sources */, D025402322E1C92D00AC0195 /* ChatSlowmodeItem.swift in Sources */, D05D8B3F2192FC6E0064586F /* LocalizationListControllerNode.swift in Sources */, D0AA840C1FEB2BA3005C6E91 /* OverlayPlayerControlsNode.swift in Sources */, @@ -4091,7 +3765,6 @@ 0910B0EF21FA532D00F8F87D /* WallpaperResources.swift in Sources */, 09E4A807223D4B860038140F /* AccountUtils.swift in Sources */, D069F5D0212700B90000565A /* StickerPanePeerSpecificSetupGridItem.swift in Sources */, - D01590C022BDAEBC0017C33E /* BC1Compression.cpp in Sources */, D06018B522F3659900796784 /* ChatTextFormat.swift in Sources */, D0750C8322B2E4EE00BE5F6E /* SharedNotificationManager.swift in Sources */, D0EC6D041EB9F58800EBF1C3 /* opusenc.m in Sources */, @@ -4129,18 +3802,15 @@ 09749BCD21F23139008FDDE9 /* WallpaperGalleryDecorationNode.swift in Sources */, 09EDAD26220D30980012A50B /* AutodownloadConnectionTypeController.swift in Sources */, D05D8B3A2192FC460064586F /* LocalizationListController.swift in Sources */, - D0943AFE1FDAE454001522CC /* ChatMultipleAvatarsNavigationNode.swift in Sources */, D0B21B15220D85DD003F741D /* TabBarAccountSwitchController.swift in Sources */, D0ADF966212E05A300310BBC /* TonePlayer.swift in Sources */, D007019E2029EFDD006B9E34 /* ICloudResources.swift in Sources */, D0F760DD222034980074F7E5 /* ChannelStatsControllerNode.swift in Sources */, - D01590A622BD460C0017C33E /* MetalAnimationRenderer.swift in Sources */, D0EC6D251EB9F58800EBF1C3 /* FetchCachedRepresentations.swift in Sources */, D0EC6D261EB9F58800EBF1C3 /* TransformOutgoingMessageMedia.swift in Sources */, D0EC6D271EB9F58800EBF1C3 /* FetchResource.swift in Sources */, D09D88731F86D56B00BEB4C9 /* AuthorizationLayout.swift in Sources */, D0EC6D281EB9F58800EBF1C3 /* MediaResources.swift in Sources */, - D01590C722BE61CB0017C33E /* TextureCompression.cpp in Sources */, D0EC6D291EB9F58800EBF1C3 /* FetchVideoMediaResource.swift in Sources */, 09EDAD2E221164440012A50B /* AutodownloadSizeLimitItem.swift in Sources */, D008177E22B46B7E008A895F /* TGItemProviderSignals.m in Sources */, @@ -4167,7 +3837,6 @@ D0EC6D3B1EB9F58800EBF1C3 /* EditableTokenListNode.swift in Sources */, D0E2CE6C222930540084E3DD /* PrefetchManager.swift in Sources */, D0EB42011F30ED4F00838FE6 /* LegacyImageProcessors.m in Sources */, - D01590C322BDAEBC0017C33E /* BMPImage.cpp in Sources */, D0CE8CE51F6F354400AA2DB0 /* ChatTextInputAccessoryItem.swift in Sources */, D097C26820DD0A1D007BB4B8 /* PeerReportController.swift in Sources */, 09F664C621EB400A00AB7E26 /* ThemeGridSearchContentNode.swift in Sources */, @@ -4223,22 +3892,16 @@ D0EC6D701EB9F58800EBF1C3 /* AuthorizationSequenceCodeEntryControllerNode.swift in Sources */, D0EC6D711EB9F58800EBF1C3 /* AuthorizationSequencePasswordEntryController.swift in Sources */, D0EC6D721EB9F58800EBF1C3 /* AuthorizationSequencePasswordEntryControllerNode.swift in Sources */, - D0AF797622C2E26500CECCB8 /* endpoints_principal_components.cc in Sources */, D0EC6D731EB9F58800EBF1C3 /* AuthorizationSequenceSignUpController.swift in Sources */, D0C12EB01F9A8D1300600BB2 /* ListMessageDateHeader.swift in Sources */, - 091954792294754E00E11046 /* AnimatedStickerUtils.swift in Sources */, D0EC6D741EB9F58800EBF1C3 /* AuthorizationSequenceSignUpControllerNode.swift in Sources */, D0EC6D751EB9F58800EBF1C3 /* TelegramRootController.swift in Sources */, D0F6800A1EE750EE000E5906 /* ChannelBannedMemberController.swift in Sources */, D03AA4DF202DBF6F0056C405 /* ChatContextResultPeekContentNode.swift in Sources */, D00817D622B47A14008A895F /* TGProxyItem.m in Sources */, 0910B0ED21FA178C00F8F87D /* WallpaperPreviewMedia.swift in Sources */, - D0EC6D7F1EB9F58800EBF1C3 /* HashtagSearchController.swift in Sources */, - D0EC6D801EB9F58800EBF1C3 /* HashtagSearchControllerNode.swift in Sources */, D0EC6D811EB9F58800EBF1C3 /* ChatController.swift in Sources */, D0B37C5E1F8D26A8004252DF /* ThemeSettingsChatPreviewItem.swift in Sources */, - D01590A822BD462C0017C33E /* SoftwareAnimationRenderer.swift in Sources */, - D01590BE22BDAEBC0017C33E /* Image.cpp in Sources */, D0EC6D821EB9F58800EBF1C3 /* ChatControllerInteraction.swift in Sources */, D0EC6D831EB9F58800EBF1C3 /* ChatControllerNode.swift in Sources */, D0EC6D841EB9F58800EBF1C3 /* ChatHistoryEntry.swift in Sources */, @@ -4263,7 +3926,6 @@ D0F19F6420E5A15B00EEC860 /* ChatMediaInputPeerSpecificItem.swift in Sources */, D0AEAE252080D6830013176E /* PaneSearchContainerNode.swift in Sources */, D01DBA9B209CC6AD00C64E64 /* ChatLinkPreview.swift in Sources */, - D01590AF22BD58AD0017C33E /* YUV.m in Sources */, D0EC6D901EB9F58900EBF1C3 /* ChatMessageBubbleContentNode.swift in Sources */, D0EC6D911EB9F58900EBF1C3 /* ChatMessageBubbleItemNode.swift in Sources */, D0E8B8BD204479A500605593 /* SecretChatKeyController.swift in Sources */, @@ -4430,7 +4092,6 @@ 090B48C82200BCA8005083FA /* WallpaperUploadManager.swift in Sources */, D0E8B8BB2044780600605593 /* ItemListSecretChatKeyItem.swift in Sources */, D06F31E62135A41C001A0F12 /* ThemeSettingsBrightnessItem.swift in Sources */, - D01590BD22BDAEBC0017C33E /* DDSImage.cpp in Sources */, 09F2158D225CF5BC00AEDF6D /* Pasteboard.swift in Sources */, D0C26D571FDF2388004ABF18 /* OpenChatMessage.swift in Sources */, D00817CA22B47A14008A895F /* WatchRequestHandlers.swift in Sources */, @@ -4439,8 +4100,6 @@ 09B4819523028A8A00D5B32B /* ThemeAccentColorControllerNode.swift in Sources */, D000CABC21F158AD0011B15D /* PrepareSecretThumbnailData.swift in Sources */, D0208AD61FA33D14001F0D5F /* RaiseToListenActivator.m in Sources */, - D0AF798022C2E26500CECCB8 /* compress_block.cc in Sources */, - D0AF798722C2E26500CECCB8 /* compress_texture.cc in Sources */, 09DD88F321BF907C000766BC /* WebSearchRecentQueryItem.swift in Sources */, D04554A421B42982007A6DD9 /* ConfirmPhoneNumberController.swift in Sources */, D07ABBA5202A14BC003671DE /* LegacyImagePicker.swift in Sources */, @@ -4457,16 +4116,10 @@ D00817D922B47A14008A895F /* AppDelegate.swift in Sources */, D0E1199C229808B8008CAE3A /* ChannelDiscussionGroupSetupHeaderItem.swift in Sources */, 091417F221EF4E5D00C8325A /* WallpaperGalleryController.swift in Sources */, - D0EC6E231EB9F58900EBF1C3 /* StickerPackPreviewController.swift in Sources */, - D0EC6E241EB9F58900EBF1C3 /* StickerPackPreviewControllerNode.swift in Sources */, D0FC194D201F82A000FEDBB2 /* OpenResolvedUrl.swift in Sources */, - D0EC6E251EB9F58900EBF1C3 /* StickerPackPreviewGridItem.swift in Sources */, - D0EC6E261EB9F58900EBF1C3 /* StickerPreviewController.swift in Sources */, D00817D422B47A14008A895F /* LegacyUserDataImport.swift in Sources */, - D0EC6E271EB9F58900EBF1C3 /* StickerPreviewControllerNode.swift in Sources */, 09CE95062236D47F00A7D2C3 /* SettingsSearchItem.swift in Sources */, D0AF323A1FB1D8D60097362B /* ChatOverlayNavigationBar.swift in Sources */, - D0943AF61FDAAE7E001522CC /* MultipleAvatarsNode.swift in Sources */, D0EC6E2B1EB9F58900EBF1C3 /* ComposeController.swift in Sources */, 09749BCF21F236F2008FDDE9 /* ModernCheckNode.swift in Sources */, 0940932422E73DFB003846A3 /* ChatSendMessageActionSheetController.swift in Sources */, @@ -4481,18 +4134,13 @@ D0EC6E321EB9F58900EBF1C3 /* CreateGroupController.swift in Sources */, D0EC55A3210231D600D1992C /* SearchPeerMembers.swift in Sources */, D0EC6E331EB9F58900EBF1C3 /* CreateChannelController.swift in Sources */, - D0EC6E351EB9F58900EBF1C3 /* ItemListAvatarAndNameItem.swift in Sources */, D00ACA5A2022897D0045D427 /* ProcessedPeerRestrictionText.swift in Sources */, D04203152037162700490EA5 /* MediaInputPaneTrendingItem.swift in Sources */, - D0EC6E3C1EB9F58900EBF1C3 /* ItemListPeerActionItem.swift in Sources */, D0CE8CE71F6F35A300AA2DB0 /* ChatTextInputPanelState.swift in Sources */, - D0AF796E22C2E26500CECCB8 /* astc.cc in Sources */, D0CE6F70213EEE5000BCD44B /* CreatePasswordController.swift in Sources */, 0940932622E73E12003846A3 /* ChatSendMessageActionSheetControllerNode.swift in Sources */, D00817D022B47A14008A895F /* WakeupManager.swift in Sources */, - D0AF798822C2E26500CECCB8 /* matrix.cc in Sources */, D0E8175920122FE100B82BBB /* ChatRecentActionsFilterController.swift in Sources */, - D08557E722C5FEB90026D6D2 /* AnimatedStickerNode.swift in Sources */, D084023420E295F000065674 /* GroupStickerPackSetupController.swift in Sources */, 0900678D21ED5EA800530762 /* WallpaperColorPanelNode.swift in Sources */, 0957DE2522DE2909001B4D57 /* ThemePreviewControllerNode.swift in Sources */, @@ -4531,7 +4179,6 @@ D0EC6E561EB9F58900EBF1C3 /* UserInfoController.swift in Sources */, D0EC6E571EB9F58900EBF1C3 /* GroupsInCommonController.swift in Sources */, D0EC6E581EB9F58900EBF1C3 /* PeerSelectionController.swift in Sources */, - D01590AB22BD467B0017C33E /* AnimationRenderer.swift in Sources */, D0EC6E591EB9F58900EBF1C3 /* PeerSelectionControllerNode.swift in Sources */, D0AB262921C307D7008F6685 /* ChatMessagePollBubbleContentNode.swift in Sources */, D0F4B0222110972300912B92 /* ContactInfoStrings.swift in Sources */, diff --git a/submodules/TelegramUI/third-party/astc/astc/bitmanip.h b/submodules/TelegramUI/third-party/astc/astc/bitmanip.h deleted file mode 100644 index e117c39e23..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/bitmanip.h +++ /dev/null @@ -1,168 +0,0 @@ -#ifndef ASTC_BITMANIP_H_ -#define ASTC_BITMANIP_H_ - -#include -#include - -#include "dcheck.h" - -inline bool getbit(size_t number, size_t n) { - return (number >> n) & 1; -} - -inline uint8_t getbits(uint8_t number, uint8_t msb, uint8_t lsb) { - int count = msb - lsb + 1; - return static_cast((number >> lsb) & ((1 << count) - 1)); -} - -inline size_t getbits(size_t number, size_t msb, size_t lsb) { - size_t count = msb - lsb + 1; - return (number >> lsb) & (static_cast(1 << count) - 1); -} - -inline void orbits8_ptr(uint8_t* ptr, - size_t bitoffset, - size_t number, - size_t bitcount) { - DCHECK(bitcount <= 8); - DCHECK((number >> bitcount) == 0); - - size_t index = bitoffset / 8; - size_t shift = bitoffset % 8; - - // Depending on the offset we might have to consider two bytes when - // writing, for instance if we are writing 8 bits and the offset is 4, - // then we have to write 4 bits to the first byte (ptr[index]) and 4 bits - // to the second byte (ptr[index+1]). - // - // FIXME: Writing to the last byte when the number of bytes is a multiple of 2 - // will write past the allocated memory. - - uint8_t* p = ptr + index; - size_t mask = number << shift; - - DCHECK((p[0] & mask) == 0); - DCHECK((p[1] & (mask >> 8)) == 0); - - p[0] |= static_cast(mask & 0xFF); - p[1] |= static_cast((mask >> 8) & 0xFF); -} - -inline void orbits16_ptr(uint8_t* ptr, - size_t bitoffset, - size_t number, - size_t bitcount) { - DCHECK(bitcount > 8 && bitcount <= 16); - - size_t index = bitoffset / 8; - size_t shift = bitoffset % 8; - - uint8_t* p = ptr + index; - size_t mask = number << shift; - - p[0] |= static_cast(mask & 0xFF); - p[1] |= static_cast((mask >> 8) & 0xFF); - p[2] |= static_cast((mask >> 16) & 0xFF); - p[3] |= static_cast((mask >> 24) & 0xFF); -} - -inline uint16_t getbytes2(const uint8_t* ptr, size_t byteoffset) { - const uint8_t* p = ptr + byteoffset; - return static_cast((p[1] << 8) | p[0]); -} - -inline void setbytes2(uint8_t* ptr, size_t byteoffset, uint16_t bytes) { - ptr[byteoffset + 0] = static_cast(bytes & 0xFF); - ptr[byteoffset + 1] = static_cast((bytes >> 8) & 0xFF); -} - -inline void split_high_low(uint8_t n, size_t i, uint8_t& high, uint8_t& low) { - DCHECK(i < 8); - - uint8_t low_mask = static_cast((1 << i) - 1); - - low = n & low_mask; - high = static_cast(n >> i); -} - -class bitwriter { - public: - explicit bitwriter(uint8_t* ptr) : ptr_(ptr), bitoffset_(0) { - // assumption that all bits in ptr are zero after the offset - - // writing beyound the bounds of the allocated memory is undefined - // behaviour - } - - // Specialized function that can't write more than 8 bits. - void write8(uint8_t number, size_t bitcount) { - orbits8_ptr(ptr_, bitoffset_, number, bitcount); - - bitoffset_ += bitcount; - } - - size_t offset() const { return bitoffset_; } - - private: - uint8_t* ptr_; - size_t bitoffset_; // in bits -}; - -const uint8_t bit_reverse_table[256] = { - 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, - 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, - 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, - 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, - 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, - 0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, - 0x12, 0x92, 0x52, 0xD2, 0x32, 0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}; - -/** - * Reverse a byte, total function. - */ -inline uint8_t reverse_byte(uint8_t number) { - return bit_reverse_table[number]; -} - -/** - * Reverse a sequence of bytes. - * - * Assumes that the bits written to (using bitwise or) are zero and that they - * will not clash with bits already written to target sequence. That is it is - * possible to write to a non-zero byte as long as the bits that are actually - * written to are zero. - */ -inline void reverse_bytes(const uint8_t* source, - size_t bytecount, - uint8_t* target) { - for (int i = 0; i < static_cast(bytecount); ++i) { - DCHECK((reverse_byte(source[i]) & target[-i]) == 0); - target[-i] = target[-i] | reverse_byte(source[i]); - } -} - -inline void copy_bytes(const uint8_t* source, - size_t bytecount, - uint8_t* target, - size_t bitoffset) { - for (size_t i = 0; i < bytecount; ++i) { - orbits8_ptr(target, bitoffset + i * 8, source[i], 8); - } -} - -#endif // ASTC_BITMANIP_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/colors.h b/submodules/TelegramUI/third-party/astc/astc/colors.h deleted file mode 100644 index 8ec2e3c095..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/colors.h +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef ASTC_COLORS_H_ -#define ASTC_COLORS_H_ - -#include -#include - -#include "misc.h" -#include "vector.h" - -const int APPROX_COLOR_EPSILON = 50; - -union unorm8_t { - struct RgbaColorType { - uint8_t b, g, r, a; - } channels; - uint8_t components[4]; - uint32_t bits; -}; - -union unorm16_t { - struct RgbaColorType { - uint16_t b, g, r, a; - } channels; - uint16_t components[4]; - uint64_t bits; -}; - -inline bool is_greyscale(vec3i_t color) { - // integer equality is transitive - return color.r == color.g && color.g == color.b; -} - -inline int luminance(vec3i_t color) { - return (color.r + color.g + color.b) / 3; -} - -inline bool approx_equal(vec3i_t a, vec3i_t b) { - return quadrance(a - b) <= APPROX_COLOR_EPSILON; -} - -inline vec3i_t clamp_rgb(vec3i_t color) { - vec3i_t result; - result.r = clamp(0, 255, color.r); - result.g = clamp(0, 255, color.g); - result.b = clamp(0, 255, color.b); - return result; -} - -inline vec3f_t clamp_rgb(vec3f_t color) { - vec3f_t result; - result.r = clamp(0.0f, 255.0f, color.r); - result.g = clamp(0.0f, 255.0f, color.g); - result.b = clamp(0.0f, 255.0f, color.b); - return result; -} - -inline bool is_rgb(float color) { - return color >= 0.0f && color <= 255.0f; -} - -inline bool is_rgb(vec3f_t color) { - return is_rgb(color.r) && is_rgb(color.g) && is_rgb(color.b); -} - -inline vec3i_t floor(vec3f_t color) { - vec3i_t result; - result.r = static_cast(floor(color.r)); - result.g = static_cast(floor(color.g)); - result.b = static_cast(floor(color.b)); - return result; -} - -inline vec3i_t round(vec3f_t color) { - vec3i_t result; - result.r = static_cast(round(color.r)); - result.g = static_cast(round(color.g)); - result.b = static_cast(round(color.b)); - return result; -} - -inline vec3i_t to_vec3i(unorm8_t color) { - vec3i_t result; - result.r = color.channels.r; - result.g = color.channels.g; - result.b = color.channels.b; - return result; -} - -inline vec3i_t to_vec3i(vec3f_t color) { - vec3i_t result; - result.r = static_cast(color.r); - result.g = static_cast(color.g); - result.b = static_cast(color.b); - return result; -} - -inline vec3f_t to_vec3f(unorm8_t color) { - vec3f_t result; - result.r = color.channels.r; - result.g = color.channels.g; - result.b = color.channels.b; - return result; -} - -inline vec3f_t to_vec3f(vec3i_t color) { - vec3f_t result; - result.r = static_cast(color.r); - result.g = static_cast(color.g); - result.b = static_cast(color.b); - return result; -} - -inline unorm8_t to_unorm8(vec3i_t color) { - unorm8_t result; - result.channels.r = static_cast(color.r); - result.channels.g = static_cast(color.g); - result.channels.b = static_cast(color.b); - result.channels.a = 255; - return result; -} - -inline unorm16_t unorm8_to_unorm16(unorm8_t c8) { - // (x / 255) * (2^16-1) = x * 65535 / 255 = x * 257 - unorm16_t result; - result.channels.r = static_cast(c8.channels.r * 257); - result.channels.g = static_cast(c8.channels.g * 257); - result.channels.b = static_cast(c8.channels.b * 257); - result.channels.a = static_cast(c8.channels.a * 257); - return result; -} - -#endif // ASTC_COLORS_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/compress_block.cc b/submodules/TelegramUI/third-party/astc/astc/compress_block.cc deleted file mode 100644 index 5bf89e883d..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/compress_block.cc +++ /dev/null @@ -1,155 +0,0 @@ -#include "compress_block.h" - -#include -#include -#include - -#include "colors.h" -#include "constants.h" -#include "data_size.h" -#include "endpoints.h" -#include "endpoints_encode.h" -#include "endpoints_min_max.h" -#include "endpoints_principal_components.h" -#include "integer_sequence_encoding.h" -#include "misc.h" -#include "range.h" -#include "store_block.h" -#include "vector.h" -#include "weights_quantize.h" - -/** - * Write void extent block bits for LDR mode and unused extent coordinates. - */ -void encode_void_extent(vec3i_t color, PhysicalBlock* physical_block) { - void_extent_to_physical(unorm8_to_unorm16(to_unorm8(color)), physical_block); -} - -void encode_luminance(const uint8_t texels[BLOCK_TEXEL_COUNT], - PhysicalBlock* physical_block) { - size_t partition_count = 1; - size_t partition_index = 0; - - color_endpoint_mode_t color_endpoint_mode = CEM_LDR_LUMINANCE_DIRECT; - range_t weight_quant = RANGE_32; - range_t endpoint_quant = - endpoint_quantization(partition_count, weight_quant, color_endpoint_mode); - - uint8_t l0 = 255; - uint8_t l1 = 0; - for (size_t i = 0; i < BLOCK_TEXEL_COUNT; ++i) { - l0 = std::min(l0, texels[i]); - l1 = std::max(l1, texels[i]); - } - - uint8_t endpoint_unquantized[2]; - uint8_t endpoint_quantized[2]; - encode_luminance_direct(endpoint_quant, l0, l1, endpoint_quantized, - endpoint_unquantized); - - uint8_t weights_quantized[BLOCK_TEXEL_COUNT]; - calculate_quantized_weights_luminance( - texels, weight_quant, endpoint_unquantized[0], endpoint_unquantized[1], - weights_quantized); - - uint8_t endpoint_ise[MAXIMUM_ENCODED_COLOR_ENDPOINT_BYTES] = {0}; - integer_sequence_encode(endpoint_quantized, 2, RANGE_256, endpoint_ise); - - uint8_t weights_ise[MAXIMUM_ENCODED_WEIGHT_BYTES + 1] = {0}; - integer_sequence_encode(weights_quantized, BLOCK_TEXEL_COUNT, RANGE_32, - weights_ise); - - symbolic_to_physical(color_endpoint_mode, endpoint_quant, weight_quant, - partition_count, partition_index, endpoint_ise, - weights_ise, physical_block); -} - -void encode_rgb_single_partition(const unorm8_t texels[BLOCK_TEXEL_COUNT], - vec3f_t e0, - vec3f_t e1, - PhysicalBlock* physical_block) { - size_t partition_index = 0; - size_t partition_count = 1; - - color_endpoint_mode_t color_endpoint_mode = CEM_LDR_RGB_DIRECT; - range_t weight_quant = RANGE_12; - range_t endpoint_quant = - endpoint_quantization(partition_count, weight_quant, color_endpoint_mode); - - vec3i_t endpoint_unquantized[2]; - uint8_t endpoint_quantized[6]; - encode_rgb_direct(endpoint_quant, round(e0), round(e1), endpoint_quantized, - endpoint_unquantized); - - uint8_t weights_quantized[BLOCK_TEXEL_COUNT]; - calculate_quantized_weights_rgb(texels, weight_quant, endpoint_unquantized[0], - endpoint_unquantized[1], weights_quantized); - - uint8_t endpoint_ise[MAXIMUM_ENCODED_COLOR_ENDPOINT_BYTES] = {0}; - integer_sequence_encode(endpoint_quantized, 6, endpoint_quant, endpoint_ise); - - uint8_t weights_ise[MAXIMUM_ENCODED_WEIGHT_BYTES + 1] = {0}; - integer_sequence_encode(weights_quantized, BLOCK_TEXEL_COUNT, weight_quant, - weights_ise); - - symbolic_to_physical(color_endpoint_mode, endpoint_quant, weight_quant, - partition_count, partition_index, endpoint_ise, - weights_ise, physical_block); -} - -bool is_solid(const unorm8_t texels[BLOCK_TEXEL_COUNT], - size_t count, - unorm8_t* color) { - for (size_t i = 0; i < count; ++i) { - if (!approx_equal(to_vec3i(texels[i]), to_vec3i(texels[0]))) { - return false; - } - } - - // TODO: Calculate average color? - *color = texels[0]; - return true; -} - -bool is_greyscale(const unorm8_t texels[BLOCK_TEXEL_COUNT], - size_t count, - uint8_t luminances[BLOCK_TEXEL_COUNT]) { - for (size_t i = 0; i < count; ++i) { - vec3i_t color = to_vec3i(texels[i]); - luminances[i] = static_cast(luminance(color)); - vec3i_t lum(luminances[i], luminances[i], luminances[i]); - if (!approx_equal(color, lum)) { - return false; - } - } - - return true; -} - -void compress_block(const unorm8_t texels[BLOCK_TEXEL_COUNT], - PhysicalBlock* physical_block) { - { - unorm8_t color; - if (is_solid(texels, BLOCK_TEXEL_COUNT, &color)) { - encode_void_extent(to_vec3i(color), physical_block); - /* encode_void_extent(vec3i_t(0, 0, 0), physical_block); */ - return; - } - } - - { - uint8_t luminances[BLOCK_TEXEL_COUNT]; - if (is_greyscale(texels, BLOCK_TEXEL_COUNT, luminances)) { - encode_luminance(luminances, physical_block); - /* encode_void_extent(vec3i_t(255, 0, 0), physical_block); */ - return; - } - } - - vec3f_t k, m; - principal_component_analysis_block(texels, k, m); - vec3f_t e0, e1; - find_min_max_block(texels, k, m, e0, e1); - encode_rgb_single_partition(texels, e0, e1, physical_block); - /* encode_void_extent(vec3i_t(0, 255, 0), physical_block); */ -} diff --git a/submodules/TelegramUI/third-party/astc/astc/compress_block.h b/submodules/TelegramUI/third-party/astc/astc/compress_block.h deleted file mode 100644 index 955c312840..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/compress_block.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef ASTC_COMPRESS_BLOCK_H_ -#define ASTC_COMPRESS_BLOCK_H_ - -#include "constants.h" - -union unorm8_t; -struct PhysicalBlock; - -void compress_block(const unorm8_t texels[BLOCK_TEXEL_COUNT], - PhysicalBlock* physical_block); - -#endif // ASTC_COMPRESS_BLOCK_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/compress_texture.cc b/submodules/TelegramUI/third-party/astc/astc/compress_texture.cc deleted file mode 100644 index df89e8eff9..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/compress_texture.cc +++ /dev/null @@ -1,68 +0,0 @@ -#include - -#include "colors.h" -#include "compress_block.h" -#include "compress_texture.h" -#include "constants.h" -#include "store_block.h" - -namespace { -void fetch_image_block(const unorm8_t* source, - size_t image_width, - size_t xpos, - size_t ypos, - unorm8_t texels[BLOCK_TEXEL_COUNT]) { - size_t topleft_index = ypos * image_width + xpos; - - const unorm8_t* row0 = source + topleft_index; - const unorm8_t* row1 = row0 + image_width; - const unorm8_t* row2 = row0 + 2 * image_width; - const unorm8_t* row3 = row0 + 3 * image_width; - - texels[0] = row0[0]; - texels[1] = row0[1]; - texels[2] = row0[2]; - texels[3] = row0[3]; - - texels[4] = row1[0]; - texels[5] = row1[1]; - texels[6] = row1[2]; - texels[7] = row1[3]; - - texels[8] = row2[0]; - texels[9] = row2[1]; - texels[10] = row2[2]; - texels[11] = row2[3]; - - texels[12] = row3[0]; - texels[13] = row3[1]; - texels[14] = row3[2]; - texels[15] = row3[3]; -} - -PhysicalBlock physical_block_zero = {0}; -} // namespace - -void compress_texture(const uint8_t* src, - uint8_t* dst, - int width_int, - int height_int) { - const unorm8_t* data = reinterpret_cast(src); - - size_t width = static_cast(width_int); - size_t height = static_cast(height_int); - - PhysicalBlock* dst_re = reinterpret_cast(dst); - - for (size_t ypos = 0; ypos < height; ypos += BLOCK_WIDTH) { - for (size_t xpos = 0; xpos < width; xpos += BLOCK_HEIGHT) { - unorm8_t texels[BLOCK_TEXEL_COUNT]; - fetch_image_block(data, width, xpos, ypos, texels); - - *dst_re = physical_block_zero; - compress_block(texels, dst_re); - - ++dst_re; - } - } -} diff --git a/submodules/TelegramUI/third-party/astc/astc/compress_texture.h b/submodules/TelegramUI/third-party/astc/astc/compress_texture.h deleted file mode 100644 index fe6f0b9398..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/compress_texture.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef ASTC_COMPRESS_TEXTURE_H_ -#define ASTC_COMPRESS_TEXTURE_H_ - -#include - -/** - * Compress an texture with the ASTC format. - * - * @param src The source data, width*height*4 bytes with BGRA ordering. - * @param dst The output, width*height bytes. - * @param width The width of the input texture. - * @param height The height of the input texture. - */ -void compress_texture(const uint8_t* src, uint8_t* dst, int width, int height); - -#endif // ASTC_COMPRESS_TEXTURE_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/constants.h b/submodules/TelegramUI/third-party/astc/astc/constants.h deleted file mode 100644 index 9e3a73cd21..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/constants.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ASTC_CONSTANTS_H_ -#define ASTC_CONSTANTS_H_ - -#include - -const size_t BLOCK_WIDTH = 4; -const size_t BLOCK_HEIGHT = 4; -const size_t BLOCK_TEXEL_COUNT = BLOCK_WIDTH * BLOCK_HEIGHT; -const size_t BLOCK_BYTES = 16; - -const size_t MAXIMUM_ENCODED_WEIGHT_BITS = 96; -const size_t MAXIMUM_ENCODED_WEIGHT_BYTES = 12; - -const size_t MAXIMUM_ENCODED_COLOR_ENDPOINT_BYTES = 12; - -const size_t MAX_ENDPOINT_VALUE_COUNT = 18; - -#endif // ASTC_CONSTANTS_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/data_size.h b/submodules/TelegramUI/third-party/astc/astc/data_size.h deleted file mode 100644 index d99ce9b016..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/data_size.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef ASTC_DATA_SIZE_H_ -#define ASTC_DATA_SIZE_H_ - -#include -#include - -#include "dcheck.h" -#include "endpoints.h" -#include "range.h" -#include "tables_data_size.h" - -range_t endpoint_quantization(size_t partitions, - range_t weight_quant, - color_endpoint_mode_t endpoint_mode) { - int8_t ce_range = - color_endpoint_range_table[partitions - 1][weight_quant][endpoint_mode]; - DCHECK(ce_range >= 0 && ce_range <= RANGE_MAX); - return static_cast(ce_range); -} - -#endif // ASTC_DATA_SIZE_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/dcheck.h b/submodules/TelegramUI/third-party/astc/astc/dcheck.h deleted file mode 100644 index 164bab32b6..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/dcheck.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ASTC_DCHECK_H_ -#define ASTC_DCHECK_H_ - -#include -#define DCHECK(x) assert(x) - -#endif // ASTC_DCHECK_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/endpoints.h b/submodules/TelegramUI/third-party/astc/astc/endpoints.h deleted file mode 100644 index 5d1032b82d..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/endpoints.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef ASTC_ENDPOINTS_H_ -#define ASTC_ENDPOINTS_H_ - -enum color_endpoint_mode_t { - CEM_LDR_LUMINANCE_DIRECT = 0, - CEM_LDR_LUMINANCE_BASE_OFFSET = 1, - CEM_HDR_LUMINANCE_LARGE_RANGE = 2, - CEM_HDR_LUMINANCE_SMALL_RANGE = 3, - CEM_LDR_LUMINANCE_ALPHA_DIRECT = 4, - CEM_LDR_LUMINANCE_ALPHA_BASE_OFFSET = 5, - CEM_LDR_RGB_BASE_SCALE = 6, - CEM_HDR_RGB_BASE_SCALE = 7, - CEM_LDR_RGB_DIRECT = 8, - CEM_LDR_RGB_BASE_OFFSET = 9, - CEM_LDR_RGB_BASE_SCALE_PLUS_TWO_ALPHA = 10, - CEM_HDR_RGB = 11, - CEM_LDR_RGBA_DIRECT = 12, - CEM_LDR_RGBA_BASE_OFFSET = 13, - CEM_HDR_RGB_LDR_ALPHA = 14, - CEM_HDR_RGB_HDR_ALPHA = 15, - CEM_MAX = 16 -}; - -#endif // ASTC_ENDPOINTS_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/endpoints_bounding_box.h b/submodules/TelegramUI/third-party/astc/astc/endpoints_bounding_box.h deleted file mode 100644 index ae769f80d2..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/endpoints_bounding_box.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef ASTC_ENDPOINTS_BOUNDING_BOX_H_ -#define ASTC_ENDPOINTS_BOUNDING_BOX_H_ - -#include - -#include "astc/colors.h" -#include "astc/constants.h" -#include "astc/misc.h" -#include "astc/vector.h" - -void bounding_box(const unorm8_t* texels, - size_t count, - vec3i_t& e0, - vec3i_t& e1) { - vec3i_t a(255, 255, 255); - vec3i_t b(0, 0, 0); - for (size_t i = 0; i < count; ++i) { - vec3i_t t = to_vec3i(texels[i]); - a = vecmin(a, t); - b = vecmax(b, t); - } - e0 = a; - e1 = b; -} - -void bounding_box_block(const unorm8_t texels[BLOCK_TEXEL_COUNT], - vec3i_t& e0, - vec3i_t& e1) { - bounding_box(texels, BLOCK_TEXEL_COUNT, e0, e1); -} - -#endif // ASTC_ENDPOINTS_BOUNDING_BOX_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/endpoints_encode.h b/submodules/TelegramUI/third-party/astc/astc/endpoints_encode.h deleted file mode 100644 index 1a3bb9d557..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/endpoints_encode.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef ASTC_ENDPOINTS_ENCODE_H_ -#define ASTC_ENDPOINTS_ENCODE_H_ - -#include - -#include "endpoints_quantize.h" -#include "range.h" -#include "vector.h" - -int color_channel_sum(vec3i_t color) { - return color.r + color.g + color.b; -} - -void encode_luminance_direct(range_t endpoint_quant, - int v0, - int v1, - uint8_t endpoint_unquantized[2], - uint8_t endpoint_quantized[2]) { - endpoint_quantized[0] = quantize_color(endpoint_quant, v0); - endpoint_quantized[1] = quantize_color(endpoint_quant, v1); - endpoint_unquantized[0] = - unquantize_color(endpoint_quant, endpoint_quantized[0]); - endpoint_unquantized[1] = - unquantize_color(endpoint_quant, endpoint_quantized[1]); -} - -void encode_rgb_direct(range_t endpoint_quant, - vec3i_t e0, - vec3i_t e1, - uint8_t endpoint_quantized[6], - vec3i_t endpoint_unquantized[2]) { - vec3i_t e0q = quantize_color(endpoint_quant, e0); - vec3i_t e1q = quantize_color(endpoint_quant, e1); - vec3i_t e0u = unquantize_color(endpoint_quant, e0q); - vec3i_t e1u = unquantize_color(endpoint_quant, e1q); - - // ASTC uses a different blue contraction encoding when the sum of values for - // the first endpoint is larger than the sum of values in the second - // endpoint. Sort the endpoints to ensure that the normal encoding is used. - if (color_channel_sum(e0u) > color_channel_sum(e1u)) { - endpoint_quantized[0] = static_cast(e1q.r); - endpoint_quantized[1] = static_cast(e0q.r); - endpoint_quantized[2] = static_cast(e1q.g); - endpoint_quantized[3] = static_cast(e0q.g); - endpoint_quantized[4] = static_cast(e1q.b); - endpoint_quantized[5] = static_cast(e0q.b); - - endpoint_unquantized[0] = e1u; - endpoint_unquantized[1] = e0u; - } else { - endpoint_quantized[0] = static_cast(e0q.r); - endpoint_quantized[1] = static_cast(e1q.r); - endpoint_quantized[2] = static_cast(e0q.g); - endpoint_quantized[3] = static_cast(e1q.g); - endpoint_quantized[4] = static_cast(e0q.b); - endpoint_quantized[5] = static_cast(e1q.b); - - endpoint_unquantized[0] = e0u; - endpoint_unquantized[1] = e1u; - } -} - -#endif // ASTC_ENDPOINTS_ENCODE_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/endpoints_min_max.h b/submodules/TelegramUI/third-party/astc/astc/endpoints_min_max.h deleted file mode 100644 index 0614062c8f..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/endpoints_min_max.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef ASTC_ENDPOINTS_MIN_MAX_H_ -#define ASTC_ENDPOINTS_MIN_MAX_H_ - -#include -#include - -#include "colors.h" -#include "constants.h" -#include "dcheck.h" -#include "misc.h" -#include "vector.h" - -void find_min_max(const unorm8_t texels[BLOCK_TEXEL_COUNT], - size_t count, - vec3f_t line_k, - vec3f_t line_m, - vec3f_t& e0, - vec3f_t& e1) { - DCHECK(count <= BLOCK_TEXEL_COUNT); - DCHECK(approx_equal(quadrance(line_k), 1.0, 0.0001f)); - - float a, b; - { - float t = dot(to_vec3f(texels[0]) - line_m, line_k); - a = t; - b = t; - } - - for (size_t i = 1; i < count; ++i) { - float t = dot(to_vec3f(texels[i]) - line_m, line_k); - a = std::min(a, t); - b = std::max(b, t); - } - - e0 = clamp_rgb(line_k * a + line_m); - e1 = clamp_rgb(line_k * b + line_m); -} - -void find_min_max_block(const unorm8_t texels[BLOCK_TEXEL_COUNT], - vec3f_t line_k, - vec3f_t line_m, - vec3f_t& e0, - vec3f_t& e1) { - find_min_max(texels, BLOCK_TEXEL_COUNT, line_k, line_m, e0, e1); -} - -#endif // ASTC_ENDPOINTS_MIN_MAX_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.cc b/submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.cc deleted file mode 100644 index 9ab692b4fb..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.cc +++ /dev/null @@ -1,59 +0,0 @@ -#include - -#include "colors.h" -#include "constants.h" -#include "dcheck.h" -#include "endpoints_principal_components.h" -#include "matrix.h" -#include "vector.h" - -vec3f_t mean(const unorm8_t texels[BLOCK_TEXEL_COUNT], size_t count) { - vec3i_t sum(0, 0, 0); - for (size_t i = 0; i < count; ++i) { - sum = sum + to_vec3i(texels[i]); - } - - return to_vec3f(sum) / static_cast(count); -} - -void subtract(const unorm8_t texels[BLOCK_TEXEL_COUNT], - size_t count, - vec3f_t v, - vec3f_t output[BLOCK_TEXEL_COUNT]) { - for (size_t i = 0; i < count; ++i) { - output[i] = to_vec3f(texels[i]) - v; - } -} - -mat3x3f_t covariance(const vec3f_t m[BLOCK_TEXEL_COUNT], size_t count) { - mat3x3f_t cov; - for (size_t i = 0; i < 3; ++i) { - for (size_t j = 0; j < 3; ++j) { - float s = 0; - for (size_t k = 0; k < count; ++k) { - s += m[k].components[i] * m[k].components[j]; - } - cov.at(i, j) = s / static_cast(count - 1); - } - } - - return cov; -} - -void principal_component_analysis(const unorm8_t texels[BLOCK_TEXEL_COUNT], - size_t count, - vec3f_t& line_k, - vec3f_t& line_m) { - // Since we are working with fixed sized blocks count we can cap count. This - // avoids dynamic allocation. - DCHECK(count <= BLOCK_TEXEL_COUNT); - - line_m = mean(texels, count); - - vec3f_t n[BLOCK_TEXEL_COUNT]; - subtract(texels, count, line_m, n); - - mat3x3f_t w = covariance(n, count); - - eigen_vector(w, line_k); -} diff --git a/submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.h b/submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.h deleted file mode 100644 index 67a64f7f86..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/endpoints_principal_components.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef ASTC_ENDPOINTS_PRINCIPAL_COMPONENTS_H_ -#define ASTC_ENDPOINTS_PRINCIPAL_COMPONENTS_H_ - -#include - -#include "colors.h" -#include "constants.h" -#include "vector.h" - -void principal_component_analysis(const unorm8_t texels[BLOCK_TEXEL_COUNT], - size_t count, - vec3f_t& line_k, - vec3f_t& line_m); - -inline void principal_component_analysis_block( - const unorm8_t texels[BLOCK_TEXEL_COUNT], - vec3f_t& line_k, - vec3f_t& line_m) { - principal_component_analysis(texels, BLOCK_TEXEL_COUNT, line_k, line_m); -} - -#endif // ASTC_ENDPOINTS_PRINCIPAL_COMPONENTS_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/endpoints_quantize.h b/submodules/TelegramUI/third-party/astc/astc/endpoints_quantize.h deleted file mode 100644 index 9dd12c128a..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/endpoints_quantize.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef ASTC_ENDPOINTS_QUANTIZE_H_ -#define ASTC_ENDPOINTS_QUANTIZE_H_ - -#include - -#include "dcheck.h" -#include "range.h" -#include "tables_color_quantization.h" -#include "vector.h" - -uint8_t quantize_color(range_t quant, int c) { - DCHECK(c >= 0 && c <= 255); - return color_quantize_table[quant][c]; -} - -vec3i_t quantize_color(range_t quant, vec3i_t c) { - vec3i_t result; - result.r = color_quantize_table[quant][c.r]; - result.g = color_quantize_table[quant][c.g]; - result.b = color_quantize_table[quant][c.b]; - return result; -} - -uint8_t unquantize_color(range_t quant, int c) { - DCHECK(c >= 0 && c <= 255); - return color_unquantize_table[quant][c]; -} - -vec3i_t unquantize_color(range_t quant, vec3i_t c) { - vec3i_t result; - result.r = color_unquantize_table[quant][c.r]; - result.g = color_unquantize_table[quant][c.g]; - result.b = color_unquantize_table[quant][c.b]; - return result; -} - -#endif // ASTC_ENDPOINTS_QUANTIZE_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/integer_sequence_encoding.h b/submodules/TelegramUI/third-party/astc/astc/integer_sequence_encoding.h deleted file mode 100644 index 4044e88b46..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/integer_sequence_encoding.h +++ /dev/null @@ -1,212 +0,0 @@ -#ifndef ASTC_INTEGER_SEQUENCE_ENCODING_H_ -#define ASTC_INTEGER_SEQUENCE_ENCODING_H_ - -#include -#include - -#include "bitmanip.h" -#include "dcheck.h" -#include "tables_integer_sequence_encoding.h" -#include "range.h" - -/** - * Table that describes the number of trits or quints along with bits required - * for storing each range. - */ -const uint8_t bits_trits_quints_table[RANGE_MAX][3] = { - {1, 0, 0}, // RANGE_2 - {0, 1, 0}, // RANGE_3 - {2, 0, 0}, // RANGE_4 - {0, 0, 1}, // RANGE_5 - {1, 1, 0}, // RANGE_6 - {3, 0, 0}, // RANGE_8 - {1, 0, 1}, // RANGE_10 - {2, 1, 0}, // RANGE_12 - {4, 0, 0}, // RANGE_16 - {2, 0, 1}, // RANGE_20 - {3, 1, 0}, // RANGE_24 - {5, 0, 0}, // RANGE_32 - {3, 0, 1}, // RANGE_40 - {4, 1, 0}, // RANGE_48 - {6, 0, 0}, // RANGE_64 - {4, 0, 1}, // RANGE_80 - {5, 1, 0}, // RANGE_96 - {7, 0, 0}, // RANGE_128 - {5, 0, 1}, // RANGE_160 - {6, 1, 0}, // RANGE_192 - {8, 0, 0} // RANGE_256 -}; - -/** - * Encode a group of 5 numbers using trits and bits. - */ -inline void encode_trits(size_t bits, - uint8_t b0, - uint8_t b1, - uint8_t b2, - uint8_t b3, - uint8_t b4, - bitwriter& writer) { - uint8_t t0, t1, t2, t3, t4; - uint8_t m0, m1, m2, m3, m4; - - split_high_low(b0, bits, t0, m0); - split_high_low(b1, bits, t1, m1); - split_high_low(b2, bits, t2, m2); - split_high_low(b3, bits, t3, m3); - split_high_low(b4, bits, t4, m4); - - DCHECK(t0 < 3); - DCHECK(t1 < 3); - DCHECK(t2 < 3); - DCHECK(t3 < 3); - DCHECK(t4 < 3); - - uint8_t packed = integer_from_trits[t4][t3][t2][t1][t0]; - - writer.write8(m0, bits); - writer.write8(getbits(packed, 1, 0), 2); - writer.write8(m1, bits); - writer.write8(getbits(packed, 3, 2), 2); - writer.write8(m2, bits); - writer.write8(getbits(packed, 4, 4), 1); - writer.write8(m3, bits); - writer.write8(getbits(packed, 6, 5), 2); - writer.write8(m4, bits); - writer.write8(getbits(packed, 7, 7), 1); -} - -/** - * Encode a group of 3 numbers using quints and bits. - */ -inline void encode_quints(size_t bits, - uint8_t b0, - uint8_t b1, - uint8_t b2, - bitwriter& writer) { - uint8_t q0, q1, q2; - uint8_t m0, m1, m2; - - split_high_low(b0, bits, q0, m0); - split_high_low(b1, bits, q1, m1); - split_high_low(b2, bits, q2, m2); - - DCHECK(q0 < 5); - DCHECK(q1 < 5); - DCHECK(q2 < 5); - - uint8_t packed = integer_from_quints[q2][q1][q0]; - - writer.write8(m0, bits); - writer.write8(getbits(packed, 2, 0), 3); - writer.write8(m1, bits); - writer.write8(getbits(packed, 4, 3), 2); - writer.write8(m2, bits); - writer.write8(getbits(packed, 6, 5), 2); -} - -/** - * Encode a sequence of numbers using using one trit and a custom number of - * bits per number. - */ -inline void encode_trits(const uint8_t* numbers, - size_t count, - bitwriter& writer, - size_t bits) { - for (size_t i = 0; i < count; i += 5) { - uint8_t b0 = numbers[i + 0]; - uint8_t b1 = i + 1 >= count ? 0 : numbers[i + 1]; - uint8_t b2 = i + 2 >= count ? 0 : numbers[i + 2]; - uint8_t b3 = i + 3 >= count ? 0 : numbers[i + 3]; - uint8_t b4 = i + 4 >= count ? 0 : numbers[i + 4]; - - encode_trits(bits, b0, b1, b2, b3, b4, writer); - } -} - -/** - * Encode a sequence of numbers using one quint and the custom number of bits - * per number. - */ -inline void encode_quints(const uint8_t* numbers, - size_t count, - bitwriter& writer, - size_t bits) { - for (size_t i = 0; i < count; i += 3) { - uint8_t b0 = numbers[i + 0]; - uint8_t b1 = i + 1 >= count ? 0 : numbers[i + 1]; - uint8_t b2 = i + 2 >= count ? 0 : numbers[i + 2]; - encode_quints(bits, b0, b1, b2, writer); - } -} - -/** - * Encode a sequence of numbers using binary representation with the selected - * bit count. - */ -inline void encode_binary(const uint8_t* numbers, - size_t count, - bitwriter& writer, - size_t bits) { - DCHECK(count > 0); - for (size_t i = 0; i < count; ++i) { - writer.write8(numbers[i], bits); - } -} - -/** - * Encode a sequence of numbers in a specific range using the binary integer - * sequence encoding. The numbers are assumed to be in the correct range and - * the memory we are writing to is assumed to be zero-initialized. - */ -inline void integer_sequence_encode(const uint8_t* numbers, - size_t count, - range_t range, - bitwriter writer) { -#ifndef NDEBUG - for (size_t i = 0; i < count; ++i) { - DCHECK(numbers[i] <= range_max_table[range]); - } -#endif - - size_t bits = bits_trits_quints_table[range][0]; - size_t trits = bits_trits_quints_table[range][1]; - size_t quints = bits_trits_quints_table[range][2]; - - if (trits == 1) { - encode_trits(numbers, count, writer, bits); - } else if (quints == 1) { - encode_quints(numbers, count, writer, bits); - } else { - encode_binary(numbers, count, writer, bits); - } -} - -inline void integer_sequence_encode(const uint8_t* numbers, - size_t count, - range_t range, - uint8_t* output) { - integer_sequence_encode(numbers, count, range, bitwriter(output)); -} - -/** - * Compute the number of bits required to store a number of items in a specific - * range using the binary integer sequence encoding. - */ -inline size_t compute_ise_bitcount(size_t items, range_t range) { - size_t bits = bits_trits_quints_table[range][0]; - size_t trits = bits_trits_quints_table[range][1]; - size_t quints = bits_trits_quints_table[range][2]; - - if (trits) { - return ((8 + 5 * bits) * items + 4) / 5; - } - - if (quints) { - return ((7 + 3 * bits) * items + 2) / 3; - } - - return items * bits; -} - -#endif // ASTC_INTEGER_SEQUENCE_ENCODING_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/matrix.cc b/submodules/TelegramUI/third-party/astc/astc/matrix.cc deleted file mode 100644 index 996066e246..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/matrix.cc +++ /dev/null @@ -1,10 +0,0 @@ -#include "matrix.h" - -void eigen_vector(const mat3x3f_t& a, vec3f_t& eig) { - vec3f_t b = signorm(vec3f_t(1, 5, 2)); // FIXME: Magic number - for (size_t i = 0; i < 8; ++i) { - b = signorm(a * b); - } - - eig = b; -} diff --git a/submodules/TelegramUI/third-party/astc/astc/matrix.h b/submodules/TelegramUI/third-party/astc/astc/matrix.h deleted file mode 100644 index 761de6e8d0..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/matrix.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef ASTC_MATRIX_H_ -#define ASTC_MATRIX_H_ - -#include - -#include "vector.h" - -struct mat3x3f_t { - public: - mat3x3f_t() {} - - mat3x3f_t(float m00, - float m01, - float m02, - float m10, - float m11, - float m12, - float m20, - float m21, - float m22) { - m[0] = vec3f_t(m00, m01, m02); - m[1] = vec3f_t(m10, m11, m12); - m[2] = vec3f_t(m20, m21, m22); - } - - const vec3f_t& row(size_t i) const { return m[i]; } - - float& at(size_t i, size_t j) { return m[i].components[j]; } - const float& at(size_t i, size_t j) const { return m[i].components[j]; } - - private: - vec3f_t m[3]; -}; - -inline vec3f_t operator*(const mat3x3f_t& a, vec3f_t b) { - vec3f_t tmp; - tmp.x = dot(a.row(0), b); - tmp.y = dot(a.row(1), b); - tmp.z = dot(a.row(2), b); - return tmp; -} - -void eigen_vector(const mat3x3f_t& a, vec3f_t& eig); - -#endif // ASTC_MATRIX_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/meson.build b/submodules/TelegramUI/third-party/astc/astc/meson.build deleted file mode 100644 index 770a711cb9..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/meson.build +++ /dev/null @@ -1,57 +0,0 @@ -tables_color_quantization = custom_target( - 'gen-color-quantization', - input: [], - output: ['tables_color_quantization.h'], - command: [codegen, 'quantize', '@OUTPUT0@'] -) - -tables_data_size = custom_target( - 'gen-data-size', - input: [], - output: ['tables_data_size.h'], - command: [codegen, 'datasize', '@OUTPUT0@'] -) - -tables_integer_sequence_encoding = custom_target( - 'gen-integer_sequence_encoding-tables', - input: [], - output: ['tables_integer_sequence_encoding.h'], - command: [codegen, 'bise', '@OUTPUT0@'] -) - -astc_sources = [ - 'bitmanip.h', - 'colors.h', - 'compress_block.cc', - 'compress_block.h', - 'compress_texture.cc', - 'compress_texture.h', - 'constants.h', - 'data_size.h', - 'dcheck.h', - 'endpoints.h', - 'endpoints_bounding_box.h', - 'endpoints_encode.h', - 'endpoints_min_max.h', - 'endpoints_principal_components.cc', - 'endpoints_principal_components.h', - 'endpoints_quantize.h', - 'integer_sequence_encoding.h', - 'matrix.cc', - 'matrix.h', - 'misc.h', - 'range.h', - 'store_block.h', - 'vector.h', - 'weights_quantize.h', - 'weights_quantize_table.h', - tables_color_quantization, - tables_data_size, - tables_integer_sequence_encoding, -] - -astc = static_library( - 'astc', - sources: astc_sources, - include_directories: incdir -) diff --git a/submodules/TelegramUI/third-party/astc/astc/misc.h b/submodules/TelegramUI/third-party/astc/astc/misc.h deleted file mode 100644 index fa61b16f2a..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/misc.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef ASTC_MISC_H_ -#define ASTC_MISC_H_ - -#include - -template -T clamp(T a, T b, T x) { - if (x < a) { - return a; - } - - if (x > b) { - return b; - } - - return x; -} - -inline bool approx_equal(float x, float y, float epsilon) { - return fabs(x - y) < epsilon; -} - -#endif // ASTC_MISC_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/range.h b/submodules/TelegramUI/third-party/astc/astc/range.h deleted file mode 100644 index 34b0d57eda..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/range.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef ASTC_RANGE_H_ -#define ASTC_RANGE_H_ - -#include - -/** - * Define normalized (starting at zero) numeric ranges that can be represented - * with 8 bits or less. - */ -enum range_t { - RANGE_2, - RANGE_3, - RANGE_4, - RANGE_5, - RANGE_6, - RANGE_8, - RANGE_10, - RANGE_12, - RANGE_16, - RANGE_20, - RANGE_24, - RANGE_32, - RANGE_40, - RANGE_48, - RANGE_64, - RANGE_80, - RANGE_96, - RANGE_128, - RANGE_160, - RANGE_192, - RANGE_256, - RANGE_MAX -}; - -/** - * Table of maximum value for each range, minimum is always zero. - */ -const uint8_t range_max_table[RANGE_MAX] = {1, 2, 3, 4, 5, 7, 9, - 11, 15, 19, 23, 31, 39, 47, - 63, 79, 95, 127, 159, 191, 255}; - -#endif // ASTC_RANGE_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/store_block.h b/submodules/TelegramUI/third-party/astc/astc/store_block.h deleted file mode 100644 index ead60d6629..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/store_block.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef ASTC_STORE_BLOCK_H_ -#define ASTC_STORE_BLOCK_H_ - -#include -#include - -#include "bitmanip.h" -#include "colors.h" -#include "constants.h" -#include "dcheck.h" -#include "endpoints.h" -#include "integer_sequence_encoding.h" -#include "range.h" - -struct PhysicalBlock { - uint8_t data[BLOCK_BYTES]; -}; - -inline void void_extent_to_physical(unorm16_t color, PhysicalBlock* pb) { - pb->data[0] = 0xFC; - pb->data[1] = 0xFD; - pb->data[2] = 0xFF; - pb->data[3] = 0xFF; - pb->data[4] = 0xFF; - pb->data[5] = 0xFF; - pb->data[6] = 0xFF; - pb->data[7] = 0xFF; - - setbytes2(pb->data, 8, color.channels.r); - setbytes2(pb->data, 10, color.channels.g); - setbytes2(pb->data, 12, color.channels.b); - setbytes2(pb->data, 14, color.channels.a); -} - -inline void symbolic_to_physical( - color_endpoint_mode_t color_endpoint_mode, - range_t endpoint_quant, - range_t weight_quant, - - size_t partition_count, - size_t partition_index, - - const uint8_t endpoint_ise[MAXIMUM_ENCODED_COLOR_ENDPOINT_BYTES], - - // FIXME: +1 needed here because orbits_8ptr breaks when the offset reaches - // the last byte which always happens if the weight mode is RANGE_32. - const uint8_t weights_ise[MAXIMUM_ENCODED_WEIGHT_BYTES + 1], - - PhysicalBlock* pb) { - DCHECK(weight_quant <= RANGE_32); - DCHECK(endpoint_quant < RANGE_MAX); - DCHECK(color_endpoint_mode < CEM_MAX); - DCHECK(partition_count == 1 || partition_index < 1024); - DCHECK(partition_count >= 1 && partition_count <= 4); - DCHECK(compute_ise_bitcount(BLOCK_TEXEL_COUNT, weight_quant) < - MAXIMUM_ENCODED_WEIGHT_BITS); - - size_t n = BLOCK_WIDTH; - size_t m = BLOCK_HEIGHT; - - static const bool h_table[RANGE_32 + 1] = {0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1}; - - static const uint8_t r_table[RANGE_32 + 1] = {0x2, 0x3, 0x4, 0x5, 0x6, 0x7, - 0x2, 0x3, 0x4, 0x5, 0x6, 0x7}; - - bool h = h_table[weight_quant]; - size_t r = r_table[weight_quant]; - - // Use the first row of Table 11 in the ASTC specification. Beware that - // this has to be changed if another block-size is used. - size_t a = m - 2; - size_t b = n - 4; - - bool d = 0; // TODO: dual plane - - bool multi_part = partition_count > 1; - - size_t part_value = partition_count - 1; - size_t part_index = multi_part ? partition_index : 0; - - size_t cem_offset = multi_part ? 23 : 13; - size_t ced_offset = multi_part ? 29 : 17; - - size_t cem_bits = multi_part ? 6 : 4; - size_t cem = color_endpoint_mode; - cem = multi_part ? cem << 2 : cem; - - // Block mode - orbits8_ptr(pb->data, 0, getbit(r, 1), 1); - orbits8_ptr(pb->data, 1, getbit(r, 2), 1); - orbits8_ptr(pb->data, 2, 0, 1); - orbits8_ptr(pb->data, 3, 0, 1); - orbits8_ptr(pb->data, 4, getbit(r, 0), 1); - orbits8_ptr(pb->data, 5, a, 2); - orbits8_ptr(pb->data, 7, b, 2); - orbits8_ptr(pb->data, 9, h, 1); - orbits8_ptr(pb->data, 10, d, 1); - - // Partitions - orbits8_ptr(pb->data, 11, part_value, 2); - orbits16_ptr(pb->data, 13, part_index, 10); - - // CEM - orbits8_ptr(pb->data, cem_offset, cem, cem_bits); - - copy_bytes(endpoint_ise, MAXIMUM_ENCODED_COLOR_ENDPOINT_BYTES, pb->data, - ced_offset); - - reverse_bytes(weights_ise, MAXIMUM_ENCODED_WEIGHT_BYTES, pb->data + 15); -} - -#endif // ASTC_STORE_BLOCK_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/tables_color_quantization.h b/submodules/TelegramUI/third-party/astc/astc/tables_color_quantization.h deleted file mode 100644 index eebc4e97ca..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/tables_color_quantization.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ASTC_TABLES_COLOR_QUANTIZATION_H_ -#define ASTC_TABLES_COLOR_QUANTIZATION_H_ - -const uint8_t color_unquantize_table[21][256] = {{0,255},{0,128,255},{0,85,170,255},{0,64,128,192,255},{0,255,51,204,102,153},{0,36,73,109,146,182,219,255},{0,255,28,227,56,199,84,171,113,142},{0,255,69,186,23,232,92,163,46,209,116,139},{0,17,34,51,68,85,102,119,136,153,170,187,204,221,238,255},{0,255,67,188,13,242,80,175,27,228,94,161,40,215,107,148,54,201,121,134},{0,255,33,222,66,189,99,156,11,244,44,211,77,178,110,145,22,233,55,200,88,167,121,134},{0,8,16,24,33,41,49,57,66,74,82,90,99,107,115,123,132,140,148,156,165,173,181,189,198,206,214,222,231,239,247,255},{0,255,32,223,65,190,97,158,6,249,39,216,71,184,104,151,13,242,45,210,78,177,110,145,19,236,52,203,84,171,117,138,26,229,58,197,91,164,123,132},{0,255,16,239,32,223,48,207,65,190,81,174,97,158,113,142,5,250,21,234,38,217,54,201,70,185,86,169,103,152,119,136,11,244,27,228,43,212,59,196,76,179,92,163,108,147,124,131},{0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,65,69,73,77,81,85,89,93,97,101,105,109,113,117,121,125,130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,195,199,203,207,211,215,219,223,227,231,235,239,243,247,251,255},{0,255,16,239,32,223,48,207,64,191,80,175,96,159,112,143,3,252,19,236,35,220,51,204,67,188,83,172,100,155,116,139,6,249,22,233,38,217,54,201,71,184,87,168,103,152,119,136,9,246,25,230,42,213,58,197,74,181,90,165,106,149,122,133,13,242,29,226,45,210,61,194,77,178,93,162,109,146,125,130},{0,255,8,247,16,239,24,231,32,223,40,215,48,207,56,199,64,191,72,183,80,175,88,167,96,159,104,151,112,143,120,135,2,253,10,245,18,237,26,229,35,220,43,212,51,204,59,196,67,188,75,180,83,172,91,164,99,156,107,148,115,140,123,132,5,250,13,242,21,234,29,226,37,218,45,210,53,202,61,194,70,185,78,177,86,169,94,161,102,153,110,145,118,137,126,129},{0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255},{0,255,8,247,16,239,24,231,32,223,40,215,48,207,56,199,64,191,72,183,80,175,88,167,96,159,104,151,112,143,120,135,1,254,9,246,17,238,25,230,33,222,41,214,49,206,57,198,65,190,73,182,81,174,89,166,97,158,105,150,113,142,121,134,3,252,11,244,19,236,27,228,35,220,43,212,51,204,59,196,67,188,75,180,83,172,91,164,99,156,107,148,115,140,123,132,4,251,12,243,20,235,28,227,36,219,44,211,52,203,60,195,68,187,76,179,84,171,92,163,100,155,108,147,116,139,124,131,6,249,14,241,22,233,30,225,38,217,46,209,54,201,62,193,70,185,78,177,86,169,94,161,102,153,110,145,118,137,126,129},{0,255,4,251,8,247,12,243,16,239,20,235,24,231,28,227,32,223,36,219,40,215,44,211,48,207,52,203,56,199,60,195,64,191,68,187,72,183,76,179,80,175,84,171,88,167,92,163,96,159,100,155,104,151,108,147,112,143,116,139,120,135,124,131,1,254,5,250,9,246,13,242,17,238,21,234,25,230,29,226,33,222,37,218,41,214,45,210,49,206,53,202,57,198,61,194,65,190,69,186,73,182,77,178,81,174,85,170,89,166,93,162,97,158,101,154,105,150,109,146,113,142,117,138,121,134,125,130,2,253,6,249,10,245,14,241,18,237,22,233,26,229,30,225,34,221,38,217,42,213,46,209,50,205,54,201,58,197,62,193,66,189,70,185,74,181,78,177,82,173,86,169,90,165,94,161,98,157,102,153,106,149,110,145,114,141,118,137,122,133,126,129},{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255}}; -const uint8_t color_quantize_table[21][256] = {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15},{0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,8,8,8,8,8,8,8,8,8,8,8,8,12,12,12,12,12,12,12,12,12,12,12,12,12,12,16,16,16,16,16,16,16,16,16,16,16,16,16,2,2,2,2,2,2,2,2,2,2,2,2,2,6,6,6,6,6,6,6,6,6,6,6,6,6,6,10,10,10,10,10,10,10,10,10,10,10,10,10,14,14,14,14,14,14,14,14,14,14,14,14,14,14,18,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,15,15,15,15,15,15,15,15,15,15,15,15,15,15,11,11,11,11,11,11,11,11,11,11,11,11,11,7,7,7,7,7,7,7,7,7,7,7,7,7,7,3,3,3,3,3,3,3,3,3,3,3,3,3,17,17,17,17,17,17,17,17,17,17,17,17,17,13,13,13,13,13,13,13,13,13,13,13,13,13,13,9,9,9,9,9,9,9,9,9,9,9,9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1},{0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,2,2,2,2,2,2,2,2,2,2,2,10,10,10,10,10,10,10,10,10,10,10,18,18,18,18,18,18,18,18,18,18,18,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,12,12,12,20,20,20,20,20,20,20,20,20,20,20,6,6,6,6,6,6,6,6,6,6,6,14,14,14,14,14,14,14,14,14,14,14,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,15,15,15,15,15,15,15,15,15,15,15,7,7,7,7,7,7,7,7,7,7,7,21,21,21,21,21,21,21,21,21,21,21,13,13,13,13,13,13,13,13,13,13,13,5,5,5,5,5,5,5,5,5,5,5,19,19,19,19,19,19,19,19,19,19,19,11,11,11,11,11,11,11,11,11,11,11,3,3,3,3,3,3,3,3,3,3,3,17,17,17,17,17,17,17,17,17,17,17,9,9,9,9,9,9,9,9,9,9,9,1,1,1,1,1,1},{0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,30,30,30,30,30,30,30,30,31,31,31,31},{0,0,0,0,8,8,8,8,8,8,16,16,16,16,16,16,16,24,24,24,24,24,24,32,32,32,32,32,32,2,2,2,2,2,2,2,10,10,10,10,10,10,10,18,18,18,18,18,18,26,26,26,26,26,26,26,34,34,34,34,34,34,4,4,4,4,4,4,4,12,12,12,12,12,12,20,20,20,20,20,20,20,28,28,28,28,28,28,36,36,36,36,36,36,6,6,6,6,6,6,6,14,14,14,14,14,14,14,22,22,22,22,22,22,30,30,30,30,30,30,30,38,38,38,38,38,38,38,39,39,39,39,39,39,39,31,31,31,31,31,31,31,23,23,23,23,23,23,15,15,15,15,15,15,15,7,7,7,7,7,7,7,37,37,37,37,37,37,29,29,29,29,29,29,21,21,21,21,21,21,21,13,13,13,13,13,13,5,5,5,5,5,5,5,35,35,35,35,35,35,27,27,27,27,27,27,27,19,19,19,19,19,19,11,11,11,11,11,11,11,3,3,3,3,3,3,3,33,33,33,33,33,33,25,25,25,25,25,25,17,17,17,17,17,17,17,9,9,9,9,9,9,1,1,1,1},{0,0,0,16,16,16,16,16,16,32,32,32,32,32,2,2,2,2,2,18,18,18,18,18,18,34,34,34,34,34,4,4,4,4,4,4,20,20,20,20,20,36,36,36,36,36,6,6,6,6,6,6,22,22,22,22,22,38,38,38,38,38,8,8,8,8,8,8,24,24,24,24,24,24,40,40,40,40,40,10,10,10,10,10,26,26,26,26,26,26,42,42,42,42,42,12,12,12,12,12,12,28,28,28,28,28,44,44,44,44,44,14,14,14,14,14,14,30,30,30,30,30,46,46,46,46,46,46,47,47,47,47,47,47,31,31,31,31,31,15,15,15,15,15,15,45,45,45,45,45,29,29,29,29,29,13,13,13,13,13,13,43,43,43,43,43,27,27,27,27,27,27,11,11,11,11,11,41,41,41,41,41,25,25,25,25,25,25,9,9,9,9,9,9,39,39,39,39,39,23,23,23,23,23,7,7,7,7,7,7,37,37,37,37,37,21,21,21,21,21,5,5,5,5,5,5,35,35,35,35,35,19,19,19,19,19,19,3,3,3,3,3,33,33,33,33,33,17,17,17,17,17,17,1,1,1},{0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63},{0,0,16,16,16,32,32,32,48,48,48,48,64,64,64,2,2,2,18,18,18,34,34,34,50,50,50,50,66,66,66,4,4,4,20,20,20,36,36,36,36,52,52,52,68,68,68,6,6,6,22,22,22,38,38,38,38,54,54,54,70,70,70,8,8,8,24,24,24,24,40,40,40,56,56,56,72,72,72,10,10,10,26,26,26,26,42,42,42,58,58,58,74,74,74,12,12,12,12,28,28,28,44,44,44,60,60,60,76,76,76,14,14,14,14,30,30,30,46,46,46,62,62,62,78,78,78,78,79,79,79,79,63,63,63,47,47,47,31,31,31,15,15,15,15,77,77,77,61,61,61,45,45,45,29,29,29,13,13,13,13,75,75,75,59,59,59,43,43,43,27,27,27,27,11,11,11,73,73,73,57,57,57,41,41,41,25,25,25,25,9,9,9,71,71,71,55,55,55,39,39,39,39,23,23,23,7,7,7,69,69,69,53,53,53,37,37,37,37,21,21,21,5,5,5,67,67,67,51,51,51,51,35,35,35,19,19,19,3,3,3,65,65,65,49,49,49,49,33,33,33,17,17,17,1,1},{0,0,32,32,64,64,64,2,2,2,34,34,66,66,66,4,4,4,36,36,68,68,68,6,6,6,38,38,70,70,70,8,8,8,40,40,40,72,72,10,10,10,42,42,42,74,74,12,12,12,44,44,44,76,76,14,14,14,46,46,46,78,78,16,16,16,48,48,48,80,80,18,18,18,50,50,50,82,82,20,20,20,52,52,52,84,84,22,22,22,54,54,54,86,86,24,24,24,56,56,56,88,88,26,26,26,58,58,58,90,90,28,28,28,60,60,60,92,92,30,30,30,62,62,62,94,94,94,95,95,95,63,63,63,31,31,31,93,93,61,61,61,29,29,29,91,91,59,59,59,27,27,27,89,89,57,57,57,25,25,25,87,87,55,55,55,23,23,23,85,85,53,53,53,21,21,21,83,83,51,51,51,19,19,19,81,81,49,49,49,17,17,17,79,79,47,47,47,15,15,15,77,77,45,45,45,13,13,13,75,75,43,43,43,11,11,11,73,73,41,41,41,9,9,9,71,71,71,39,39,7,7,7,69,69,69,37,37,5,5,5,67,67,67,35,35,3,3,3,65,65,65,33,33,1,1},{0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,35,36,36,37,37,38,38,39,39,40,40,41,41,42,42,43,43,44,44,45,45,46,46,47,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,55,56,56,57,57,58,58,59,59,60,60,61,61,62,62,63,63,64,64,64,65,65,66,66,67,67,68,68,69,69,70,70,71,71,72,72,73,73,74,74,75,75,76,76,77,77,78,78,79,79,80,80,81,81,82,82,83,83,84,84,85,85,86,86,87,87,88,88,89,89,90,90,91,91,92,92,93,93,94,94,95,95,96,96,97,97,98,98,99,99,100,100,101,101,102,102,103,103,104,104,105,105,106,106,107,107,108,108,109,109,110,110,111,111,112,112,113,113,114,114,115,115,116,116,117,117,118,118,119,119,120,120,121,121,122,122,123,123,124,124,125,125,126,126,127},{0,32,32,64,96,96,128,2,2,34,34,66,98,98,130,4,4,36,36,68,100,100,132,6,6,38,38,70,102,102,134,8,8,40,40,72,104,104,136,10,10,42,42,74,106,106,138,12,12,44,44,76,108,108,140,14,14,46,46,78,110,110,142,16,16,48,48,80,112,112,144,18,18,50,50,82,114,114,146,20,20,52,52,84,116,116,148,22,22,54,54,86,118,118,150,24,24,56,56,88,120,120,152,26,26,58,58,90,122,122,154,28,28,60,60,92,124,124,156,30,30,62,62,94,126,126,158,158,159,159,127,127,95,63,63,31,31,157,125,125,93,61,61,29,29,155,123,123,91,59,59,27,27,153,121,121,89,57,57,25,25,151,119,119,87,55,55,23,23,149,117,117,85,53,53,21,21,147,115,115,83,51,51,19,19,145,113,113,81,49,49,17,17,143,111,111,79,47,47,15,15,141,109,109,77,45,45,13,13,139,107,107,75,43,43,11,11,137,105,105,73,41,41,9,9,135,103,103,71,39,39,7,7,133,101,101,69,37,37,5,5,131,99,99,67,35,35,3,3,129,97,97,65,33,33,1},{0,64,128,2,2,66,130,4,4,68,132,6,6,70,134,8,8,72,136,10,10,74,138,12,12,76,140,14,14,78,142,16,16,80,144,18,18,82,146,20,20,84,148,22,22,86,150,24,24,88,152,26,26,90,154,28,28,92,156,30,30,94,158,32,32,96,160,34,34,98,162,36,36,100,164,38,38,102,166,40,40,104,168,42,42,106,170,44,44,108,172,46,46,110,174,48,48,112,176,50,50,114,178,52,52,116,180,54,54,118,182,56,56,120,184,58,58,122,186,60,60,124,188,62,62,126,190,190,191,191,127,63,63,189,125,61,61,187,123,59,59,185,121,57,57,183,119,55,55,181,117,53,53,179,115,51,51,177,113,49,49,175,111,47,47,173,109,45,45,171,107,43,43,169,105,41,41,167,103,39,39,165,101,37,37,163,99,35,35,161,97,33,33,159,95,31,31,157,93,29,29,155,91,27,27,153,89,25,25,151,87,23,23,149,85,21,21,147,83,19,19,145,81,17,17,143,79,15,15,141,77,13,13,139,75,11,11,137,73,9,9,135,71,7,7,133,69,5,5,131,67,3,3,129,65,1},{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255}}; - -#endif diff --git a/submodules/TelegramUI/third-party/astc/astc/tables_data_size.h b/submodules/TelegramUI/third-party/astc/astc/tables_data_size.h deleted file mode 100644 index e1c4633dcc..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/tables_data_size.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ASTC_TABLES_DATA_SIZE_H_ -#define ASTC_TABLES_DATA_SIZE_H_ - -const int8_t color_endpoint_range_table[2][12][16] = {{{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},{20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20},{20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20},{20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20},{20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20},{20,20,20,20,20,20,20,20,20,20,20,20,19,19,19,19},{20,20,20,20,20,20,20,20,20,20,20,20,17,17,17,17},{20,20,20,20,20,20,20,20,20,20,20,20,16,16,16,16},{20,20,20,20,20,20,20,20,19,19,19,19,13,13,13,13},{20,20,20,20,20,20,20,20,16,16,16,16,11,11,11,11},{20,20,20,20,20,20,20,20,14,14,14,14,10,10,10,10},{20,20,20,20,19,19,19,19,11,11,11,11,7,7,7,7}},{{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},{20,20,20,20,20,20,20,20,14,14,14,14,9,9,9,9},{20,20,20,20,20,20,20,20,12,12,12,12,8,8,8,8},{20,20,20,20,19,19,19,19,11,11,11,11,7,7,7,7},{20,20,20,20,17,17,17,17,10,10,10,10,6,6,6,6},{20,20,20,20,15,15,15,15,8,8,8,8,5,5,5,5},{20,20,20,20,13,13,13,13,7,7,7,7,4,4,4,4},{20,20,20,20,11,11,11,11,6,6,6,6,3,3,3,3},{20,20,20,20,9,9,9,9,4,4,4,4,2,2,2,2},{17,17,17,17,7,7,7,7,3,3,3,3,1,1,1,1},{14,14,14,14,5,5,5,5,2,2,2,2,0,0,0,0},{10,10,10,10,3,3,3,3,0,0,0,0,0,0,0,0}}}; - -#endif diff --git a/submodules/TelegramUI/third-party/astc/astc/tables_integer_sequence_encoding.h b/submodules/TelegramUI/third-party/astc/astc/tables_integer_sequence_encoding.h deleted file mode 100644 index 3bdcb37b8c..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/tables_integer_sequence_encoding.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef ASTC_TABLES_INTEGER_SEQUENCE_ENCODING_H_ -#define ASTC_TABLES_INTEGER_SEQUENCE_ENCODING_H_ - -const uint8_t integer_from_trits[3][3][3][3][3] = {{{{{0,1,2},{4,5,6},{8,9,10}},{{16,17,18},{20,21,22},{24,25,26}},{{3,7,15},{19,23,27},{12,13,14}}},{{{32,33,34},{36,37,38},{40,41,42}},{{48,49,50},{52,53,54},{56,57,58}},{{35,39,47},{51,55,59},{44,45,46}}},{{{64,65,66},{68,69,70},{72,73,74}},{{80,81,82},{84,85,86},{88,89,90}},{{67,71,79},{83,87,91},{76,77,78}}}},{{{{128,129,130},{132,133,134},{136,137,138}},{{144,145,146},{148,149,150},{152,153,154}},{{131,135,143},{147,151,155},{140,141,142}}},{{{160,161,162},{164,165,166},{168,169,170}},{{176,177,178},{180,181,182},{184,185,186}},{{163,167,175},{179,183,187},{172,173,174}}},{{{192,193,194},{196,197,198},{200,201,202}},{{208,209,210},{212,213,214},{216,217,218}},{{195,199,207},{211,215,219},{204,205,206}}}},{{{{96,97,98},{100,101,102},{104,105,106}},{{112,113,114},{116,117,118},{120,121,122}},{{99,103,111},{115,119,123},{108,109,110}}},{{{224,225,226},{228,229,230},{232,233,234}},{{240,241,242},{244,245,246},{248,249,250}},{{227,231,239},{243,247,251},{236,237,238}}},{{{28,29,30},{60,61,62},{92,93,94}},{{156,157,158},{188,189,190},{220,221,222}},{{31,63,127},{159,191,255},{252,253,254}}}}}; -const uint8_t integer_from_quints[5][5][5] = {{{0,1,2,3,4},{8,9,10,11,12},{16,17,18,19,20},{24,25,26,27,28},{5,13,21,29,6}},{{32,33,34,35,36},{40,41,42,43,44},{48,49,50,51,52},{56,57,58,59,60},{37,45,53,61,14}},{{64,65,66,67,68},{72,73,74,75,76},{80,81,82,83,84},{88,89,90,91,92},{69,77,85,93,22}},{{96,97,98,99,100},{104,105,106,107,108},{112,113,114,115,116},{120,121,122,123,124},{101,109,117,125,30}},{{102,103,70,71,38},{110,111,78,79,46},{118,119,86,87,54},{126,127,94,95,62},{39,47,55,63,31}}}; - -#endif diff --git a/submodules/TelegramUI/third-party/astc/astc/vector.h b/submodules/TelegramUI/third-party/astc/astc/vector.h deleted file mode 100644 index 46700184cc..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/vector.h +++ /dev/null @@ -1,148 +0,0 @@ -#ifndef ASTC_VECTOR_H_ -#define ASTC_VECTOR_H_ - -#include -#include - -#include "dcheck.h" - -template -union vec3_t { - public: - vec3_t() {} - vec3_t(T x_, T y_, T z_) : x(x_), y(y_), z(z_) {} - - struct { - T x, y, z; - }; - struct { - T r, g, b; - }; - T components[3]; -}; - -typedef vec3_t vec3f_t; -typedef vec3_t vec3i_t; - -template -vec3_t operator+(vec3_t a, vec3_t b) { - vec3_t result; - result.x = a.x + b.x; - result.y = a.y + b.y; - result.z = a.z + b.z; - return result; -} - -template -vec3_t operator-(vec3_t a, vec3_t b) { - vec3_t result; - result.x = a.x - b.x; - result.y = a.y - b.y; - result.z = a.z - b.z; - return result; -} - -template -vec3_t operator*(vec3_t a, vec3_t b) { - vec3_t result; - result.x = a.x * b.x; - result.y = a.y * b.y; - result.z = a.z * b.z; - return result; -} - -template -vec3_t operator*(vec3_t a, T b) { - vec3_t result; - result.x = a.x * b; - result.y = a.y * b; - result.z = a.z * b; - return result; -} - -template -vec3_t operator/(vec3_t a, T b) { - vec3_t result; - result.x = a.x / b; - result.y = a.y / b; - result.z = a.z / b; - return result; -} - -template -vec3_t operator/(vec3_t a, vec3_t b) { - vec3_t result; - result.x = a.x / b.x; - result.y = a.y / b.y; - result.z = a.z / b.z; - return result; -} - -template -bool operator==(vec3_t a, vec3_t b) { - return a.x == b.x && a.y == b.y && a.z == b.z; -} - -template -bool operator!=(vec3_t a, vec3_t b) { - return a.x != b.x || a.y != b.y || a.z != b.z; -} - -template -T dot(vec3_t a, vec3_t b) { - return a.x * b.x + a.y * b.y + a.z * b.z; -} - -template -T quadrance(vec3_t a) { - return dot(a, a); -} - -template -T norm(vec3_t a) { - return static_cast(sqrt(quadrance(a))); -} - -template -T distance(vec3_t a, vec3_t b) { - return norm(a - b); -} - -template -T qd(vec3_t a, vec3_t b) { - return quadrance(a - b); -} - -template -vec3_t signorm(vec3_t a) { - T x = norm(a); - DCHECK(x != 0.0); - return a / x; -} - -template -vec3_t vecmin(vec3_t a, vec3_t b) { - vec3_t result; - result.x = std::min(a.x, b.x); - result.y = std::min(a.y, b.y); - result.z = std::min(a.z, b.z); - return result; -} - -template -vec3_t vecmax(vec3_t a, vec3_t b) { - vec3_t result; - result.x = std::max(a.x, b.x); - result.y = std::max(a.y, b.y); - result.z = std::max(a.z, b.z); - return result; -} - -template -T qd_to_line(vec3_t m, vec3_t k, T kk, vec3_t p) { - T t = dot(p - m, k) / kk; - vec3_t q = k * t + m; - return qd(p, q); -} - -#endif // ASTC_VECTOR_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/weights_quantize.h b/submodules/TelegramUI/third-party/astc/astc/weights_quantize.h deleted file mode 100644 index cb53f2978b..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/weights_quantize.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef ASTC_WEIGHTS_QUANTIZE_H_ -#define ASTC_WEIGHTS_QUANTIZE_H_ - -#include -#include - -#include "colors.h" -#include "constants.h" -#include "dcheck.h" -#include "misc.h" -#include "range.h" -#include "vector.h" -#include "weights_quantize_table.h" - -uint8_t quantize_weight(range_t weight_quant, size_t weight) { - DCHECK(weight_quant <= RANGE_32); - DCHECK(weight <= 1024); - return weight_quantize_table[weight_quant][weight]; -} - -/** - * Project a texel to a line and quantize the result in 1 dimension. - * - * The line is defined by t=k*x + m. This function calculates and quantizes x - * by projecting n=t-m onto k, x=|n|/|k|. Since k and m is derived from the - * minimum and maximum of all texel values the result will be in the range [0, - * 1]. - * - * To quantize the result using the weight_quantize_table the value needs to - * be extended to the range [0, 1024]. - * - * @param k the derivative of the line - * @param m the minimum endpoint - * @param t the texel value - */ -size_t project(size_t k, size_t m, size_t t) { - DCHECK(k > 0); - return size_t((t - m) * 1024) / k; -} - -/** - * Project a texel to a line and quantize the result in 3 dimensions. - */ -size_t project(vec3i_t k, int kk, vec3i_t m, vec3i_t t) { - DCHECK(kk > 0); - - return static_cast(clamp(0, 1024, dot(t - m, k) * 1024 / kk)); -} - -void calculate_quantized_weights_luminance( - const uint8_t texels[BLOCK_TEXEL_COUNT], - range_t quant, - uint8_t l0, - uint8_t l1, - uint8_t weights[BLOCK_TEXEL_COUNT]) { - DCHECK(l0 < l1); - - size_t k = l1 - l0; - size_t m = l0; - - for (size_t i = 0; i < BLOCK_TEXEL_COUNT; ++i) { - size_t t = static_cast(texels[i]); - weights[i] = quantize_weight(quant, project(k, m, t)); - } -} - -void calculate_quantized_weights_rgb(const unorm8_t texels[BLOCK_TEXEL_COUNT], - range_t quant, - vec3i_t e0, - vec3i_t e1, - uint8_t weights[BLOCK_TEXEL_COUNT]) { - if (e0 == e1) { - for (size_t i = 0; i < BLOCK_TEXEL_COUNT; ++i) { - weights[i] = 0; // quantize_weight(quant, 0) is always 0 - } - } else { - vec3i_t k = e1 - e0; - vec3i_t m = e0; - - int kk = dot(k, k); - for (size_t i = 0; i < BLOCK_TEXEL_COUNT; ++i) { - weights[i] = - quantize_weight(quant, project(k, kk, m, to_vec3i(texels[i]))); - } - } -} - -#endif // ASTC_WEIGHTS_QUANTIZE_H_ diff --git a/submodules/TelegramUI/third-party/astc/astc/weights_quantize_table.h b/submodules/TelegramUI/third-party/astc/astc/weights_quantize_table.h deleted file mode 100644 index 2b1bcc04ec..0000000000 --- a/submodules/TelegramUI/third-party/astc/astc/weights_quantize_table.h +++ /dev/null @@ -1,566 +0,0 @@ -#ifndef ASTC_WEIGHTS_QUANTIZE_TABLE_H_ -#define ASTC_WEIGHTS_QUANTIZE_TABLE_H_ - -#include - -// FIXME: This is copied from ARM-code -const uint8_t weight_quantize_table[12][1025] = { - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3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, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9,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 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31}}; - -#endif // ASTC_WEIGHTS_QUANTIZE_TABLE_H_ diff --git a/submodules/TelegramUI/third-party/astc/compress/astc.cc b/submodules/TelegramUI/third-party/astc/compress/astc.cc deleted file mode 100644 index 581fe5186c..0000000000 --- a/submodules/TelegramUI/third-party/astc/compress/astc.cc +++ /dev/null @@ -1,74 +0,0 @@ -#include - -#include "astc.h" - -#include -#include -#include -#include -#include - -#include "compress_texture.h" -#include "constants.h" -#include "bgra.h" -#include "compressed.h" - -int64_t usecs_passed(const timeval& t1, const timeval& t2) { - return (t2.tv_sec - t1.tv_sec) * 1000000 + (t2.tv_usec - t1.tv_usec); -} - -void compress_astc(const BgraImage& image, CompressedImage* compressed) { - compress_texture(reinterpret_cast(image.buffer), compressed->buffer, static_cast(image.width), static_cast(image.height)); -} - -/*int main(int argc, const char** argv) { - if (argc < 3 || argc > 4) { - fprintf(stderr, "Usage: %s [-q | --quiet] INPUT OUTPUT\n", argv[0]); - return 1; - } - - bool quiet = false; - const char* input = nullptr; - const char* output = nullptr; - - int i = 1; - if (strcmp(argv[i], "-q") == 0 || strcmp(argv[i], "--quiet") == 0) { - quiet = true; - ++i; - } - input = argv[i]; - output = argv[i + 1]; - - try { - BgraImage image = ReadTGAFile(input); - - if (image.width % BLOCK_WIDTH != 0 || image.height % BLOCK_HEIGHT != 0) { - fprintf(stderr, - "Error: image size (%ldx%ld) not a multiple of block size " - "(%ldx%ld)\n", - image.width, image.height, BLOCK_WIDTH, BLOCK_HEIGHT); - return 1; - } - - CompressedImage compressed(image.width, image.height, BLOCK_WIDTH, - BLOCK_HEIGHT, BLOCK_BYTES); - - if (quiet) { - compress_astc(image, &compressed); - } else { - timeval t1; - gettimeofday(&t1, NULL); - compress_astc(image, &compressed); - timeval t2; - gettimeofday(&t2, NULL); - fprintf(stdout, "Time passed: %ldus\n", usecs_passed(t1, t2)); - } - - WriteASTCFile(compressed, output); - } catch (const char* err) { - fprintf(stderr, "Error: %s\n", err); - return 1; - } - - return 0; -}*/ diff --git a/submodules/TelegramUI/third-party/astc/compress/astc.h b/submodules/TelegramUI/third-party/astc/compress/astc.h deleted file mode 100644 index 2f7f29fbd9..0000000000 --- a/submodules/TelegramUI/third-party/astc/compress/astc.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef astc_h -#define astc_h - -#include "bgra.h" -#include "compressed.h" - -void compress_astc(const BgraImage& image, CompressedImage* compressed); - -#endif /* astc_h */ diff --git a/submodules/TelegramUI/third-party/astc/image/bgra.cc b/submodules/TelegramUI/third-party/astc/image/bgra.cc deleted file mode 100644 index 5e3099a9f8..0000000000 --- a/submodules/TelegramUI/third-party/astc/image/bgra.cc +++ /dev/null @@ -1,18 +0,0 @@ -#include "bgra.h" - -#include - -struct TGAHeader { - uint8_t id_length; - uint8_t color_map_type; - uint8_t image_type; - - uint8_t first_entry_index[2]; - uint8_t color_map_length[2]; - uint8_t color_map_entry_size; - - uint8_t origin_x[2], origin_y[2]; - uint8_t width[2], height[2]; - uint8_t pixel_depth; - uint8_t image_descriptor; -}; diff --git a/submodules/TelegramUI/third-party/astc/image/bgra.h b/submodules/TelegramUI/third-party/astc/image/bgra.h deleted file mode 100644 index 4a48f66e01..0000000000 --- a/submodules/TelegramUI/third-party/astc/image/bgra.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef IMAGE_BGRA_H_ -#define IMAGE_BGRA_H_ - -#include - -#include "color.h" - -class BgraImage { - public: - BgraImage(size_t width_, size_t height_, uint8_t *bytes) - : width(width_), - height(height_), - pixel_count(width_ * height_), - buffer_size(pixel_count * sizeof(bgra8_t)), - buffer((bgra8_t *)bytes) {} - - BgraImage(BgraImage&& other) - : width(other.width), - height(other.height), - buffer_size(other.buffer_size), - buffer(other.buffer) { - other.buffer = nullptr; - } - - BgraImage(const BgraImage&) = delete; - BgraImage& operator=(const BgraImage&) = delete; - - ~BgraImage() { - } - - size_t width, height; - - size_t pixel_count; - size_t buffer_size; - bgra8_t* buffer; -}; - -#endif // IMAGE_BGRA_H_ diff --git a/submodules/TelegramUI/third-party/astc/image/color.h b/submodules/TelegramUI/third-party/astc/image/color.h deleted file mode 100644 index 6c5cc3199c..0000000000 --- a/submodules/TelegramUI/third-party/astc/image/color.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef IMAGE_COLOR_H_ -#define IMAGE_COLOR_H_ - -#include - -union rgba8_t { - struct type { - uint8_t r, g, b, a; - } channels; - uint32_t bits; -}; -union bgra8_t { - struct type { - uint8_t b, g, r, a; - } channels; - uint32_t bits; -}; - -inline bgra8_t swap_red_blue(rgba8_t color) { - bgra8_t output; - output.channels.r = color.channels.r; - output.channels.g = color.channels.g; - output.channels.b = color.channels.b; - output.channels.a = color.channels.a; - return output; -} - -inline rgba8_t swap_red_blue(bgra8_t color) { - rgba8_t output; - output.channels.r = color.channels.r; - output.channels.g = color.channels.g; - output.channels.b = color.channels.b; - output.channels.a = color.channels.a; - return output; -} - -#endif // IMAGE_COLOR_H_ diff --git a/submodules/TelegramUI/third-party/astc/image/compressed.cc b/submodules/TelegramUI/third-party/astc/image/compressed.cc deleted file mode 100644 index 69ee8693b5..0000000000 --- a/submodules/TelegramUI/third-party/astc/image/compressed.cc +++ /dev/null @@ -1,44 +0,0 @@ -#include "compressed.h" - -#include - -static int MAGIC_FILE_CONSTANT = 0x5CA1AB13; - -struct ASTCHeader { - uint8_t magic[4]; - uint8_t blockdim_x; - uint8_t blockdim_y; - uint8_t blockdim_z; - uint8_t xsize[3]; - uint8_t ysize[3]; - uint8_t zsize[3]; -}; - -void WriteASTCFile(const CompressedImage& compressed, const char* file_path) { - std::ofstream file(file_path, std::ios::binary); - if (file.fail()) { - throw "could not open file for writing"; - } - - ASTCHeader hdr; - hdr.magic[0] = static_cast(MAGIC_FILE_CONSTANT & 0xFF); - hdr.magic[1] = static_cast((MAGIC_FILE_CONSTANT >> 8) & 0xFF); - hdr.magic[2] = static_cast((MAGIC_FILE_CONSTANT >> 16) & 0xFF); - hdr.magic[3] = static_cast((MAGIC_FILE_CONSTANT >> 24) & 0xFF); - hdr.blockdim_x = static_cast(compressed.xdim); - hdr.blockdim_y = static_cast(compressed.ydim); - hdr.blockdim_z = 1; - hdr.xsize[0] = compressed.xsize & 0xFF; - hdr.xsize[1] = (compressed.xsize >> 8) & 0xFF; - hdr.xsize[2] = (compressed.xsize >> 16) & 0xFF; - hdr.ysize[0] = compressed.ysize & 0xFF; - hdr.ysize[1] = (compressed.ysize >> 8) & 0xFF; - hdr.ysize[2] = (compressed.ysize >> 16) & 0xFF; - hdr.zsize[0] = 1 & 0xFF; - hdr.zsize[1] = (1 >> 8) & 0xFF; - hdr.zsize[2] = (1 >> 16) & 0xFF; - - file.write(reinterpret_cast(&hdr), sizeof(ASTCHeader)); - file.write(reinterpret_cast(compressed.buffer), - static_cast(compressed.buffer_size)); -} diff --git a/submodules/TelegramUI/third-party/astc/image/compressed.h b/submodules/TelegramUI/third-party/astc/image/compressed.h deleted file mode 100644 index aa61f96702..0000000000 --- a/submodules/TelegramUI/third-party/astc/image/compressed.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef IMAGE_COMPRESSED_H_ -#define IMAGE_COMPRESSED_H_ - -#include -#include -#include - -class CompressedImage { - public: - CompressedImage(size_t width, - size_t height, - size_t block_width, - size_t block_height, - size_t bytes_per_block_) - : xdim(block_width), - ydim(block_height), - xsize(width), - ysize(height), - xblocks(width / xdim), - yblocks(height / ydim), - block_count(yblocks * xblocks), - bytes_per_block(bytes_per_block_), - buffer_size(block_count * bytes_per_block), - buffer(new uint8_t[buffer_size]) { - assert(width % xdim == 0); - assert(height % ydim == 0); - } - - CompressedImage(CompressedImage&& other) - : xdim(other.xdim), - ydim(other.ydim), - xsize(other.xsize), - ysize(other.ysize), - xblocks(other.xblocks), - yblocks(other.yblocks), - block_count(other.block_count), - bytes_per_block(other.bytes_per_block), - buffer_size(other.buffer_size), - buffer(other.buffer) { - other.buffer = nullptr; - } - - CompressedImage(const CompressedImage&) = delete; - CompressedImage& operator=(const CompressedImage&) = delete; - - ~CompressedImage() { delete[] buffer; } - - size_t xdim, ydim; - size_t xsize, ysize; - size_t xblocks, yblocks; - - size_t block_count; - - size_t bytes_per_block; - size_t buffer_size; - uint8_t* buffer; -}; - -void WriteASTCFile(const CompressedImage&, const char* file_path); - -#endif // IMAGE_COMPRESSED_H_ diff --git a/submodules/TelegramUI/third-party/astc/pybits/__pycache__/bise.cpython-37.pyc b/submodules/TelegramUI/third-party/astc/pybits/__pycache__/bise.cpython-37.pyc deleted file mode 100644 index 0cb2864c49859ef135b34f5a7191eeb0844975a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6318 zcmdT|&2JmW72lct;F6YPnxbsUR$MlA64Q|-+i4QFa9vscXbrdm5<6)i*kCEmN+v|D zq}de^6J!xY2J8SukODpAC>?reZ_S}VKmUOCP@pY(*h3F(QNTU+=u7*1Z$Ct`Qf#HZ zbcy-c_h#OkdGmX3-g0JeuwdZ%-j7Om?~ED7-{>WMM$nl?3I2&n8A>#b6=Tj2)R#?h zn_9Ce=cKZftsIq8uF9)|I-myBpc+yKRZ$&MB{i(dYD67YN7U%j$egLh)X@jVoTZMb zakRF2K^;fys4uAs+MN2bdJ(OwPNKvmUgv;*o@HGy_eol%o$ zhrEMoYFX-kcn3C(xuQ4V6*tA)A#V_GC2z!4<#+={60*rGH)5xvyZV~ zqbee2z7Ymqh@Ln-TQ#)+nXAXt1HnoOOzjyV;}JY18`d+0s6A86E&@+UMr6~q-8F(F zKkk;n!;%p@Q=I-O-7+u766m3?7z@*qP$?PwAGy!;%p@Q}X>&Xv6}UjUH;L zTtNxOQMG};WlI;^g4&=Q8XtC)2Hmgg`xVb$SXB*wX_7_6Cn=(#%R%7ju(9f2(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fSj2Y>OyurmBAP-7p$s#i8<1=6pNBR$9XagMfOdMW%j7d<`ar| z{_%MJL%C=^lLR^>UIFFnETNK0cxWzK&m@C_HOnBhvWypZWIVJM?WaniQzZ9bDV0>p zD8c2C)fSJ8N8*uuWG*7S#dcs=;0VcXK+adu==0RK^;zmqQAM9s`V3Y0RBNVh=zCZsA#xnU_2tS*EGmo4$rR7TX!$6tg4NscZrgg;9XSw-+?2= iv;7>?b=^FEWw+p-b5FT8dbT_03I|yzill!cT=5?YUPGM# diff --git a/submodules/TelegramUI/third-party/astc/pybits/__pycache__/bitset.cpython-37.pyc b/submodules/TelegramUI/third-party/astc/pybits/__pycache__/bitset.cpython-37.pyc deleted file mode 100644 index 5fe429061d236970d9e085989ceb8808f81be1da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3152 zcmaJ@%Wo4$7@xofB~T&t5~V<2H>)arNS4sb_H2R^$4+K91)@z4 zO{8*cuRXz`hyF`@?J4KpxU|3Dtaq_Z=t?u+?94awy?);}^JsRqBJlnE=faaeriA#L zKl!IIcz_lyp!-@FVdOE|k!lK~9*er}V7~YY?%yyKil#K8sf;x0STwcK#sl??Z%UxP znKEV2l9@IY&?z%xs-R^vYigj=X3ormR?Hc*06JsNnscC4bKWe1&YBBm3A7f@nGejx zV{s&#^B7+;m)-ab##hW$H(oH;pzCs4YIox(j62kmAE}4-Ia;)WE|ErVdr>tOzsN+z z&^&>y+akK^W@I7)l_>Pu2wLAb!6tE{(AB-P_ArV<8+Ql&FRdNeRPPR+rLv!TrWLp9 zI`yKkw_!_QPW4Z%-e1Df@o#RgevfU@>TVc^cD23V?U~h96nAXAy8D6}uV!km?7m3L zLD21Y;~=2gQ5l_(Rk@%_@?dVrm2-3?SMiauIV&kW5nI$=HtN!81HzM>Hd!}=U#QzX z2sw&qpO6PLLkXPkxH(Ldvboc*W8i$~+l2()+7j^HVl3fJu?1g#2Gl&rJZHJ-gnHGr z)56ju3jm6`a{8pQJE@Z14C5L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elegramUI/third-party/astc/pybits/__pycache__/datasize.cpython-37.pyc deleted file mode 100644 index 97e9e5be041df823c3a34ddc5e4a72edddbdd837..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3140 zcmbVOTW=f36`q;hLLn{pGxNf>}gT!=GDREslHU!m*tt1T+2B_sYAnI-@&Wd7r z_3S9NnV}n)2JAc(aQ{L2&;ot!KPk|seeFy67xL16XI2zrLq^)}V9wmmZO(1>-IbM) z;k*Cm)mwkBGWJheEIzE+74-B0fMk;Q*?>1Wr@82hoqTjKI?{c}ny&O@0i!4V!xqTA z6=mK+X0rNUK^r;071!dFg4IOFrdy zU$Z-ox`t6)Vd}EsQhbk12~+%nP1)@;H<{s3#AzrJGbd1YGFRUlCz;b7>a4Prris$s z(QsR-k*bS~-_1O$-d~v_Q-Aa3`VF9@>*GWxYJK;h+n4LDRJWC0AK$}W(skL=t+YEy z*2ed;(9+T!(*med@(JTrUKTD7d4N_Hs*Jt1Pbc_F=q|dw_&ZQBzo@FxHF`X)Y4!kS zFkFk7NMDCp_>99Gg3O^VVswCYnXrsw_ddi(dkwqi+P&Wx*Y52ea`P;=vBfB8r^ixb z=Ok08C&p7xv@2bbB)zF`b#m3;3|D`Vg{eO*BVq!>Y77SVjWAA)8Mnr!feB=>=c<2z zI{ex*!Jl$%J@qf+%hJyYJCLPIz|;j3n8Hj4_39(%%72&yuuiicE1xzcm7e+K)N z<-UBu_$Qeuo@CR|_@-#WJqK>CHWV3hZUNbNa=zQ|C!JP5N`~!`><&B8ovz-GE=1!N zoK9{}qt;MH@&GvFeruSd^Ap742Lw(Ma0pxhn7na3voEI6+0E$Ug?e-+>2~&YI;T*c z{P_9U8`1eA?1&;|{@d@M*o-b+T=35+z63?xR}@59*iE~`RJVrhBy)F1qkdMsx&6!c zKiG+XwbgikJN|g3y)jvpVkY|Oxks7qLB0cM+EL<8R3&E+=PvUkm$V$8YQM(u4 z=}NtymGi~Ez2f3XCSx3hWWCs0FDvIZh*fLY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-7V2m@o}l_{J1+}Iov%h?$5yQ= g&S&GP^EyMzzMikv$y+&HPOLlno9qjTXz2gv2U@kh?f?J) diff --git a/submodules/TelegramUI/third-party/astc/pybits/__pycache__/partitions.cpython-37.pyc b/submodules/TelegramUI/third-party/astc/pybits/__pycache__/partitions.cpython-37.pyc deleted file mode 100644 index 188489db4e4a81f4b0c77e727036cea62ce19226..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7628 zcmbVR-)|d7e&3m0l1qxBD2bM2U+UO7=VGQgJFzcKu5}$HaavrFsx8vyuDZAjinEd^ zQKUS(YGmE=4ycT??;$|i0(~h8Bo9T=m!bs@hyDqDDDJHX+@dc9u`~0XnVtF0d_UhGGkj})zT)8b!@pm;|N2$O`EL^AUlE0Myitn8I7U5kHXWml zi(DDc6p(9EG$rJ&@l6@IXDVh6dBIf8Jo2KcnFZt}Q#XsqeY0eik(YnhF%5I!kz+2L z>dlH-F{`MZGi&A|@~XLHzJ`3>JY#+hdCgol&mvziSIkx9b@QD0I`YME$z0pl_7~xD zxL}?)-@x<2NA9WGY=jrgb<=$0gpGU7sXA543F~14Ei2&#^j^v8%!}_i&0lXTERa9u z8t>b9BOghEr{SQF+W1E#sXDgoBgtnsZvIIW+UVwC7>D-e)={TxZnmPhZR4AV54Soo zT3R;l#GQUGx^eh0Ek+NHS~lbW5od9f^^mrui~{p~_9_U>uHL}Duag74(RESx`Hw#T zk()8l)Rx^-^>D(JWuMfKc01d#y?u-0kLRK|zkIH{Upbd8V36}?>)yUqnwpK}^Jg3F zt9morR~c=zlyiqK9QUyj!gRb6j&T0i<6T?DN>-+J4Ien(nO!@7s+KXgZ_Q6lRsPDU z)_%pQqNA%KHWT&&VtLPW02b@E2$WZs#_J3*dja$b_gE5|l$O zZph^iiP#~*ImGJ-$XW25X3ucGTx zSFraIW!$^YKqat}$aUgMj(y`7fQoK7uQ`w&_U2R#ijZQ_6xLZTN!f$GXS6SLF{jHy zmvXuyw4c*+LYH&8Ds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S=)dik{X*@!U%^SJ;V&Y+ P?5_~=REi2z!B_tW^_j|I diff --git a/submodules/TelegramUI/third-party/astc/pybits/__pycache__/quantize.cpython-37.pyc b/submodules/TelegramUI/third-party/astc/pybits/__pycache__/quantize.cpython-37.pyc deleted file mode 100644 index 03f32f5a7522bbe5bcfe0365a619b01fbe501c95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4559 zcmbVPUvC@75x>1Vl1GZ76Wi-PEnEwzg6vLhUQXJyB;J zNqO(++QO+QA^}$Vlzf50erSOLeeOe^fs-cHMT@>iN>TZ zjeYGiO`0;dukGs3v<)HivaoOM8lfqzNZZqQ&B%P7lj4Qg%`sI3m1n91s=(9;D2u5w zs3KFNph`?tK#eeU0#uoi=;|Ml9_5CAP3-y}P=|Tg=4&bBn0%{gMA{jRM+;l}=bCy6 zzC8F2m5k5A3ZW*!IS$^F;Lc^-MV|Y0WDM)1Ub6^}BR`ByM1?5d)b~u*USj?y(2h}X zWp$<<9)<%eG83q~3oED-5N- zP6JS~4rn+Nl~_lLahxSA9V3Bl(nrZOB%CD)8OD>$FM*Ne_I*t&Qj8P4;xDh)0F=-H z4d01ISVxNS6ifK`F%tT=>7yk373DdSkYStzzo{%>WVxxQqmc~bXS4i)9L>l)DL6UY*$(XS!j{#aWgZe!=`lHLDSH@(2dU%2Vot$NdI*vOrB z_&ZNZ-)lGR&3a?YuHC(3cLNs-+q|%LZ*|$0Zlfbzl}QS=-G;Z}HR_?)!Lp8Bf86n; zz0vjkA3$8VX}7w5=xzI+tAgoL#$4{Fgu+454C#xW))!q;t79e&g#BVCqQE?$zI2RZD#MSx4n?}sQ01vOnW9abbcOM(!e874|8E2r>2l_?m^O? zcxd6=nEj*;9oa`(=?mULSV^Ca&G^>d6?b#)s}oa^A$Qb)66-f?`up#L}0-1zplf}qta)m)4nwCgR`apIEW zv^uiu6J2(Yx9WZ}qkaLY>Q_`z%mBz8qF2&^BtM(vj88DeWLXfRj7whNwS%zU zZn&{YnOYX7 z=o6Nr-1m)(i36W9ApcLpK^M{i5H}DaFuSob#6roIHXuV&4k! z&`6lS&>zu#VPyQ|+l-$wFY}M@3OaKK_!lg~X-T+}EeeK=*wd$HRSgUvC;7s42Epir z^>yD>OPEe#fsFC8bdBuW=(M&Mo9J^WARaF#-020M@D7gAfC*zMe~&J4q_f`;0HG+d z&^SrMYDuH|EvgNaM3uR7;Z0Q`j7W5veDBmg?u$>2K&q0^ns}AW1}WteXOv7uJu2Bp z4qiqH#!=w`s_!Gm9q(WYYy?eTfTG;|@D;J5y!uTzqp?sr+@?2wCt@ z#lb-?Y?185PkEE$hjLDg&5n%-0xIco3B4UU*Vib`;j3JVUaYPD% z<>*f#48$YE9AX9W8u1qK1@Qy%8$o1l4a^T4rijU{$>Hos2+|{$RM4jGB!u#n_GFQp z8aL!qX;Nnv*FG8|Ak<5`PL5KaWQ5Rqbec3N&-UmpIm;dp2sjmt1XY$qyV#EyvTay4 z7#~h*!Z_>JY++s0gw?hUUbBx)qh=d+_q1+uqy5e>Tjr^03&&{4<+^Ebv%^hCu9(um z5+~V#AIH-28HtTbCg`f-ykoin%NB0D=baQeYQ=rm z(GyEdAD)_@^HttgMNj4Z-F(4YTkzuw{%*ndEBbLu{_b*-T@`FTzvRo}oG+L2UPbeZ zMgBnEi$9cLiG%Xi=F7dRU+ux22eteUPh_a8KR<0lw`IP-|Ij& 0 and bits > 0 - return items * bits - -def trits_bise_bitcount(items, bits): - """ - Compute the number of bits needed for trit-based encoding. - """ - - assert items > 0 and bits >= 0 - #return math.ceil((8.0 + 5.0*bits) * items / 5.0) - return math.ceil(8.0*items / 5.0 + bits*items) - -def quints_bise_bitcount(items, bits): - """ - Compute the number of bits needed for quint-based encoding. - """ - - assert items > 0 and bits >= 0 - #return math.ceil((7.0 + 3.0*bits) * items / 3.0) - return math.ceil(7.0*items / 3.0 + bits*items) - -def compute_bise_bitcount(items, quant): - """ - Compute the number of bits needed for the BISE stream. - """ - assert type(items) is int - assert type(quant) is int - assert items > 0 - assert quant >= RANGE_2 and quant <= RANGE_256 - - trits, quints, bits = TRITS_QUINTS_BITS_TABLE[quant] - - if trits == 0 and quints == 0: - return bits_bise_bitcount(items, bits) - elif trits != 0: - return trits_bise_bitcount(items, bits) - elif quints != 0: - return quints_bise_bitcount(items, bits) - else: - assert False - -def last_index(lst, a): - last = -1 - for i in range(len(lst)): - if a == lst[i]: - last = i - if last == -1: - raise ValueError("%s is not in the list" % repr(a)) - return last - -# From ASTC specification, decode the a encoded set of 5 trits. -def decode_trits(T): - assert isinstance(T, bitset) - assert T.size() == 8 - - t4 = -1 - t3 = -1 - t2 = -1 - t1 = -1 - - C = bitset(5, 0) - if T.substr(4, 2) == bitset(3, 0b111): - C.set(4, T.get(7)) - C.set(3, T.get(6)) - C.set(2, T.get(5)) - C.set(1, T.get(1)) - C.set(0, T.get(0)) - t4 = 2 - t3 = 2 - else: - C = T.substr(4, 0) - if T.substr(6, 5) == bitset(2, 0b11): - t4 = 2 - t3 = T.get(7) - else: - t4 = T.get(7) - t3 = T.substr(6, 5).number() - - if C.substr(1, 0) == bitset(2, 0b11): - t2 = 2 - t1 = C.get(4) - t0 = bitset.from_args(C.get(3), C.get(2) & (not C.get(3))).number() - elif C.substr(3, 2) == bitset(2, 0b11): - t2 = 2 - t1 = 2 - t0 = C.substr(1, 0).number() - else: - t2 = C.get(4) - t1 = C.substr(3, 2).number() - t0 = bitset.from_args(C.get(1), C.get(0) & (not C.get(1))).number() - - assert t4 >= 0 and t4 <= 2, t4 - assert t3 >= 0 and t3 <= 2, t3 - assert t2 >= 0 and t2 <= 2, t2 - assert t1 >= 0 and t1 <= 2, t1 - assert t0 >= 0 and t0 <= 2, t0 - - return (t0, t1, t2, t3, t4) - -# From ASTC specification, decode a encoded set of 3 quints. -def decode_quints(Q): - assert Q.size() == 7 - - q2 = -1 - q1 = -1 - q0 = -1 - - if Q.substr(2, 1) == bitset(2, 0b11) and Q.substr(6, 5) == bitset(2, 0b00): - q2 = bitset.from_args( - Q.get(0), Q.get(4) & (not Q.get(0)), Q.get(3) & (not Q.get(0))).number() - q1 = 4 - q0 = 4 - else: - C = None - if Q.substr(2, 1) == bitset(2, 0b11): - q2 = 4 - C = bitset.from_args( - Q.get(4), - Q.get(3), - not Q.get(6), - not Q.get(5), - Q.get(0)) - else: - q2 = Q.substr(6, 5).number() - C = Q.substr(4, 0) - - if C.substr(2, 0) == bitset(3, 0b101): - q1 = 4 - q0 = C.substr(4, 3).number() - else: - q1 = C.substr(4, 3).number() - q0 = C.substr(2, 0).number() - - assert q2 >= 0 and q2 <= 4, q2 - assert q1 >= 0 and q1 <= 4, q1 - assert q0 >= 0 and q0 <= 4, q0 - - return (q0, q1, q2) - -# Generate table for trit decoding for all possible 8 bit numbers, [0, 255]. -def trits_from_integer_table(): - return [decode_trits(bitset(8, i)) for i in range(256)] - -# Generate table for trit decoding by brute force searching the encoding table. -# Exhaustive search solution works because the search space is small. -def integer_from_trits_table(trits): - return \ - [ - [ - [ - [ - [ - last_index(trits, (t0, t1, t2, t3, t4)) - for t0 in range(3) - ] - for t1 in range(3) - ] - for t2 in range(3) - ] - for t3 in range(3) - ] - for t4 in range(3) - ] - -# Generate table for quint encoding for all possible 7 bit numbers, [0, 127]. -def quints_from_integer_table(): - return [decode_quints(bitset(7, i)) for i in range(128)] - -# Generate table for quint decoding by brute force searching the encoding -# table. Exhaustive search solution works because the search space is small. -def integer_from_quints_table(quints): - return \ - [ - [ - [ - last_index(quints, (q0, q1, q2)) - for q0 in range(5) - ] - for q1 in range(5) - ] - for q2 in range(5) - ] - -if __name__ == "__main__": - trits_from_integer = trits_from_integer_table() - integer_from_trits = integer_from_trits_table(trits_from_integer) - quints_from_integer = quints_from_integer_table() - integer_from_quints = integer_from_quints_table(quints_from_integer) - - print(trits_from_integer) - print(integer_from_trits) - print(quints_from_integer) - print(integer_from_quints) diff --git a/submodules/TelegramUI/third-party/astc/pybits/bitset.py b/submodules/TelegramUI/third-party/astc/pybits/bitset.py deleted file mode 100644 index e907e80ea4..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/bitset.py +++ /dev/null @@ -1,77 +0,0 @@ -# A bitset represents a fixed number of bits and have some helper methods for -# manipulating them. -class bitset: - def __init__(self, n, val): - assert n > 0 - assert val < pow(2, n) # number should fit within the available bits - - self.n = n - self.data = val - - def size(self): - return self.n - - def get(self, i): - assert i >= 0 and i < self.n - return (self.data >> i) & 1 - - def get_msb(self): - return self.get(self.n-1) - - def get_lsb(self): - return self.get(0) - - def set(self, i, x): - assert isinstance(x, bool) or isinstance(x, int) - assert i >= 0 and i < self.n - self.data ^= (-x ^ self.data) & (1 << i) - - def substr(self, msb, lsb): - assert msb >= lsb - assert lsb >= 0 - assert msb < self.n - - count = msb - lsb + 1 - newdata = self.data >> lsb & ((1 << count) - 1) - return bitset(count, newdata) - - def number(self): - return self.data - - def bits(self): - return [self.get(i) for i in range(self.n-1, -1, -1)] - - def __eq__(self, other): - assert isinstance(other, bitset) - - return self.n == other.n and self.data == other.data - - def __str__(self): - return ''.join('1' if x else '0' for x in self.bits()) - - def __repr__(self): - return "bitset(%d, 0b%s)" % (self.n, self.__str__()) - - @staticmethod - def from_list(lst): - num = 0 - n = len(lst) - 1 - for x in lst: - assert x >= 0 and x <= 1 - num = num | (x << n) - n = n - 1 - - return bitset(len(lst), num) - - @staticmethod - def from_args(*args): - return bitset.from_list(list(args)) - - @staticmethod - def join(a, b): - assert isinstance(a, bitset) - assert isinstance(b, bitset) - - count = a.size()+b.size() - number = b.number() | (a.number() << b.size()) - return bitset(count, number) diff --git a/submodules/TelegramUI/third-party/astc/pybits/codegen.py b/submodules/TelegramUI/third-party/astc/pybits/codegen.py deleted file mode 100644 index eb44320157..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/codegen.py +++ /dev/null @@ -1,154 +0,0 @@ -#!/usr/bin/env python - -import bise -import datasize -import partitions -import quantize -import sys - - -def safe_head(lst, default): - try: - return lst[0] - except: - return default - - -def compute_dimensions(array): - if isinstance(array, list): - yield len(array) - yield from compute_dimensions(array[-1]) - - -def pretty_array(element, fmt): - if isinstance(element, int): - return fmt % element - elif isinstance(element, tuple) or isinstance(element, list): - return pretty_array(iter(element), fmt) - else: - first = next(element) - - out = "{" - out += pretty_array(first, fmt) - for x in element: - out += "," - out += pretty_array(x, fmt) - out += "}" - return out - - -def pretty_dimensions(dimensions): - out = "" - for dimension in dimensions: - out += "[" + str(dimension) + "]" - return out - -header_template = """#ifndef {guard} -#define {guard} - -{content} - -#endif -""" - -array_template = "const {type} {name}{dimensions} = {array};" - - -def build_header(guard, content): - return header_template.format(guard=guard, content=content) - - -def build_array(type, name, array): - return array_template.format( - name=name, - type=type, - dimensions=pretty_dimensions(compute_dimensions(array)), - array=pretty_array(array, "%d"), - ) - - -def print_bise_tables(file): - trits_from_integer = bise.trits_from_integer_table() - integer_from_trits = bise.integer_from_trits_table(trits_from_integer) - quints_from_integer = bise.quints_from_integer_table() - integer_from_quints = bise.integer_from_quints_table(quints_from_integer) - - file.write(build_header( - "ASTC_TABLES_INTEGER_SEQUENCE_ENCODING_H_", - build_array("uint8_t", "integer_from_trits", integer_from_trits) + - '\n' + - build_array("uint8_t", "integer_from_quints", integer_from_quints) - )) - - -def print_partitions_tables(file): - table = list(partitions.compute_partitioning_table( - partition_count=2, - block_width=4, - block_height=4)) - lookup_table = partitions.compute_partitioning_lookup_table(table) - - file.write(build_header( - "ASTC_TABLES_PARTITIONS_H_", - build_array( - "uint16_t", - "partition_2_4x4_mask_table", - [part.partition_mask for part in table] - ) + '\n' + - build_array( - "int16_t", - "partition_2_4x4_lookup_table", - [safe_head(parts, -1) for parts in lookup_table] - ) - )) - - -def print_data_size_table(file, block_width, block_height): - table = datasize.color_endpoint_range_table(block_width, block_height) - file.write(build_header( - "ASTC_TABLES_DATA_SIZE_H_", - build_array("int8_t", "color_endpoint_range_table", table) - )) - - -def print_color_quantization_tables(file): - unquantize_table = quantize.color_unquantize_table() - quantize_table = quantize.color_quantize_table(unquantize_table) - - file.write(build_header( - "ASTC_TABLES_COLOR_QUANTIZATION_H_", - build_array("uint8_t", "color_unquantize_table", unquantize_table) + - '\n' + - build_array("uint8_t", "color_quantize_table", quantize_table) - )) - - -def print_usage(prog): - sys.stderr.write( - ("Usage: %s COMMAND\n" - " Commands:\n" - " bise\n" - " partitions\n" - " datasize\n" - " quantize\n") % prog) - - -def main(kind, path): - file = open(path, 'w') if path != '-' else sys.stdout - if kind == "bise": - print_bise_tables(file) - elif kind == "partitions": - print_partitions_tables(file) - elif kind == "datasize": - print_data_size_table(file, 4, 4) - elif kind == "quantize": - print_color_quantization_tables(file) - else: - sys.stderr.write("Error: unknown mode {}\n".format(kind)) - sys.exit(1) - - -if len(sys.argv) != 3: - print_usage(sys.argv[0]) -else: - main(sys.argv[1], sys.argv[2]) diff --git a/submodules/TelegramUI/third-party/astc/pybits/datainfo.py b/submodules/TelegramUI/third-party/astc/pybits/datainfo.py deleted file mode 100644 index e3b41f6f0e..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/datainfo.py +++ /dev/null @@ -1,46 +0,0 @@ -from bise import compute_bise_bitcount -from datasize import data_size, cem_values_count, color_endpoint_range -from range import RANGE_CARDINALITY_TABLE -import sys - - -def print_data_size_info(block_width, block_height, cem, partitions, - weight_range): - config_bits, weight_bits, remaining_bits = data_size( - partitions=partitions, - single_cem=True, - block_width=block_width, - block_height=block_height, - block_depth=1, - dual_plane=False, - weight_range=weight_range - ) - - ce_values = cem_values_count(cem, partitions) - ce_range = color_endpoint_range(cem, remaining_bits, partitions) - cem_bits = compute_bise_bitcount(ce_values, ce_range) - - print("block width:", block_width) - print("block height:", block_height) - print("config bits:", config_bits) - print("weight count:", block_width * block_height) - print("weight range:", RANGE_CARDINALITY_TABLE[weight_range]) - print("weight bits:", weight_bits) - print("remaining bits:", remaining_bits) - print("color endpoint values:", ce_values) - print("color endpoint range:", RANGE_CARDINALITY_TABLE[ce_range]) - print("color endpoint bits:", cem_bits) - print("unused bits:", remaining_bits - cem_bits) - - -if len(sys.argv) != 6: - sys.stderr.write( - "Usage: {} BLOCKWIDTH BLOCKHEIGHT CEM PARTITIONS WEIGHTRANGE\n".format( - sys.argv[0])) -else: - print_data_size_info( - int(sys.argv[1]), - int(sys.argv[2]), - int(sys.argv[3]), - int(sys.argv[4]), - int(sys.argv[5])) diff --git a/submodules/TelegramUI/third-party/astc/pybits/datasize.py b/submodules/TelegramUI/third-party/astc/pybits/datasize.py deleted file mode 100644 index 53000b026c..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/datasize.py +++ /dev/null @@ -1,137 +0,0 @@ -from bise import compute_bise_bitcount -from endpointmodes import * -from range import * - -# Count the number of set bits in a number. -def count_bits(x): - assert type(x) is int - assert x >= 0 # negative integers are undefined behaviour - - count = 0 - while x != 0: - if x & 1: - count = count + 1 - x = x >> 1 - - return count - -# Calculate the number of bits used for config data, texel weight data and -# color endpoint data for an ASTC block. -def data_size( - partitions, - single_cem, - block_width, - block_height, - block_depth, - dual_plane, - weight_range): - - assert partitions >= 1 and partitions <= 4 - assert isinstance(single_cem, bool), single_cem - assert block_width >= 1 and block_width <= 12 - assert block_height >= 1 and block_height <= 12 - assert block_depth >= 1 and block_depth <= 12 - assert isinstance(dual_plane, bool) - assert weight_range < WEIGHT_RANGE_MAX - - if partitions == 4 and dual_plane: - raise ValueError("illegal encoding with 4 partitions and dual planes") - - config_bits = 17 - if partitions > 1: - if single_cem: - config_bits = 29 - else: - config_bits = 24 + 3 * partitions - - weights = block_width * block_height * block_depth - - if weights > 64: - raise ValueError("illegal encoding with {} (> 64) weights".format(weights)) - - if dual_plane: - config_bits += 2 - weights *= 2 - - weight_bits = compute_bise_bitcount(weights, weight_range) - - if weight_bits < 24: - raise ValueError("illegal encoding with {} (< 24) weight bits".format(weight_bits)) - - if weight_bits > 96: - raise ValueError("illegal encoding with {} (> 96) weight bits".format(weight_bits)) - - remaining_bits = 128 - config_bits - weight_bits - - return config_bits, weight_bits, remaining_bits - -# Define the class for every color endpoint mode. Used to derive the range for -# color endpoint encoding. -CEM_VALUE_COUNT_TABLE = \ - [ - 2, 2, 2, 2, - 4, 4, 4, 4, - 6, 6, 6, 6, - 8, 8, 8, 8 - ] - -# Count the number of encoded color endpoint values we are storing. -def cem_values_count(cem, partitions): - assert cem < CEM_MAX - - # The ASTC specification derives this count from the CEM class and a value - # they call extra_CEM_bits. I do not understand what extra_CEM_bits is - # referring to, I use the CEM_VALUE_COUNT_TABLE instead and assume that - # there is one set of endpoint values for each partition. - return CEM_VALUE_COUNT_TABLE[cem] * partitions - -# Calculate the range for color endpoint encoding for a given number of -# remaining bits. -def color_endpoint_range(cem, remaining_bits, partitions): - assert cem < CEM_MAX - - cem_values = cem_values_count(cem, partitions) - - if cem_values > 18: - raise ValueError("illegal encoding with {} (> 18) integers for color endpoints".format(cem_values)) - - # Brute-force search for the biggest range which fits in the remaining - # bits. - for ce_range in reversed(range(RANGE_MAX)): - cem_bits = compute_bise_bitcount(cem_values, ce_range) - - if cem_bits <= remaining_bits: - return ce_range - - raise ValueError("illegal encoding with not enough bits for cem {}".format(remaining_bits)) - -def color_endpoint_range_table(block_width, block_height): - def handle_except(partitions, cem, weight_range): - assert weight_range < WEIGHT_RANGE_MAX - try: - _, _, remaining_bits = data_size( - partitions = partitions, - single_cem = True, - block_width = block_width, - block_height = block_height, - block_depth = 1, - dual_plane = False, - weight_range = weight_range) - return color_endpoint_range(cem, remaining_bits, partitions) - except ValueError: - return -1 - - return \ - [ - [ - [ - handle_except(partitions, cem, weight_range) - for cem in range(CEM_MAX) - ] - for weight_range in range(WEIGHT_RANGE_MAX) - ] - for partitions in [1, 2] - ] - -if __name__ == "__main__": - print(color_endpoint_range_table(4, 4)) diff --git a/submodules/TelegramUI/third-party/astc/pybits/endpointmodes.py b/submodules/TelegramUI/third-party/astc/pybits/endpointmodes.py deleted file mode 100644 index 6582cb36da..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/endpointmodes.py +++ /dev/null @@ -1,17 +0,0 @@ -CEM_LDR_LUMINANCE_DIRECT = 0 -CEM_LDR_LUMINANCE_BASE_OFFSET = 1 -CEM_HDR_LUMINANCE_LARGE_RANGE = 2 -CEM_HDR_LUMINANCE_SMALL_RANGE = 3 -CEM_LDR_LUMINANCE_ALPHA_DIRECT = 4 -CEM_LDR_LUMINANCE_ALPHA_BASE_OFFSET = 5 -CEM_LDR_RGB_BASE_SCALE = 6 -CEM_HDR_RGB_BASE_SCALE = 7 -CEM_LDR_RGB_DIRECT = 8 -CEM_LDR_RGB_BASE_OFFSET = 9 -CEM_LDR_RGB_BASE_SCALE_PLUS_TWO_ALPHA = 10 -CEM_HDR_RGB = 11 -CEM_LDR_RGBA_DIRECT = 12 -CEM_LDR_RGBA_BASE_OFFSET = 13 -CEM_HDR_RGB_LDR_ALPHA = 14 -CEM_HDR_RGB_HDR_ALPHA = 15 -CEM_MAX = 16 diff --git a/submodules/TelegramUI/third-party/astc/pybits/partition-images.py b/submodules/TelegramUI/third-party/astc/pybits/partition-images.py deleted file mode 100644 index a98cea8882..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/partition-images.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python - -from partitions import compute_partitioning_table -import matplotlib.image as mpimg -import numpy as np - -def masks_to_image(block_width, block_height, masks): - colors = [ (1, 0, 0), (0, 0, 1), (0, 1, 0), (1, 1, 1) ] - - xblocks = 32 - yblocks = 32 - - img_width = xblocks * (block_width + 1) + 1 - img_height = yblocks * (block_height + 1) + 1 - - pixels = np.zeros((img_height, img_width, 3)) - - i = 0 - for mask in masks: - xblock = i % xblocks - yblock = i // xblocks - - xtopleft = xblock * (block_width + 1) + 1 - ytopleft = yblock * (block_height + 1) + 1 - - j = 0 - for partition in mask: - x = j % block_width - y = j // block_width - pixels[ytopleft+y, xtopleft+x] = colors[partition] - j = j + 1 - - i = i + 1 - - assert i == 1024 - - return pixels - -def write_image(partition_count, block_width, block_height): - table = compute_partitioning_table( - partition_count = partition_count, - block_width = block_width, - block_height = block_height) - - img = masks_to_image( - block_width = block_width, - block_height = block_height, - masks = table) - - path = "/tmp/%dx%d-blocks-%d-partitions.png" % (block_width, block_height, partition_count) - mpimg.imsave(path, img) - -if __name__ == "__main__": - write_image(2, 4, 4) - write_image(3, 4, 4) - write_image(4, 4, 4) - write_image(4, 6, 12) - write_image(4, 12, 6) - write_image(4, 12, 12) diff --git a/submodules/TelegramUI/third-party/astc/pybits/partitions.py b/submodules/TelegramUI/third-party/astc/pybits/partitions.py deleted file mode 100644 index 8aeb3f99cb..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/partitions.py +++ /dev/null @@ -1,289 +0,0 @@ -def square(x): - return x*x - -def shiftr32(x, y): - return (x >> y) & (2**32-1) - -def shiftl32(x, y): - return (x << y) & (2**32-1) - -def xor32(x, y): - return x ^ y - -def add32(x, y): - return (x + y) % 2**32 - -def sub32(x, y): - return (x - y) % 2**32 - -def hash52(p): - p = xor32(p, shiftr32(p, 15)) - p = sub32(p, shiftl32(p, 17)) - p = add32(p, shiftl32(p, 7)) - p = add32(p, shiftl32(p, 4)) - p = xor32(p, shiftr32(p, 5)) - p = add32(p, shiftl32(p, 16)) - p = xor32(p, shiftr32(p, 7)) - p = xor32(p, shiftr32(p, 3)) - p = xor32(p, shiftl32(p, 6)) - p = xor32(p, shiftr32(p, 17)) - - assert p >= 0 and p < 2**32 - - return p - -# Select partion index as defined by ASTC specification. -def select_partition(seed, x, y, z, partition_count, small_block): - assert seed >= 0 and seed < 2**10 - assert partition_count >= 1 and partition_count <= 4 - - if small_block: - x = x << 1 - y = y << 1 - z = z << 1 - - seed += (partition_count - 1) * 1024 - - rnum = hash52(seed) - - seed1 = square(rnum & 0xF) - seed2 = square((rnum >> 4) & 0xF) - seed3 = square((rnum >> 8) & 0xF) - seed4 = square((rnum >> 12) & 0xF) - seed5 = square((rnum >> 16) & 0xF) - seed6 = square((rnum >> 20) & 0xF) - seed7 = square((rnum >> 24) & 0xF) - seed8 = square((rnum >> 28) & 0xF) - seed9 = square((rnum >> 18) & 0xF) - seed10 = square((rnum >> 22) & 0xF) - seed11 = square((rnum >> 26) & 0xF) - seed12 = square(((rnum >> 30) | (rnum << 2)) & 0xF) - - sh1 = 4 if seed & 2 else 5 - sh2 = 6 if partition_count == 3 else 5 - - if not (seed & 1): - sh1, sh2 = (sh2, sh1) - - sh3 = sh1 if seed & 0x10 else sh2 - - seed1 = seed1 >> sh1 - seed2 = seed2 >> sh2 - seed3 = seed3 >> sh1 - seed4 = seed4 >> sh2 - seed5 = seed5 >> sh1 - seed6 = seed6 >> sh2 - seed7 = seed7 >> sh1 - seed8 = seed8 >> sh2 - seed9 = seed9 >> sh3 - seed10 = seed10 >> sh3 - seed11 = seed11 >> sh3 - seed12 = seed12 >> sh3 - - a = seed1*x + seed2*y + seed11*z + (rnum >> 14) - b = seed3*x + seed4*y + seed12*z + (rnum >> 10) - c = seed5*x + seed6*y + seed9*z + (rnum >> 6) - d = seed7*x + seed8*y + seed10*z + (rnum >> 2) - - a = a & 0x3F - b = b & 0x3F if partition_count > 1 else 0 - c = c & 0x3F if partition_count > 2 else 0 - d = d & 0x3F if partition_count > 3 else 0 - - if a >= b and a >= c and a >= d: - return 0 - elif b >= c and b >= d: - return 1 - elif c >= d: - return 2 - else: - return 3 - -# Convert a list of digits to a number with a specific base. -def digits_to_num(base, lst): - sum = 0 - power = 0 - for x in lst: - sum = sum + x * (base**power) - power = power + 1 - return sum - -# Convert a number to a list of digits for a certain base. -def num_to_digits(base, digits, num): - for x in range(0, digits): - yield num % base - num = num // base - -class partitioning: - bit_masks = [0x1, 0x1, 0x3, 0x3] - shift_counts = [1, 1, 2, 2] - - def __init__(self, partition_count, block_width, block_height, partition_mask): - assert isinstance(partition_mask, int) - assert partition_count >= 1 and partition_count <= 4 - - self.block_width = block_width - self.block_height = block_height - self.texel_count = block_width * block_height - self.partition_count = partition_count - self.partition_mask = partition_mask - - self.bit_mask = partitioning.bit_masks[partition_count-1] - self.shift_count = partitioning.shift_counts[partition_count-1] - - def __eq__(self, other): - return \ - self.partition_count == other.partition_count and \ - self.block_width == other.block_width and \ - self.block_height == other.block_height and \ - self.partition_mask == other.partition_mask - - def __iter__(self): - return num_to_digits( - self.partition_count, - self.texel_count, - self.partition_mask) - - def __str__(self): - return "%#x" % self.partition_mask - - def __repr__(self): - return "partitioning({}, {}, {}, [{}])".format( - self.partition_count, - self.block_width, - self.block_height, - ",".join((str(x) for x in self))) - -def invert(part): - assert isinstance(part, partitioning) - assert part.partition_count == 2 - - return partitioning( - part.partition_count, - part.block_width, - part.block_height, - part.partition_mask ^ (2**part.texel_count-1)) - -def distance(a, b): - assert isinstance(a, partitioning) - assert isinstance(b, partitioning) - assert a.partition_count == b.partition_count - assert a.block_width == b.block_width - assert a.block_height == b.block_height - - def cost(m, n): - return 0 if m == n else 1 - - return sum((cost(m, n) for (m, n) in zip(a, b))) - -# Create human readable format for a partition mask. -def show_ascii(part): - assert isinstance(part, partitioning) - - s = "" - i = 0 - j = 0 - for p in part: - s = s + str(p) - i = i + 1 - - if i == part.block_width and j < part.block_height-1: - s = s + "\n" - i = 0 - j = j + 1 - - return s - -# Compute the partition bitmask for a given block size, partition count and -# seed. The bitmask is a list of numbers in range [0, partition count-1] -# starting in top left corner of the block in row major order. -def compute_partitioning(partition_count, block_width, block_height, seed): - width_range = range(0, block_width) - height_range = range(0, block_height) - - def f(x, y): - return select_partition(seed, x, y, 0, partition_count, True) - - return partitioning( - partition_count, - block_width, - block_height, - digits_to_num( - partition_count, - (f(x, y) for y in height_range for x in width_range))) - -# Compute the table that maps partition seeds to partition block masks for a -# given block size and partition count. -def compute_partitioning_table(partition_count, block_width, block_height): - def f(seed): - return compute_partitioning( - partition_count = partition_count, - block_width = block_width, - block_height = block_height, - seed = seed) - - return (f(seed) for seed in range(0, 2**10)) - -# Compute the lookup table from a partition mask to a matching partition index. -# Matching is done according to the edit distance between the partitioning and -# all availible partitions. -def compute_partitioning_lookup_table(table): - assert len(table) == 1024 - - partition_count = 2 - block_width = 4 - block_height = 4 - - for ideal in range(0, 2**16): - ideal_part = partitioning( - partition_count = partition_count, - block_width = block_width, - block_height = block_height, - partition_mask = ideal) - ideal_inverted_part = invert(ideal_part) - - best_score = 100000 - best_indices = [] - for index, actual_part in enumerate(table): - score = min( - distance(ideal_part, actual_part), - distance(ideal_inverted_part, actual_part)) - if score < 2: - if score == best_score: - best_indices.append(index) - elif score < best_score: - best_score = score - best_indices = [index] - - yield best_indices - -def compute_partitioning_lookup_table_equality(table): - assert len(table) == 1024 - - partition_count = 2 - block_width = 4 - block_height = 4 - - for ideal in range(0, 2**16): - ideal_part = partitioning( - partition_count = partition_count, - block_width = block_width, - block_height = block_height, - partition_mask = ideal) - ideal_inverted_part = invert(ideal_part) - - for index, actual_part in enumerate(table): - if ideal_part == actual_part or ideal_inverted_part == actual_part: - yield index - - yield -1 - - -if __name__ == "__main__": - table = list(compute_partitioning_table( - partition_count=2, - block_width=4, - block_height=4)) - print([list(part) for part in table]) - lookup_table = compute_partitioning_lookup_table(table) - print(list(lookup_table)) diff --git a/submodules/TelegramUI/third-party/astc/pybits/quantize.py b/submodules/TelegramUI/third-party/astc/pybits/quantize.py deleted file mode 100644 index 97f57bc9ef..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/quantize.py +++ /dev/null @@ -1,123 +0,0 @@ -from bitset import bitset -from range import * - -def unquantize_color(i, quant): - assert i >= 0 and i < RANGE_CARDINALITY_TABLE[quant] - assert quant >= RANGE_2 and quant <= RANGE_256 - - def unquant(a, b, c, d): - """ - This is the magic bit twiddling hack ARM uses in the ASTC decoder - specification to avoid full-width multipliers. - - T = D * C + B; - T = T ^ A; - T = (A & 0x80) | (T >> 2); - """ - return (a & 0x80) | (((d*c + b) ^ a) >> 2) - - def bit_only(lst): - return bitset.from_list(lst).number() - - def trit_quint(A, B, C, D): - return unquant( - bitset.from_list(A).number(), - bitset.from_list(B).number(), - C, - bitset.from_list(D).number()) - - bits = bitset(8, i) - a = bits.get(0) - b = bits.get(1) - c = bits.get(2) - d = bits.get(3) - e = bits.get(4) - f = bits.get(5) - g = bits.get(6) - h = bits.get(7) - - if quant == RANGE_2: - return bit_only([a,a,a,a,a,a,a,a]) - elif quant == RANGE_3: - return [0, 128, 255][i] - elif quant == RANGE_4: - return bit_only([b,a,b,a,b,a,b,a]) - elif quant == RANGE_5: - return [0, 64, 128, 192, 255][i] - elif quant == RANGE_6: - return trit_quint([a,a,a,a,a,a,a,a,a], [0,0,0,0,0,0,0,0,0], 204, [c,b]) - elif quant == RANGE_8: - return bit_only([c,b,a,c,b,a,c,b]) - elif quant == RANGE_10: - return trit_quint([a,a,a,a,a,a,a,a,a], [0,0,0,0,0,0,0,0,0], 113, [d,c,b]) - elif quant == RANGE_12: - return trit_quint([a,a,a,a,a,a,a,a,a], [b,0,0,0,b,0,b,b,0], 93, [d,c]) - elif quant == RANGE_16: - return bit_only([d,c,b,a,d,c,b,a]) - elif quant == RANGE_20: - return trit_quint([a,a,a,a,a,a,a,a,a], [b,0,0,0,0,b,b,0,0], 54, [e,d,c]) - elif quant == RANGE_24: - return trit_quint([a,a,a,a,a,a,a,a,a], [c,b,0,0,0,c,b,c,b], 44, [e,d]) - elif quant == RANGE_32: - return bit_only([e,d,c,b,a,e,d,c]) - elif quant == RANGE_40: - return trit_quint([a,a,a,a,a,a,a,a,a], [c,b,0,0,0,0,c,b,c], 26, [f,e,d]) - elif quant == RANGE_48: - return trit_quint([a,a,a,a,a,a,a,a,a], [d,c,b,0,0,0,d,c,b], 22, [f,e]) - elif quant == RANGE_64: - return bit_only([f,e,d,c,b,a,f,e]) - elif quant == RANGE_80: - return trit_quint([a,a,a,a,a,a,a,a,a], [d,c,b,0,0,0,0,d,c], 13, [g,f,e]) - elif quant == RANGE_96: - return trit_quint([a,a,a,a,a,a,a,a,a], [e,d,c,b,0,0,0,e,d], 11, [g,f]) - elif quant == RANGE_128: - return bit_only([g,f,e,d,c,b,a,g]) - elif quant == RANGE_160: - return trit_quint([a,a,a,a,a,a,a,a,a], [e,d,c,b,0,0,0,0,e], 6, [h,g,f]) - elif quant == RANGE_192: - return trit_quint([a,a,a,a,a,a,a,a,a], [f,e,d,c,b,0,0,0,f], 5, [h,g]) - elif quant == RANGE_256: - return bit_only([h,g,f,e,d,c,b,a]) - - assert False - -def find_closest(unquantized, value): - assert isinstance(unquantized, list) - assert len(unquantized) > 0 - assert isinstance(value, int) - - class Item: - def __init__(self, index): - self.index = index - self.cost = abs(value - unquantized[self.index]) - - def __lt__(self, other): - return self.cost < other.cost - - return min(map(Item, range(len(unquantized)))).index - -def color_quantize_table(color_unquantize_table): - return \ - [ - [ - find_closest(color_unquantize_table[quant], i) - for i in range(256) - ] - for quant in range(RANGE_MAX) - ] - -def color_unquantize_table(): - return \ - [ - [ - unquantize_color(i, quant) - for i in range(RANGE_CARDINALITY_TABLE[quant]) - ] - for quant in range(RANGE_MAX) - ] - -if __name__ == "__main__": - unquantize_table = color_unquantize_table() - quantize_table = color_quantize_table(unquantize_table) - print(unquantize_table) - print(quantize_table) diff --git a/submodules/TelegramUI/third-party/astc/pybits/range.py b/submodules/TelegramUI/third-party/astc/pybits/range.py deleted file mode 100644 index c3423e44f7..0000000000 --- a/submodules/TelegramUI/third-party/astc/pybits/range.py +++ /dev/null @@ -1,67 +0,0 @@ -# There are 21 ranges (intervals in math lingo) for endpoint values. -RANGE_2 = 0 -RANGE_3 = 1 -RANGE_4 = 2 -RANGE_5 = 3 -RANGE_6 = 4 -RANGE_8 = 5 -RANGE_10 = 6 -RANGE_12 = 7 -RANGE_16 = 8 -RANGE_20 = 9 -RANGE_24 = 10 -RANGE_32 = 11 -RANGE_40 = 12 -RANGE_48 = 13 -RANGE_64 = 14 -RANGE_80 = 15 -RANGE_96 = 16 -RANGE_128 = 17 -RANGE_160 = 18 -RANGE_192 = 19 -RANGE_256 = 20 -RANGE_MAX = 21 - -# Table of each range's cardinality, that is the number of representable -# integers in each range. -RANGE_CARDINALITY_TABLE = \ - [ - 2, - 3, - 4, - 5, - 6, - 8, - 10, - 12, - 16, - 20, - 24, - 32, - 40, - 48, - 64, - 80, - 96, - 128, - 160, - 192, - 256 - ] - -# There are 12 ranges for texel weights. -WEIGHT_RANGE_MAX = 12 - -def range_lookup(count): - """ - Find what quantization range an number of elements can be represented with. - """ - - assert type(count) is int - assert count >= 2 and count <= 256 - - for i in range(RANGE_MAX): - if count <= RANGE_CARDINALITY_TABLE[i]: - return i - - assert False diff --git a/submodules/TelegramUI/third-party/bc1/BC1Compression.cpp b/submodules/TelegramUI/third-party/bc1/BC1Compression.cpp deleted file mode 100644 index 1b71328b29..0000000000 --- a/submodules/TelegramUI/third-party/bc1/BC1Compression.cpp +++ /dev/null @@ -1,301 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#include "BC1Compression.h" -#include "ColorVec.h" -#include -#include -#include - -namespace DTX1CompressorDecompressor -{ - bool BC1Compression::Compress(const BMPImage & bmpImage, BC1DDSImage & ddsImage) - { - unsigned char* dtaPtr = bmpImage.GetData(); - if (dtaPtr == nullptr) - { - return false; // should return an error code - } - - const unsigned int width = bmpImage.GetWidth(); - const unsigned int height = bmpImage.GetHeight(); - const unsigned int nBlocks = (width / 4) * (height / 4); - - // reserve memory for the ddsImage - unsigned char* ddsImageData = new unsigned char[nBlocks * m_blockSize]; - - // TODO: this first pass over the image may not be needed, for now we use it as to get things working first - // here we get data of the bmp image as pixels array - std::vector pixelData(width * height); - for (unsigned int row = 0; row < height; ++row) - { - for (unsigned int col = 0; col < width; ++col) - { - unsigned int index = (height - 1 - row) * width + col; // image is reversed in rows (upside down), so row = 0 is the bottom of the image - std::memcpy(&pixelData[index].bgra, dtaPtr, 3); - dtaPtr += 4; - } - } - - // compress all 4x4 blocks of the bmpImage - unsigned char* ddsDataPtr = ddsImageData; - for (unsigned int row = 0; row < height; row += 4) - { - for (unsigned int col = 0; col < width; col += 4) - { - // TODO : potentially we could use multiple threads to compress multiple blocks in parallel - CompressBlock(pixelData, row, col, width, ddsDataPtr); - ddsDataPtr += m_blockSize; - } - } - - // finialize dds image initialization (headers + data) - if(!ddsImage.InitWithData(ddsImageData, width, height)) - { - if(ddsImageData != nullptr) - delete[] ddsImageData; - - return false; // should return an error code - } - - return true; - } - - bool BC1Compression::DeCompress(const BC1DDSImage & ddsImage, BMPImage & bmpImage) - { - unsigned char* ddsDataPtr = ddsImage.GetData(); - if (ddsDataPtr == nullptr) - { - return false; // should return an error code - } - - const unsigned int width = ddsImage.GetWidth(); - const unsigned int height = ddsImage.GetHeight(); - - // similar to compression we use the aid of a pixel array - std::vector pixelData(width * height); - - // de-compress all 4x4 blocks of the ddsImage - for (unsigned int row = 0; row < height; row += 4) - { - for (unsigned int col = 0; col < width; col += 4) - { - // TODO : potentially we could use multiple threads to de-compress multiple blocks in parallel - DeCompressBlock(pixelData, row, col, width, ddsDataPtr); - ddsDataPtr += m_blockSize; - } - } - - // copy pixel data to the actual bmp image - unsigned char* bmpImgData = new unsigned char[4 * width * height]; - memset(bmpImgData, 0xff, 4 * width * height); - unsigned char* bmpDataPtr = bmpImgData; - - for (unsigned int row = 0; row < height; ++row) - { - for (unsigned int col = 0; col < width; ++col) - { - unsigned int index = (height - 1 - row) * width + col; // image is reversed in rows (upside down), so row = 0 is the bottom of the image - std::memcpy(bmpDataPtr, &pixelData[index].bgra, 3); - bmpDataPtr += 4; - } - } - - // finialize bmp image initialization (headers + data) - if (!bmpImage.InitWithData(bmpImgData, width, height)) - { - if (bmpImgData != nullptr) - delete[] bmpImgData; - - return false; - } - - return true; - } - - void BC1Compression::CompressBlock(const std::vector & pixelData, unsigned int row, unsigned int col, unsigned int width, unsigned char* ddsDataPtr) const - { - // find the min-max - int maxVal = -1; - Pixel24Bit maxColor; - - int minVal = INT_MAX; - Pixel24Bit minColor; - - for (unsigned int r = row; r < row + 4; ++r) - { - for (unsigned int c = col; c < col + 4; ++c) - { - unsigned int pixelIndex = r * width + c; - int l = pixelData[pixelIndex].GetLuminance(); - - if (l > maxVal) - { - maxColor.SetPixel24Bit(pixelData[pixelIndex]); - maxVal = l; - } - - if (l < minVal) - { - minColor.SetPixel24Bit(pixelData[pixelIndex]); - minVal = l; - } - } - } - - // fix the end points colors min and max based on their RGB565 values - unsigned short minColorRGB565 = minColor.ConvertTo565(); - unsigned short maxColorRGB565 = maxColor.ConvertTo565(); - if (minColorRGB565 > maxColorRGB565) - { - std::swap(minColor, maxColor); - std::swap(minColorRGB565, maxColorRGB565); - } - - // set the first two colors to compressed block - std::memcpy(ddsDataPtr, &maxColorRGB565, 2); - ddsDataPtr += 2; - - std::memcpy(ddsDataPtr, &minColorRGB565, 2); - ddsDataPtr += 2; - - // fix : min and max colors can be collapsed to the same color! i.e. maxColorRGB565 == minColorRGB565 - // therefore we use the reverted 24 bit colors for the enconding below - maxColor.LoadFrom565(maxColorRGB565); - minColor.LoadFrom565(minColorRGB565); - - // intermediate colors (check BC1 Section on https://msdn.microsoft.com/en-us/library/windows/desktop/bb694531(v=vs.85).aspx) - Pixel24Bit color2, color3; - for (unsigned int i = 0; i < 3; ++i) - { - color2.bgra[i] = (2 * maxColor.bgra[i] + 1 * minColor.bgra[i]) / 3; - color3.bgra[i] = (1 * maxColor.bgra[i] + 2 * minColor.bgra[i]) / 3; - } - - // find the closest color for each color and set its offset bit - unsigned int pixelCount = 0; - unsigned int encodedOffsets = 0; - for (unsigned int r = row; r < row + 4; ++r) - { - for (unsigned int c = col; c < col + 4; ++c) - { - unsigned int pixelIndex = r * width + c; - - Pixel24Bit color; - color.SetPixel24Bit(pixelData[pixelIndex]); - - int minD = color.SqrDistanceTo(maxColor); - unsigned int offset = 0; - - int d = color.SqrDistanceTo(minColor); - if (d < minD) - { - minD = d; - offset = 1; - } - - d = color.SqrDistanceTo(color2); - if (d < minD) - { - minD = d; - offset = 2; - } - - d = color.SqrDistanceTo(color3); - if (d < minD) - { - minD = d; - offset = 3; - } - - // here the offsets are set in a way that the final enconded set of bits are : - // pixel 16 offset | pixel 15 offset | ....... | pixel 0 offset - // each offset is 2 bit, the resulting econded offsets is 32bit = 16bit * 2 = 4 bytes - unsigned int shift = (unsigned int)(pixelCount << 1); - encodedOffsets |= (offset << shift ); - pixelCount++; - } - } - - // write the whole enconded offsets 4 byte word to the compressed block - std::memcpy(ddsDataPtr, &encodedOffsets, 4); - ddsDataPtr += 4; - } - - void BC1Compression::DeCompressBlock(std::vector & pixelData, unsigned int row, unsigned int col, unsigned int width, unsigned char* ddsDataPtr) const - { - // get the first two colors from compressed block - Pixel24Bit minColor, maxColor; - - unsigned short maxColorRGB565; - std::memcpy(&maxColorRGB565, ddsDataPtr, 2); - ddsDataPtr += 2; - maxColor.LoadFrom565(maxColorRGB565); - - unsigned short minColorRGB565; - std::memcpy(&minColorRGB565, ddsDataPtr, 2); - ddsDataPtr += 2; - minColor.LoadFrom565(minColorRGB565); - - // interpolate the other two colors - Pixel24Bit color2, color3; - for (unsigned int i = 0; i < 3; ++i) - { - color2.bgra[i] = (2 * maxColor.bgra[i] + 1 * minColor.bgra[i]) / 3; - color3.bgra[i] = (1 * maxColor.bgra[i] + 2 * minColor.bgra[i]) / 3; - } - - // get the encoded offset - unsigned int encodedOffsets; - std::memcpy(&encodedOffsets, ddsDataPtr, 4); - ddsDataPtr += 4; - - // set for each pixel their color according to the 2bit offset in the compressed block - for (unsigned int r = row; r < row + 4; ++r) - { - for (unsigned int c = col; c < col + 4; ++c) - { - unsigned int offset = (encodedOffsets & (unsigned int) 0x03); // the two right hand side bits - encodedOffsets = encodedOffsets >> 2; - - // get the color according to the offset - Pixel24Bit color; - if(offset == 0) - color.SetPixel24Bit(maxColor); - - else if(offset == 1) - color.SetPixel24Bit(minColor); - - else if(offset == 2) - color.SetPixel24Bit(color2); - - else if(offset == 3) - color.SetPixel24Bit(color3); - - // set the color - unsigned int pixelIndex = r * width + c; - pixelData[pixelIndex].SetPixel24Bit(color); - } - } - } - -} diff --git a/submodules/TelegramUI/third-party/bc1/BC1Compression.h b/submodules/TelegramUI/third-party/bc1/BC1Compression.h deleted file mode 100644 index 2c181d0b82..0000000000 --- a/submodules/TelegramUI/third-party/bc1/BC1Compression.h +++ /dev/null @@ -1,51 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#ifndef RL_BC1_COMPRESSION_H -#define RL_BC1_COMPRESSION_H - -#include "TypeDefinitions.h" -#include "BMPImage.h" -#include "DDSImage.h" -#include - -namespace DTX1CompressorDecompressor -{ - // class for handlling BC1 compression of BMP Textures - class BC1Compression - { - public: - bool Compress(const BMPImage & bmpImage, BC1DDSImage & ddsImage); - bool DeCompress(const BC1DDSImage & ddsImage, BMPImage & bmpImage); - - private: - void CompressBlock(const std::vector & pixelData, unsigned int row, unsigned int col, unsigned int width, unsigned char* ddsDataPtr) const; - void DeCompressBlock(std::vector & pixelData, unsigned int row, unsigned int col, unsigned int width, unsigned char* ddsDataPtr) const; - - // a compressed BC1 block is 8 bytes - const unsigned int m_blockSize = 8; - }; - -} - -#endif // !RL_BC1_COMPRESSION_H - diff --git a/submodules/TelegramUI/third-party/bc1/BMPImage.cpp b/submodules/TelegramUI/third-party/bc1/BMPImage.cpp deleted file mode 100644 index 451dc70cea..0000000000 --- a/submodules/TelegramUI/third-party/bc1/BMPImage.cpp +++ /dev/null @@ -1,213 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#include "BMPImage.h" -#include -#include - -namespace DTX1CompressorDecompressor -{ - BMPImage::BMPImage() : Image() - { - } - - BMPImage::BMPImage(const BMPImage & other) - { - m_width = other.m_width; - m_height = other.m_height; - m_fileHeader = other.m_fileHeader; - m_bitMapInfoHeader = other.m_bitMapInfoHeader; - - if (other.m_data == nullptr) - m_data = nullptr; - else - std::memcpy(m_data, other.m_data, other.m_bitMapInfoHeader.biSizeImage); - } - - BMPImage::BMPImage(BMPImage && other) : Image() - { - // initializes this with other data, and resets other with the "Image()" default data - Swap(*this, other); - } - - BMPImage & BMPImage::operator=(BMPImage other) - { - // copy and swap idiom - // here 'other' is a copy (since has been passed here by value) that is constructed either using the copy constructor or the move constructor, depending if it is an rvalue or a lvalue - Swap(*this, other); - return *this; - } - - void Swap(BMPImage & img1, BMPImage & img2) - { - using std::swap; - - swap(img1.m_fileHeader, img2.m_fileHeader); - swap(img1.m_bitMapInfoHeader, img2.m_bitMapInfoHeader); - swap(img1.m_width, img2.m_width); - swap(img1.m_height, img2.m_height); - swap(img1.m_data, img2.m_data); - } - - BMPImage::~BMPImage() - { - } - - bool BMPImage::InitWithData(unsigned char* data, unsigned int width, unsigned int height) - { - // checks for valid data - if (data == nullptr) - { - std::cout << "BMPImage::InitWithData:: data is null !" << std::endl; - return false; - } - - // check for image size width and height multiples of 4 - if (width % 4 != 0 || height % 4 != 0) - { - std::cout << "BMPImage::InitWithData:: the image is not supported. It needs width and height multiple of 4..." << std::endl; - return false; - } - - // we will overwrite previous data contained in this BMPImage instance - ReleaseImageMemory(); - - // take ownership of the data - m_data = data; - m_width = width; - m_height = height; - - // populate headers - DWORD bothHeadersSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER); - DWORD infoHeaderSize = sizeof(BITMAPINFOHEADER); - DWORD dataSize = 3 * width * height; // 3 bytes per pixel - WORD bitCount = 24; - LONG prefferedResOnX = 3780; // TODO : make this one and the next one as arguments ? - LONG prefferedResOnY = 3780; - - m_fileHeader.bfType = BM_FORMAT_TAG; - m_fileHeader.bfSize = bothHeadersSize + dataSize; - m_fileHeader.bfReserved1 = 0; - m_fileHeader.bfReserved2 = 0; - m_fileHeader.bfOffBits = bothHeadersSize; // header offset to the actual data (both headers sizes = 54 bytes) - - m_bitMapInfoHeader.biSize = infoHeaderSize; - m_bitMapInfoHeader.biWidth = static_cast(width); - m_bitMapInfoHeader.biHeight = static_cast(height); - m_bitMapInfoHeader.biPlanes = 1; - m_bitMapInfoHeader.biBitCount = bitCount; - m_bitMapInfoHeader.biCompression = 0; - m_bitMapInfoHeader.biSizeImage = dataSize; - m_bitMapInfoHeader.biXPelsPerMeter = prefferedResOnX; - m_bitMapInfoHeader.biYPelsPerMeter = prefferedResOnY; - m_bitMapInfoHeader.biClrUsed = 0; - m_bitMapInfoHeader.biClrImportant = 0; - - return true; - } - - bool BMPImage::ReadFromFile(const char * fileName) - { - std::ifstream imgFile(fileName, std::ifstream::binary); - - if (imgFile.is_open()) - { - // read header bytes - imgFile.read(reinterpret_cast(&m_fileHeader), sizeof(m_fileHeader)); - imgFile.read(reinterpret_cast(&m_bitMapInfoHeader), sizeof(m_bitMapInfoHeader)); - - // check the type of file - if (m_fileHeader.bfType != BM_FORMAT_TAG) - { - std::cout << " file was not found to be on BMP format... " << std::endl; - return false; - } - - // check for image size width and height multiples of 4 - if (m_bitMapInfoHeader.biWidth % 4 != 0 || m_bitMapInfoHeader.biHeight % 4 != 0) - { - std::cout << " the image is not supported. It needs width and height multiple of 4..." << std::endl; - return false; - } - - // check for 24 bit bitmaps only - if (m_bitMapInfoHeader.biBitCount != 24) - { - std::cout << " the image is not supported. It needs to be RGB-24 bit (8 bits per pixel) ..." << std::endl; - return false; - } - - // make sure we delete memory for any previous image we had loaded into this instance - ReleaseImageMemory(); - - // allocate the memory needed for all our data - m_width = static_cast(m_bitMapInfoHeader.biWidth); - m_height = static_cast(m_bitMapInfoHeader.biHeight); - - unsigned int dataByteSize = 3 * m_width * m_height; - m_data = new unsigned char[dataByteSize]; - - // read color data - imgFile.read(reinterpret_cast(m_data), dataByteSize); - - // release the file - imgFile.close(); - } - else - { - std::cout << std::endl <<" cannot read file : " << fileName << std::endl; - return false; - } - - return true; - } - - bool BMPImage::SaveToFile(const char * fileName) - { - if (m_data == nullptr) - return false; - - std::ofstream imgFile(fileName, std::ifstream::binary); - - if(imgFile.is_open()) - { - // write headers - imgFile.write(reinterpret_cast(&m_fileHeader), sizeof(m_fileHeader)); - imgFile.write(reinterpret_cast(&m_bitMapInfoHeader), sizeof(m_bitMapInfoHeader)); - - // write data - unsigned int dataByteSize = 3 * m_width * m_height; - imgFile.write(reinterpret_cast(m_data), dataByteSize); - - // release file - imgFile.close(); - } - else - { - std::cout << std::endl << "error creating or opening file : " << fileName << std::endl; - return false; - } - - return true; - } - -} diff --git a/submodules/TelegramUI/third-party/bc1/BMPImage.h b/submodules/TelegramUI/third-party/bc1/BMPImage.h deleted file mode 100644 index 09b01160f2..0000000000 --- a/submodules/TelegramUI/third-party/bc1/BMPImage.h +++ /dev/null @@ -1,59 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#ifndef RL_BMP_IMAGE_H -#define RL_BMP_IMAGE_H - -#include "Image.h" - -namespace DTX1CompressorDecompressor -{ - // class for loading and handling BMP images - class BMPImage : public Image - { - public: - BMPImage(); - BMPImage(const BMPImage & other); - BMPImage(BMPImage && other); - BMPImage& operator=(BMPImage other); - friend void Swap(BMPImage & img1, BMPImage & img2); - ~BMPImage(); - - - // a initalizator with data loaded from other sources (for example, from a decompressed DDS image), - // if color data in this image instance is already set, it will be ovewritten - // this instance will take ownership of the data - bool InitWithData(unsigned char* data, unsigned int width, unsigned int height); - - // populates the headers and the color data (if color data is already set, it will be ovewritten with the data of the file being loaded) - bool ReadFromFile(const char* fileName); - - // saves this data to disc ( will create a BMP image : fileName.bmp ) - bool SaveToFile(const char* fileName); - - private: - BITMAPFILEHEADER m_fileHeader; - BITMAPINFOHEADER m_bitMapInfoHeader; - }; -} - -#endif // !BMP_ IMAGE_H diff --git a/submodules/TelegramUI/third-party/bc1/ColorVec.h b/submodules/TelegramUI/third-party/bc1/ColorVec.h deleted file mode 100644 index a78c9e9d5f..0000000000 --- a/submodules/TelegramUI/third-party/bc1/ColorVec.h +++ /dev/null @@ -1,103 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#ifndef RL_COLOR_VEC_H -#define RL_COLOR_VEC_H - -#include "TypeDefinitions.h" -#include - -namespace DTX1CompressorDecompressor -{ - const unsigned short RED_MASK = DWRMASK; - const unsigned short GREEN_MASK = DWGMASK; - const unsigned short BLUE_MASK = DWBMASK; - - // structure to represent a pixel - // 3 bytes = 24 bits per pixel (but is going to be padded to 4 bytes anyway so we make it explicit) - struct Pixel24Bit - { - unsigned char bgra[4]; // 4 to make explicit the padding - - Pixel24Bit() - { - bgra[0] = 0; - bgra[1] = 0; - bgra[2] = 0; - bgra[3] = 0; - } - - void SetPixel24Bit(const Pixel24Bit & other) - { - bgra[0] = other.bgra[0]; - bgra[1] = other.bgra[1]; - bgra[2] = other.bgra[2]; - bgra[3] = 0; - } - - const int SqrDistanceTo(const Pixel24Bit & other) const - { - int db = (bgra[0] - other.bgra[0]); - int dg = (bgra[1] - other.bgra[1]); - int dr = (bgra[2] - other.bgra[2]); - return db*db + dg*dg + dr*dr; - } - - const int GetLuminance() const - { - return (bgra[2] + bgra[1] * 2 + bgra[0]); - } - - unsigned short ConvertTo565() - { - // Adapted from : - // https://msdn.microsoft.com/en-us/library/windows/desktop/dd390989(v=vs.85).aspx - - return ((bgra[2] >> 3) << 11) | ((bgra[1] >> 2) << 5) | (bgra[0] >> 3); - } - - void LoadFrom565(unsigned short rgb) - { - // Adapted from : - // https://msdn.microsoft.com/en-us/library/windows/desktop/dd390989(v=vs.85).aspx - - unsigned char redVal = ((rgb & RED_MASK) >> 11) << 3; - unsigned char greenVal = ((rgb & GREEN_MASK) >> 5) << 2; - unsigned char blueVal = (rgb & BLUE_MASK) << 3; - - bgra[0] = blueVal; - bgra[1] = greenVal; - bgra[2] = redVal; - bgra[3] = 0; - } - - void PrintColor() const - { - std::cout << "(B,G,R) = (" << (int)bgra[0] << ", " << (int)bgra[1] << " , " << (int)bgra[2] << ");" << std::endl; - } - }; - -} - - -#endif // !RL_COLOR_VEC_H - diff --git a/submodules/TelegramUI/third-party/bc1/DDSImage.cpp b/submodules/TelegramUI/third-party/bc1/DDSImage.cpp deleted file mode 100644 index 8c0101cfe3..0000000000 --- a/submodules/TelegramUI/third-party/bc1/DDSImage.cpp +++ /dev/null @@ -1,222 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#include "DDSImage.h" -#include -#include -#include - -namespace DTX1CompressorDecompressor -{ - BC1DDSImage::BC1DDSImage() : Image() - { - } - - BC1DDSImage::BC1DDSImage(const BC1DDSImage & other) - { - m_width = other.m_width; - m_height = other.m_height; - m_header = other.m_header; - m_dwMagic = other.m_dwMagic; - - if (other.m_data == nullptr) - m_data = nullptr; - else - { - unsigned int nBlocks = (m_width / 4) * (m_height / 4); - unsigned int blockSize = 8; - unsigned int dataByteSize = nBlocks * blockSize; - std::memcpy(m_data, other.m_data, dataByteSize); - } - } - - BC1DDSImage::BC1DDSImage(BC1DDSImage && other) : Image() - { - Swap(*this, other); - } - - BC1DDSImage & BC1DDSImage::operator=(BC1DDSImage other) - { - Swap(*this, other); - return *this; - } - - void Swap(BC1DDSImage & img1, BC1DDSImage & img2) - { - using std::swap; - - swap(img1.m_dwMagic, img2.m_dwMagic); - swap(img1.m_header, img2.m_header); - swap(img1.m_width, img2.m_width); - swap(img1.m_height, img2.m_height); - swap(img1.m_data, img2.m_data); - } - - BC1DDSImage::~BC1DDSImage() - { - } - - bool BC1DDSImage::InitWithData(unsigned char * data, unsigned int width, unsigned int height) - { - // checks for valid data - if (data == nullptr) - { - std::cout << "BC1DDSImage::InitWithData:: data is null !" << std::endl; - return false; - } - - // check for image size width and height multiples of 4 - if (width % 4 != 0 || height % 4 != 0) - { - std::cout << "BC1DDSImage::InitWithData:: the image is not supported. It needs width and height multiple of 4..." << std::endl; - return false; - } - - // we will overwrite previous data contained in this BMPImage instance - ReleaseImageMemory(); - - // take ownership of the data - m_data = data; - m_width = width; - m_height = height; - - // populate headers - DWORD sizeOfHeader = sizeof(DDS_HEADER); - DWORD sizeOfPixelFormat = sizeof(DDS_PIXELFORMAT); - DWORD blockSize = 8; // 8 bytes - - m_dwMagic = DDS_FORMAT_TAG; - - m_header.dwSize = sizeOfHeader; - m_header.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; - m_header.dwHeight = height; - m_header.dwWidth = width; - m_header.dwPitchOrLinearSize = 0; - m_header.dwDepth = 0; - m_header.dwMipMapCount = 0; - m_header.dwCaps1 = DDSCAPS_TEXTURE; - m_header.dwCaps2 = 0; - - m_header.ddspf.dwSize = sizeOfPixelFormat; - m_header.ddspf.dwFlags = DDPF_FOURCC; - m_header.ddspf.dwFourCC = DXT1; - m_header.ddspf.dwRGBBitCount = 0; - m_header.ddspf.dwRBitMask = 0; - m_header.ddspf.dwGBitMask = 0; - m_header.ddspf.dwBBitMask = 0; - m_header.ddspf.dwABitMask = 0; - - return true; - } - - bool BC1DDSImage::ReadFromFile(const char * fileName) - { - std::ifstream imgFile(fileName, std::ifstream::binary); - - if (imgFile.is_open()) - { - // read magic number to DDS FORMAT - imgFile.read(reinterpret_cast(&m_dwMagic), sizeof(m_dwMagic)); - - if (m_dwMagic != DDS_FORMAT_TAG) - { - std::cout << " file was not found to be a valid DDS image... " << std::endl; - return false; - } - - // read header - imgFile.read(reinterpret_cast(&m_header), sizeof(m_header)); - - // check is DTX1 - if (m_header.ddspf.dwFlags != DDPF_FOURCC || m_header.ddspf.dwFourCC != DXT1) - { - std::cout << " the image is not a valid DXT1 image file ..." << std::endl; - return false; - } - - // check for image size width and height multiples of 4 - if (m_header.dwHeight % 4 != 0 || m_header.dwWidth % 4 != 0) - { - std::cout << " the image is not supported. It needs width and height multiple of 4..." << std::endl; - return false; - } - - // make sure we delete memory for any previous image we had loaded into this instance - ReleaseImageMemory(); - - // allocate the memory needed for all our data - m_width = static_cast(m_header.dwWidth); - m_height = static_cast(m_header.dwHeight); - - unsigned int nBlocks = (m_width / 4) * (m_height / 4); - unsigned int blockSize = 8; - unsigned int dataByteSize = nBlocks * blockSize; - - m_data = new unsigned char[dataByteSize]; - - // read color data - imgFile.read(reinterpret_cast(m_data), dataByteSize); - - // release the file - imgFile.close(); - } - else - { - std::cout << std::endl << " cannot read file : " << fileName << std::endl; - return false; - } - - return true; - } - - bool BC1DDSImage::SaveToFile(const char * fileName) - { - if (m_data == nullptr) - return false; - - std::ofstream imgFile(fileName, std::ifstream::binary); - - if (imgFile.is_open()) - { - // write headers - imgFile.write(reinterpret_cast(&m_dwMagic), sizeof(m_dwMagic)); - imgFile.write(reinterpret_cast(&m_header), sizeof(m_header)); - - // write data - unsigned int nBlocks = (m_width / 4) * (m_height / 4); - unsigned int blockSize = 8; - unsigned int dataByteSize = nBlocks * blockSize; - - imgFile.write(reinterpret_cast(m_data), dataByteSize); - - // release file - imgFile.close(); - } - else - { - std::cout << std::endl << "error creating or opening file : " << fileName << std::endl; - return false; - } - - return true; - } -} \ No newline at end of file diff --git a/submodules/TelegramUI/third-party/bc1/DDSImage.h b/submodules/TelegramUI/third-party/bc1/DDSImage.h deleted file mode 100644 index 4a00b9a6e8..0000000000 --- a/submodules/TelegramUI/third-party/bc1/DDSImage.h +++ /dev/null @@ -1,51 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#ifndef RL_DDS_IMAGE_H -#define RL_DDS_IMAGE_H - -#include "Image.h" - -namespace DTX1CompressorDecompressor -{ - // class for loading and handling BC1 DDS images - class BC1DDSImage : public Image - { - public: - BC1DDSImage(); - BC1DDSImage(const BC1DDSImage & other); - BC1DDSImage(BC1DDSImage && other); - BC1DDSImage& operator=(BC1DDSImage other); - friend void Swap(BC1DDSImage & img1, BC1DDSImage & img2); - ~BC1DDSImage(); - - // Image interface implementation - bool InitWithData(unsigned char* data, unsigned int width, unsigned int height); - bool ReadFromFile(const char* fileName); - bool SaveToFile(const char* fileName); - - private: - DWORD m_dwMagic; - DDS_HEADER m_header; - }; -} -#endif \ No newline at end of file diff --git a/submodules/TelegramUI/third-party/bc1/Image.cpp b/submodules/TelegramUI/third-party/bc1/Image.cpp deleted file mode 100644 index e08e779413..0000000000 --- a/submodules/TelegramUI/third-party/bc1/Image.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#include "Image.h" - -namespace DTX1CompressorDecompressor -{ - Image::~Image() - { - ReleaseImageMemory(); - } - - void Image::ReleaseImageMemory() - { - if (m_ownData) { - delete[] m_data; - } - - m_data = nullptr; - m_width = 0; - m_height = 0; - } - -} diff --git a/submodules/TelegramUI/third-party/bc1/Image.h b/submodules/TelegramUI/third-party/bc1/Image.h deleted file mode 100644 index a1b5d729b8..0000000000 --- a/submodules/TelegramUI/third-party/bc1/Image.h +++ /dev/null @@ -1,79 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#ifndef RL_IMAGE_H -#define RL_IMAGE_H - -#include "TypeDefinitions.h" -#include "ColorVec.h" - -namespace DTX1CompressorDecompressor -{ - // base class for all images - class Image - { - public: - virtual ~Image(); - - // frees the image data if any - void ReleaseImageMemory(); - - // a initalizator with data loaded from other sources - virtual bool InitWithData(unsigned char* data, unsigned int width, unsigned int height) = 0; - - // initializator from file - virtual bool ReadFromFile(const char* fileName) = 0; - - // saves the image to disc - virtual bool SaveToFile(const char* fileName) = 0; - - // gets the width in pixels of the loaded image - inline unsigned int GetWidth() const - { - return m_width; - } - - // gets the height in pixels of the loaded image - inline unsigned int GetHeight() const - { - return m_height; - } - - // gets the data pointer - inline unsigned char* GetData() const - { - return m_data; - } - - public: - Image() : m_data(nullptr), m_width(0), m_height(0) {}; - - bool m_ownData; - unsigned char* m_data; - unsigned int m_width; - unsigned int m_height; - }; - -} - - -#endif // !RL_IMAGE_H diff --git a/submodules/TelegramUI/third-party/bc1/TextureCompression.cpp b/submodules/TelegramUI/third-party/bc1/TextureCompression.cpp deleted file mode 100644 index e99405dfd2..0000000000 --- a/submodules/TelegramUI/third-party/bc1/TextureCompression.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#import "TextureCompression.h" - -#import "astc.h" - -void compressRGBAToBC1(uint8_t const * _Nonnull argb, int width, int height, uint8_t * _Nonnull bc1) { - BgraImage image(width, height, (uint8_t *)argb); - CompressedImage compressed(width, height, 4, 4, 16); - compress_astc(image, &compressed); - /*Javelin::RgbaBitmap bitmap(width, height); - uint8_t *data = (uint8_t *)bitmap.GetData(); - for (int i = 0; i < width * height; i++) { - data[i * 4 + 0] = argb[i * 4 + 0]; - data[i * 4 + 1] = argb[i * 4 + 1]; - data[i * 4 + 2] = argb[i * 4 + 2]; - data[i * 4 + 3] = argb[i * 4 + 3]; - } - Javelin::PvrTcEncoder::EncodeRgb4Bpp(bc1, bitmap);*/ -} - -void decompressBC1ToRGBA(uint8_t const * _Nonnull bc1, int width, int height, uint8_t * _Nonnull argb) { - /*uint8_t *data = (uint8_t *)malloc(width * height * 3); - Javelin::PvrTcDecoder::DecodeRgb4Bpp((Javelin::ColorRgba *)data, Javelin::Point2(width, height), bc1); - for (int i = 0; i < width * height; i++) { - uint8_t r = data[i * 3 + 0]; - uint8_t g = data[i * 3 + 1]; - uint8_t b = data[i * 3 + 2]; - argb[i * 4 + 3] = 255; - argb[i * 4 + 2] = b; - argb[i * 4 + 1] = g; - argb[i * 4 + 0] = r; - } - free(data);*/ -} - -void compressRGBAToETC2(uint8_t const * _Nonnull argb, int width, int height, uint8_t * _Nonnull etc2) { - -} diff --git a/submodules/TelegramUI/third-party/bc1/TextureCompression.h b/submodules/TelegramUI/third-party/bc1/TextureCompression.h deleted file mode 100644 index b013ac17d2..0000000000 --- a/submodules/TelegramUI/third-party/bc1/TextureCompression.h +++ /dev/null @@ -1,13 +0,0 @@ -#import - -#ifdef __cplusplus -extern "C" { -#endif - -void compressRGBAToBC1(uint8_t const * _Nonnull argb, int width, int height, uint8_t * _Nonnull bc1); -void decompressBC1ToRGBA(uint8_t const * _Nonnull bc1, int width, int height, uint8_t * _Nonnull argb); -void compressRGBAToETC2(uint8_t const * _Nonnull argb, int width, int height, uint8_t * _Nonnull etc2); - -#ifdef __cplusplus -} -#endif diff --git a/submodules/TelegramUI/third-party/bc1/TypeDefinitions.h b/submodules/TelegramUI/third-party/bc1/TypeDefinitions.h deleted file mode 100644 index fad2a615f7..0000000000 --- a/submodules/TelegramUI/third-party/bc1/TypeDefinitions.h +++ /dev/null @@ -1,126 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017 Ricardo David CM (http://ricardo-david.com), -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. -//----------------------------------------------------------------------------- - -#ifndef RL_TYPE_DEF_H -#define RL_TYPE_DEF_H - -namespace DTX1CompressorDecompressor -{ - - // 19778 = 0x4D42 = 'BM' for bitmap format , 0x20534444 = "DDS" for DDS format - // check https://msdn.microsoft.com/en-us/library/vs/alm/dd183374(v=vs.85).aspx (BMP) - // https://msdn.microsoft.com/en-us/library/windows/desktop/bb943991(v=vs.85).aspx (DDS) - #define BM_FORMAT_TAG 0x4D42 - #define DDS_FORMAT_TAG 0x20534444 - - // DDS flags : https://msdn.microsoft.com/en-us/library/windows/desktop/bb943982(v=vs.85).aspx - #define DDSD_CAPS 0x1 - #define DDSD_HEIGHT 0x2 - #define DDSD_WIDTH 0x4 - #define DDSD_PIXELFORMAT 0x1000 - #define DDSCAPS_TEXTURE 0x1000 - - #define DWRMASK 0xF800 - #define DWGMASK 0x7E0 - #define DWBMASK 0x1F - - #define DDPF_FOURCC 0x4 - #define DXT1 0x31545844 - - typedef int LONG; // 4 bytes - typedef unsigned short WORD; // 2 bytes - typedef unsigned int DWORD; // 4 bytes - -// this pragma is needed for memory alignment -// without this the WORDs of the structs below will be padded to 4 bytes, then the structs will be bigger than we want - -#pragma pack(2) - - // Adapted from the Microsoft documentation: - // https://msdn.microsoft.com/en-us/library/vs/alm/dd183392(v=vs.85).aspx - - // 14 bytes - struct BITMAPFILEHEADER - { - WORD bfType; - DWORD bfSize; - WORD bfReserved1; - WORD bfReserved2; - DWORD bfOffBits; - }; - - // 40 bytes - struct BITMAPINFOHEADER - { - DWORD biSize; - LONG biWidth; - LONG biHeight; - WORD biPlanes; - WORD biBitCount; - DWORD biCompression; - DWORD biSizeImage; - LONG biXPelsPerMeter; - LONG biYPelsPerMeter; - DWORD biClrUsed; - DWORD biClrImportant; - }; - - // Adapted from the Microsoft documentation: - // https://msdn.microsoft.com/en-us/library/windows/desktop/bb943984(v=vs.85).aspx - // https://msdn.microsoft.com/en-us/library/windows/desktop/bb943982(v=vs.85).aspx - - // 32 bytes - struct DDS_PIXELFORMAT - { - DWORD dwSize; - DWORD dwFlags; - DWORD dwFourCC; - DWORD dwRGBBitCount; - DWORD dwRBitMask; - DWORD dwGBitMask; - DWORD dwBBitMask; - DWORD dwABitMask; - }; - - // 124 bytes - struct DDS_HEADER - { - DWORD dwSize; - DWORD dwFlags; - DWORD dwHeight; - DWORD dwWidth; - DWORD dwPitchOrLinearSize; - DWORD dwDepth; - DWORD dwMipMapCount; - DWORD dwReserved1[11]; - DDS_PIXELFORMAT ddspf; - DWORD dwCaps1; - DWORD dwCaps2; - DWORD dwReserved2[3]; - }; - -#pragma pack() - -} - -#endif // !RL_TYPE_DEF_H - diff --git a/submodules/YuvConversion/Info.plist b/submodules/YuvConversion/Info.plist new file mode 100644 index 0000000000..e1fe4cfb7b --- /dev/null +++ b/submodules/YuvConversion/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/submodules/TelegramUI/TelegramUI/YUV.h b/submodules/YuvConversion/Sources/YUV.h similarity index 100% rename from submodules/TelegramUI/TelegramUI/YUV.h rename to submodules/YuvConversion/Sources/YUV.h diff --git a/submodules/TelegramUI/TelegramUI/YUV.m b/submodules/YuvConversion/Sources/YUV.m similarity index 100% rename from submodules/TelegramUI/TelegramUI/YUV.m rename to submodules/YuvConversion/Sources/YUV.m diff --git a/submodules/YuvConversion/Sources/YuvConversion.h b/submodules/YuvConversion/Sources/YuvConversion.h new file mode 100644 index 0000000000..4da2e49979 --- /dev/null +++ b/submodules/YuvConversion/Sources/YuvConversion.h @@ -0,0 +1,11 @@ +#import + +//! Project version number for YuvConversion. +FOUNDATION_EXPORT double YuvConversionVersionNumber; + +//! Project version string for YuvConversion. +FOUNDATION_EXPORT const unsigned char YuvConversionVersionString[]; + +#import + + diff --git a/submodules/YuvConversion/YuvConversion.xcodeproj/project.pbxproj b/submodules/YuvConversion/YuvConversion.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..43d47d6dec --- /dev/null +++ b/submodules/YuvConversion/YuvConversion.xcodeproj/project.pbxproj @@ -0,0 +1,532 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + D03E3E782304B63E0049C28B /* YuvConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E3E762304B63E0049C28B /* YuvConversion.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D03E3E842304B6BA0049C28B /* YUV.m in Sources */ = {isa = PBXBuildFile; fileRef = D03E3E822304B6BA0049C28B /* YUV.m */; }; + D03E3E852304B6BA0049C28B /* YUV.h in Headers */ = {isa = PBXBuildFile; fileRef = D03E3E832304B6BA0049C28B /* YUV.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D03E3E882304B6D30049C28B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E872304B6D30049C28B /* Foundation.framework */; }; + D03E3E8A2304B6D80049C28B /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03E3E892304B6D80049C28B /* Accelerate.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + D03E3E732304B63E0049C28B /* YuvConversion.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = YuvConversion.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D03E3E762304B63E0049C28B /* YuvConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YuvConversion.h; sourceTree = ""; }; + D03E3E772304B63E0049C28B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D03E3E822304B6BA0049C28B /* YUV.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YUV.m; sourceTree = ""; }; + D03E3E832304B6BA0049C28B /* YUV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YUV.h; sourceTree = ""; }; + D03E3E872304B6D30049C28B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + D03E3E892304B6D80049C28B /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D03E3E702304B63E0049C28B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3E8A2304B6D80049C28B /* Accelerate.framework in Frameworks */, + D03E3E882304B6D30049C28B /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D03E3E692304B63E0049C28B = { + isa = PBXGroup; + children = ( + D03E3E772304B63E0049C28B /* Info.plist */, + D03E3E752304B63E0049C28B /* Sources */, + D03E3E742304B63E0049C28B /* Products */, + D03E3E862304B6D20049C28B /* Frameworks */, + ); + sourceTree = ""; + }; + D03E3E742304B63E0049C28B /* Products */ = { + isa = PBXGroup; + children = ( + D03E3E732304B63E0049C28B /* YuvConversion.framework */, + ); + name = Products; + sourceTree = ""; + }; + D03E3E752304B63E0049C28B /* Sources */ = { + isa = PBXGroup; + children = ( + D03E3E832304B6BA0049C28B /* YUV.h */, + D03E3E822304B6BA0049C28B /* YUV.m */, + D03E3E762304B63E0049C28B /* YuvConversion.h */, + ); + path = Sources; + sourceTree = ""; + }; + D03E3E862304B6D20049C28B /* Frameworks */ = { + isa = PBXGroup; + children = ( + D03E3E892304B6D80049C28B /* Accelerate.framework */, + D03E3E872304B6D30049C28B /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D03E3E6E2304B63E0049C28B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3E782304B63E0049C28B /* YuvConversion.h in Headers */, + D03E3E852304B6BA0049C28B /* YUV.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D03E3E722304B63E0049C28B /* YuvConversion */ = { + isa = PBXNativeTarget; + buildConfigurationList = D03E3E7B2304B63E0049C28B /* Build configuration list for PBXNativeTarget "YuvConversion" */; + buildPhases = ( + D03E3E6E2304B63E0049C28B /* Headers */, + D03E3E6F2304B63E0049C28B /* Sources */, + D03E3E702304B63E0049C28B /* Frameworks */, + D03E3E712304B63E0049C28B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = YuvConversion; + productName = YuvConversion; + productReference = D03E3E732304B63E0049C28B /* YuvConversion.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D03E3E6A2304B63E0049C28B /* Project object */ = { + isa = PBXProject; + attributes = { + DefaultBuildSystemTypeForWorkspace = Latest; + LastUpgradeCheck = 1030; + ORGANIZATIONNAME = "Telegram Messenger LLP"; + TargetAttributes = { + D03E3E722304B63E0049C28B = { + CreatedOnToolsVersion = 10.3; + }; + }; + }; + buildConfigurationList = D03E3E6D2304B63E0049C28B /* Build configuration list for PBXProject "YuvConversion" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D03E3E692304B63E0049C28B; + productRefGroup = D03E3E742304B63E0049C28B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D03E3E722304B63E0049C28B /* YuvConversion */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D03E3E712304B63E0049C28B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D03E3E6F2304B63E0049C28B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D03E3E842304B6BA0049C28B /* YUV.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + D03E3E792304B63E0049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugAppStoreLLC; + }; + D03E3E7A2304B63E0049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseAppStoreLLC; + }; + D03E3E7C2304B63E0049C28B /* DebugAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.YuvConversion; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugAppStoreLLC; + }; + D03E3E7D2304B63E0049C28B /* ReleaseAppStoreLLC */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.YuvConversion; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseAppStoreLLC; + }; + D03E3E7E2304B6680049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = DebugHockeyapp; + }; + D03E3E7F2304B6680049C28B /* DebugHockeyapp */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.YuvConversion; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = DebugHockeyapp; + }; + D03E3E802304B6780049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = ReleaseHockeyappInternal; + }; + D03E3E812304B6780049C28B /* ReleaseHockeyappInternal */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Manual; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = org.telegram.YuvConversion; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = ReleaseHockeyappInternal; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D03E3E6D2304B63E0049C28B /* Build configuration list for PBXProject "YuvConversion" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3E792304B63E0049C28B /* DebugAppStoreLLC */, + D03E3E7E2304B6680049C28B /* DebugHockeyapp */, + D03E3E7A2304B63E0049C28B /* ReleaseAppStoreLLC */, + D03E3E802304B6780049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; + D03E3E7B2304B63E0049C28B /* Build configuration list for PBXNativeTarget "YuvConversion" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D03E3E7C2304B63E0049C28B /* DebugAppStoreLLC */, + D03E3E7F2304B6680049C28B /* DebugHockeyapp */, + D03E3E7D2304B63E0049C28B /* ReleaseAppStoreLLC */, + D03E3E812304B6780049C28B /* ReleaseHockeyappInternal */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ReleaseAppStoreLLC; + }; +/* End XCConfigurationList section */ + }; + rootObject = D03E3E6A2304B63E0049C28B /* Project object */; +}