no message

This commit is contained in:
Peter
2017-08-04 14:20:00 +03:00
parent 6f2dd7df52
commit b6cafcc834
276 changed files with 1326 additions and 524 deletions

View File

@@ -188,7 +188,6 @@
D01778EE1F20CAE60044446D /* TGOverlayController.m in Sources */ = {isa = PBXBuildFile; fileRef = D01778E21F20CAE60044446D /* TGOverlayController.m */; };
D01778EF1F20CAE60044446D /* TGOverlayControllerWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = D01778E31F20CAE60044446D /* TGOverlayControllerWindow.h */; settings = {ATTRIBUTES = (Public, ); }; };
D01778F01F20CAE60044446D /* TGOverlayControllerWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = D01778E41F20CAE60044446D /* TGOverlayControllerWindow.m */; };
D01778F31F20CC7A0044446D /* TGRootControllerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D01778F11F20CC7A0044446D /* TGRootControllerProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
D01778F71F20CDAC0044446D /* TGHacks.h in Headers */ = {isa = PBXBuildFile; fileRef = D01778F51F20CDAC0044446D /* TGHacks.h */; settings = {ATTRIBUTES = (Public, ); }; };
D01778F81F20CDAC0044446D /* TGHacks.m in Sources */ = {isa = PBXBuildFile; fileRef = D01778F61F20CDAC0044446D /* TGHacks.m */; };
D01778FB1F20CF6B0044446D /* TGBackdropView.h in Headers */ = {isa = PBXBuildFile; fileRef = D01778F91F20CF6B0044446D /* TGBackdropView.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -638,8 +637,6 @@
D07BC87E1F2A365000ED97AA /* TGProgressSpinnerView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07BC87A1F2A365000ED97AA /* TGProgressSpinnerView.m */; };
D07BC87F1F2A365000ED97AA /* TGProgressWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = D07BC87B1F2A365000ED97AA /* TGProgressWindow.h */; settings = {ATTRIBUTES = (Public, ); }; };
D07BC8801F2A365000ED97AA /* TGProgressWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = D07BC87C1F2A365000ED97AA /* TGProgressWindow.m */; };
D07BC8831F2A367500ED97AA /* TGActivityIndicatorView.h in Headers */ = {isa = PBXBuildFile; fileRef = D07BC8811F2A367500ED97AA /* TGActivityIndicatorView.h */; settings = {ATTRIBUTES = (Public, ); }; };
D07BC8841F2A367500ED97AA /* TGActivityIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07BC8821F2A367500ED97AA /* TGActivityIndicatorView.m */; };
D07BC8931F2A375800ED97AA /* TGPhotoCropAreaView.h in Headers */ = {isa = PBXBuildFile; fileRef = D07BC8851F2A375800ED97AA /* TGPhotoCropAreaView.h */; };
D07BC8941F2A375800ED97AA /* TGPhotoCropAreaView.m in Sources */ = {isa = PBXBuildFile; fileRef = D07BC8861F2A375800ED97AA /* TGPhotoCropAreaView.m */; };
D07BC8951F2A375800ED97AA /* TGPhotoCropControl.h in Headers */ = {isa = PBXBuildFile; fileRef = D07BC8871F2A375800ED97AA /* TGPhotoCropControl.h */; };
@@ -1252,7 +1249,6 @@
D01778E21F20CAE60044446D /* TGOverlayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TGOverlayController.m; path = LegacyComponents/TGOverlayController.m; sourceTree = "<group>"; };
D01778E31F20CAE60044446D /* TGOverlayControllerWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TGOverlayControllerWindow.h; path = LegacyComponents/TGOverlayControllerWindow.h; sourceTree = "<group>"; };
D01778E41F20CAE60044446D /* TGOverlayControllerWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TGOverlayControllerWindow.m; path = LegacyComponents/TGOverlayControllerWindow.m; sourceTree = "<group>"; };
D01778F11F20CC7A0044446D /* TGRootControllerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGRootControllerProtocol.h; sourceTree = "<group>"; };
D01778F51F20CDAC0044446D /* TGHacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGHacks.h; sourceTree = "<group>"; };
D01778F61F20CDAC0044446D /* TGHacks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGHacks.m; sourceTree = "<group>"; };
D01778F91F20CF6B0044446D /* TGBackdropView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGBackdropView.h; sourceTree = "<group>"; };
@@ -2130,6 +2126,7 @@
D07BCBFA1F2B757700ED97AA /* TGEmbedPIPScrubber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGEmbedPIPScrubber.m; sourceTree = "<group>"; };
D07BCC031F2B82D100ED97AA /* TGModernConversationTitleActivityIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TGModernConversationTitleActivityIndicator.h; sourceTree = "<group>"; };
D07BCC041F2B82D100ED97AA /* TGModernConversationTitleActivityIndicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TGModernConversationTitleActivityIndicator.m; sourceTree = "<group>"; };
D0EB42021F3142F400838FE6 /* LegacyComponentsResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = LegacyComponentsResources.bundle; path = Resources/LegacyComponentsResources.bundle; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -2164,6 +2161,7 @@
D01777291F1F8F100044446D /* LegacyComponents */ = {
isa = PBXGroup;
children = (
D0EB409E1F2FC0AA00838FE6 /* Resources */,
D017776F1F1F91B00044446D /* Utils */,
D01779B01F2139720044446D /* POP */,
D017797F1F2107B80044446D /* LMDB */,
@@ -2505,7 +2503,6 @@
D01778E21F20CAE60044446D /* TGOverlayController.m */,
D01778E31F20CAE60044446D /* TGOverlayControllerWindow.h */,
D01778E41F20CAE60044446D /* TGOverlayControllerWindow.m */,
D01778F11F20CC7A0044446D /* TGRootControllerProtocol.h */,
D07BCAD51F2B4F2800ED97AA /* TGOverlayFormsheetController.h */,
D07BCAD61F2B4F2800ED97AA /* TGOverlayFormsheetController.m */,
D07BCAD71F2B4F2800ED97AA /* TGOverlayFormsheetWindow.h */,
@@ -3484,6 +3481,14 @@
name = Coub;
sourceTree = "<group>";
};
D0EB409E1F2FC0AA00838FE6 /* Resources */ = {
isa = PBXGroup;
children = (
D0EB42021F3142F400838FE6 /* LegacyComponentsResources.bundle */,
);
name = Resources;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -3845,7 +3850,6 @@
D07BC90B1F2A380D00ED97AA /* TGPaintFaceDetector.h in Headers */,
D07BCA481F2A9CE300ED97AA /* TGModernMediaListSelectableItem.h in Headers */,
D07BC9F31F2A9A2B00ED97AA /* TGMediaPickerController.h in Headers */,
D01778F31F20CC7A0044446D /* TGRootControllerProtocol.h in Headers */,
D07BC8161F2A2C0B00ED97AA /* PGPhotoGaussianBlurFilter.h in Headers */,
D017783B1F1F961D0044446D /* TGStickerPackReference.h in Headers */,
D01779DF1F2139980044446D /* POPAction.h in Headers */,
@@ -3998,7 +4002,6 @@
D07BC8CF1F2A37EC00ED97AA /* TGPhotoPaintSettingsWrapperView.h in Headers */,
D01778491F1F961D0044446D /* TGDocumentMediaAttachment.h in Headers */,
D0177AD21F23D9810044446D /* ASWatcher.h in Headers */,
D07BC8831F2A367500ED97AA /* TGActivityIndicatorView.h in Headers */,
D07BC80E1F2A2C0B00ED97AA /* PGPhotoEnhancePass.h in Headers */,
D07BC9051F2A380D00ED97AA /* TGPaintCanvas.h in Headers */,
D07BC7411F2A2AC500ED97AA /* TGPhotoEditorButton.h in Headers */,
@@ -4146,7 +4149,6 @@
D0177ADA1F23D9B80044446D /* SGraphListNode.m in Sources */,
D01778B31F1FFF810044446D /* TGLabel.m in Sources */,
D07BCA6C1F2B3CE700ED97AA /* TGCameraController.m in Sources */,
D07BC8841F2A367500ED97AA /* TGActivityIndicatorView.m in Sources */,
D07BC94F1F2A3EA900ED97AA /* TGHashtagPanelCell.m in Sources */,
D017782E1F1F961D0044446D /* TGBotReplyMarkupRow.m in Sources */,
D01779271F20FE480044446D /* TGObserverProxy.m in Sources */,

View File

@@ -149,13 +149,6 @@ static AVURLAsset *gDigitalSilenceAsset = nil;
AVAssetTrack *silence = nil;
CMTimeRange silenceTimeRange = kCMTimeRangeZero;
// if(originalAudioTrack && CMTIME_COMPARE_INLINE(audioTrackTimeRange.duration, <, videoTrackTimeRange.duration))
// {
// if(!gDigitalSilenceAsset)
// gDigitalSilenceAsset = [[AVURLAsset alloc] initWithURL:[[NSBundle mainBundle] URLForResource:@"silence2" withExtension:@"caf"] options:@{AVURLAssetPreferPreciseDurationAndTimingKey : @YES}];
// silence = gDigitalSilenceAsset.anyAudioTrack;
// silenceTimeRange.duration = CMTimeSubtract(videoTrackTimeRange.duration, audioTrackTimeRange.duration);
// }
if([self isCancelled])
return nil;
@@ -326,4 +319,4 @@ static NSOperationQueue *gOperationQueue = nil;
return instance;
}
@end
@end

View File

@@ -2,6 +2,7 @@
// A description of this can be found at his page on the topic:
// http://iphonedevelopment.blogspot.com/2010/11/opengl-es-20-for-ios-chapter-4.html
#import "LegacyComponentsInternal.h"
#import "GLProgram.h"
// START:typedefs
@@ -66,7 +67,7 @@ typedef void (*GLLogFunction) (GLuint program,
- (id)initWithVertexShaderString:(NSString *)vShaderString
fragmentShaderFilename:(NSString *)fShaderFilename
{
NSString *fragShaderPathname = [[NSBundle mainBundle] pathForResource:fShaderFilename ofType:@"fsh"];
NSString *fragShaderPathname = TGComponentsPathForResource(fShaderFilename, @"fsh");
NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragShaderPathname encoding:NSUTF8StringEncoding error:nil];
if ((self = [self initWithVertexShaderString:vShaderString fragmentShaderString:fragmentShaderString]))
@@ -79,10 +80,10 @@ typedef void (*GLLogFunction) (GLuint program,
- (id)initWithVertexShaderFilename:(NSString *)vShaderFilename
fragmentShaderFilename:(NSString *)fShaderFilename
{
NSString *vertShaderPathname = [[NSBundle mainBundle] pathForResource:vShaderFilename ofType:@"vsh"];
NSString *vertShaderPathname = TGComponentsPathForResource(vShaderFilename, @"vsh");
NSString *vertexShaderString = [NSString stringWithContentsOfFile:vertShaderPathname encoding:NSUTF8StringEncoding error:nil];
NSString *fragShaderPathname = [[NSBundle mainBundle] pathForResource:fShaderFilename ofType:@"fsh"];
NSString *fragShaderPathname = TGComponentsPathForResource(fShaderFilename, @"fsh");
NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragShaderPathname encoding:NSUTF8StringEncoding error:nil];
if ((self = [self initWithVertexShaderString:vertexShaderString fragmentShaderString:fragmentShaderString]))

View File

@@ -1,6 +1,8 @@
#import "GPUImageFilter.h"
#import <AVFoundation/AVFoundation.h>
#import "LegacyComponentsInternal.h"
// Hardcode the vertex shader for standard filters, but this can be overridden
NSString *const kGPUImageVertexShaderString = SHADER_STRING
(
@@ -119,7 +121,7 @@ NSString *const kGPUImagePassthroughFragmentShaderString = SHADER_STRING
- (id)initWithFragmentShaderFromFile:(NSString *)fragmentShaderFilename
{
NSString *fragmentShaderPathname = [[NSBundle mainBundle] pathForResource:fragmentShaderFilename ofType:@"fsh"];
NSString *fragmentShaderPathname = TGComponentsPathForResource(fragmentShaderFilename, @"fsh");
NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragmentShaderPathname encoding:NSUTF8StringEncoding error:nil];
if (!(self = [self initWithFragmentShaderFromString:fragmentShaderString]))

View File

@@ -154,7 +154,6 @@ FOUNDATION_EXPORT const unsigned char LegacyComponentsVersionString[];
#import <LegacyComponents/TGMenuView.h>
#import <LegacyComponents/TGImageView.h>
#import <LegacyComponents/UICollectionView+Utils.h>
#import <LegacyComponents/TGActivityIndicatorView.h>
#import <LegacyComponents/TGMessageImageViewOverlayView.h>
#import <LegacyComponents/TGLetteredAvatarView.h>
#import <LegacyComponents/TGGradientLabel.h>
@@ -193,7 +192,6 @@ FOUNDATION_EXPORT const unsigned char LegacyComponentsVersionString[];
#import <LegacyComponents/TGViewController+TGRecursiveEnumeration.h>
#import <LegacyComponents/TGOverlayController.h>
#import <LegacyComponents/TGOverlayControllerWindow.h>
#import <LegacyComponents/TGRootControllerProtocol.h>
#import <LegacyComponents/TGMediaAssetsLibrary.h>
#import <LegacyComponents/TGMediaAssetsModernLibrary.h>
@@ -266,6 +264,7 @@ FOUNDATION_EXPORT const unsigned char LegacyComponentsVersionString[];
#import <LegacyComponents/TGCameraTimeCodeView.h>
#import <LegacyComponents/TGCameraZoomView.h>
#import <LegacyComponents/TGCameraPhotoPreviewController.h>
#import <LegacyComponents/TGCameraController.h>
#import <LegacyComponents/TGModernConversationTitleActivityIndicator.h>
#import <LegacyComponents/TGEmbedPIPButton.h>
@@ -275,3 +274,10 @@ FOUNDATION_EXPORT const unsigned char LegacyComponentsVersionString[];
#import <LegacyComponents/TGMediaAvatarMenuMixin.h>
#import <LegacyComponents/TGPasscodeEntryController.h>
#import <LegacyComponents/TGEmbedPlayerView.h>
#import <LegacyComponents/TGWallpaperInfo.h>
#import <LegacyComponents/TGMemoryImageCache.h>
#import <LegacyComponents/LegacyHTTPRequestOperation.h>
#import <LegacyComponents/LegacyComponentsAccessChecker.h>
#import <LegacyComponents/TGAttachmentCarouselItemView.h>
#import <LegacyComponents/TGMediaAssetsController.h>

View File

@@ -3,6 +3,7 @@
@class TGKeyCommandController;
@class SSignal;
@class TGOverlayControllerWindow;
typedef enum {
LegacyComponentsActionSheetActionTypeGeneric,
@@ -21,6 +22,18 @@ typedef enum {
@end
@protocol LegacyComponentsContext;
@protocol LegacyComponentsOverlayWindowManager <NSObject>
- (id<LegacyComponentsContext>)context;
- (void)bindController:(UIViewController *)controller;
- (bool)managesWindow;
- (void)setHidden:(bool)hidden window:(UIWindow *)window;
@end
@protocol LegacyComponentsContext <NSObject>
- (CGRect)fullscreenBounds;
@@ -33,6 +46,16 @@ typedef enum {
- (void)setStatusBarStyle:(UIStatusBarStyle)statusBarStyle animated:(BOOL)animated;
- (void)forceStatusBarAppearanceUpdate;
- (CGFloat)applicationStatusBarAlpha;
- (void)setApplicationStatusBarAlpha:(CGFloat)alpha;
- (void)animateApplicationStatusBarAppearance:(int)statusBarAnimation delay:(NSTimeInterval)delay duration:(NSTimeInterval)duration completion:(void (^)())completion;
- (void)animateApplicationStatusBarAppearance:(int)statusBarAnimation duration:(NSTimeInterval)duration completion:(void (^)())completion;
- (void)animateApplicationStatusBarStyleTransitionWithDuration:(NSTimeInterval)duration;
- (bool)rootCallStatusBarHidden;
- (bool)currentlyInSplitView;
- (UIUserInterfaceSizeClass)currentSizeClass;
@@ -47,4 +70,6 @@ typedef enum {
- (void)presentActionSheet:(NSArray<LegacyComponentsActionSheetAction *> *)actions view:(UIView *)view completion:(void (^)(LegacyComponentsActionSheetAction *))completion;
- (id<LegacyComponentsOverlayWindowManager>)makeOverlayWindowManager;
@end

View File

@@ -1,11 +1,12 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <LegacyComponents/TGRootControllerProtocol.h>
#import <LegacyComponents/LegacyComponentsAccessChecker.h>
#import <LegacyComponents/LegacyHTTPRequestOperation.h>
#import <SSignalKit/SSignalKit.h>
@class SSignal;
@class SThreadPool;
@protocol SDisposable;
@class TGLocalization;
@class UIViewController;
@class TGWallpaperInfo;
@@ -25,8 +26,7 @@ typedef enum {
@protocol LegacyComponentsGlobalsProvider <NSObject>
- (TGLocalization *)effectiveLocalization;
- (void)log:(NSString *)format :(va_list)args;
- (UIViewController<TGRootControllerProtocol> *)rootController;
- (void)log:(NSString *)string;
- (NSArray<UIWindow *> *)applicationWindows;
- (UIWindow *)applicationStatusBarWindow;
- (UIWindow *)applicationKeyboardWindow;

View File

@@ -22,6 +22,9 @@ void TGDispatchAfter(double delay, dispatch_queue_t queue, dispatch_block_t bloc
int deviceMemorySize();
int cpuCoreCount();
UIImage *TGComponentsImageNamed(NSString *name);
NSString *TGComponentsPathForResource(NSString *name, NSString *type);
#define UIColorRGB(rgb) ([[UIColor alloc] initWithRed:(((rgb >> 16) & 0xff) / 255.0f) green:(((rgb >> 8) & 0xff) / 255.0f) blue:(((rgb) & 0xff) / 255.0f) alpha:1.0f])
#define UIColorRGBA(rgb,a) ([[UIColor alloc] initWithRed:(((rgb >> 16) & 0xff) / 255.0f) green:(((rgb >> 8) & 0xff) / 255.0f) blue:(((rgb) & 0xff) / 255.0f) alpha:a])
@@ -58,4 +61,3 @@ int cpuCoreCount();
#ifdef __cplusplus
}
#endif

View File

@@ -35,8 +35,9 @@ void TGLog(NSString *format, ...)
{
va_list L;
va_start(L, format);
[[LegacyComponentsGlobals provider] log:format :L];
NSString *string = [[NSString alloc] initWithFormat:format arguments:L];
va_end(L);
[[LegacyComponentsGlobals provider] log:string];
}
int iosMajorVersion()
@@ -155,3 +156,26 @@ void TGDispatchAfter(double delay, dispatch_queue_t queue, dispatch_block_t bloc
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((delay) * NSEC_PER_SEC)), queue, block);
}
static NSBundle *frameworkBundle() {
static NSBundle *currentBundle = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
currentBundle = [NSBundle bundleForClass:[LegacyComponentsGlobals class]];
NSString *updatedPath = [[currentBundle bundlePath] stringByAppendingPathComponent:@"LegacyComponentsResources.bundle"];
currentBundle = [NSBundle bundleWithPath:updatedPath];
});
return currentBundle;
}
UIImage *TGComponentsImageNamed(NSString *name) {
UIImage *image = [UIImage imageNamed:name inBundle:frameworkBundle() compatibleWithTraitCollection:nil];
if (image == nil) {
assert(true);
}
return image;
}
NSString *TGComponentsPathForResource(NSString *name, NSString *type) {
return [frameworkBundle() pathForResource:name ofType:type];
}

View File

@@ -95,11 +95,6 @@
return TGLocalized(@"PhotoEditor.BlurToolRadius");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorBlurTool"];
}
- (UIView <TGPhotoEditorToolView> *)itemControlViewWithChangeBlock:(void (^)(id newValue, bool animated))changeBlock
{
return [self itemControlViewWithChangeBlock:changeBlock explicit:false nameWidth:0.0f];

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.ContrastTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorContrastTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - (float)self.defaultValue) < FLT_EPSILON);

View File

@@ -195,11 +195,6 @@ const NSUInteger PGCurveDataStep = 2;
return TGLocalized(@"PhotoEditor.CurvesTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorCurvesTool"];
}
- (UIView <TGPhotoEditorToolView> *)itemAreaViewWithChangeBlock:(void (^)(id))changeBlock explicit:(bool)explicit
{
__weak PGCurvesTool *weakSelf = self;

View File

@@ -31,11 +31,6 @@
return TGLocalized(@"PhotoEditor.EnhanceTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorEnhanceTool"];
}
- (PGPhotoProcessPass *)pass
{
[self updatePassParameters];

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.ExposureTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorExposureTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - (float)self.defaultValue) < FLT_EPSILON);

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.FadeTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorFadeTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - self.defaultValue) < FLT_EPSILON);

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.GrainTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorGrainTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - (float)self.defaultValue) < FLT_EPSILON);

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.HighlightsTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorHighlightsTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - self.defaultValue) < FLT_EPSILON);

View File

@@ -2,6 +2,8 @@
#import "PGPhotoEditorPicture.h"
#import "LegacyComponentsInternal.h"
NSString *const PGPhotoFilterDefinitionsShaderString = PGShaderString
(
precision highp float;
@@ -367,7 +369,7 @@ NSString *const PGPhotoFilterMainShaderString = PGShaderString
- (instancetype)initWithShaderFile:(NSString *)shaderFile textureFiles:(NSArray *)textureFiles optimized:(bool)optimized
{
NSString *fragmentShaderPathname = [[NSBundle mainBundle] pathForResource:shaderFile ofType:@"fsh"];
NSString *fragmentShaderPathname = TGComponentsPathForResource(shaderFile, @"fsh");
NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragmentShaderPathname encoding:NSUTF8StringEncoding error:nil];
NSMutableArray *textureImages = [[NSMutableArray alloc] init];
@@ -387,7 +389,7 @@ NSString *const PGPhotoFilterMainShaderString = PGShaderString
NSString *name = [[textureFile lastPathComponent] stringByDeletingPathExtension];
NSString *extension = [textureFile pathExtension];
NSString *texturePathname = [[NSBundle mainBundle] pathForResource:name ofType:extension];
NSString *texturePathname = TGComponentsPathForResource(name, extension);
UIImage *textureImage = [UIImage imageWithContentsOfFile:texturePathname];
[textureImages addObject:textureImage];

View File

@@ -33,7 +33,6 @@ typedef enum
@property (nonatomic, readonly) PGPhotoToolType type;
@property (nonatomic, readonly) NSInteger order;
@property (nonatomic, readonly) UIImage *image;
@property (nonatomic, readonly) bool isHidden;

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.SaturationTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorSaturationTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - (float)self.defaultValue) < FLT_EPSILON);

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.ShadowsTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorShadowsTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - (float)self.defaultValue) < FLT_EPSILON);

View File

@@ -31,11 +31,6 @@
return TGLocalized(@"PhotoEditor.SharpenTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorSharpenTool"];
}
- (PGPhotoProcessPass *)pass
{
[self updatePassParameters];

View File

@@ -96,11 +96,6 @@
return TGLocalized(@"PhotoEditor.TintTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorTintTool"];
}
- (UIView <TGPhotoEditorToolView> *)itemControlViewWithChangeBlock:(void (^)(id, bool))changeBlock explicit:(bool)explicit nameWidth:(CGFloat)__unused nameWidth
{
__weak PGTintTool *weakSelf = self;

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.VignetteTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorVignetteTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - (float)self.defaultValue) < FLT_EPSILON);

View File

@@ -33,11 +33,6 @@
return TGLocalized(@"PhotoEditor.WarmthTool");
}
- (UIImage *)image
{
return [UIImage imageNamed:@"PhotoEditorWarmthTool"];
}
- (bool)shouldBeSkipped
{
return (ABS(((NSNumber *)self.displayValue).floatValue - self.defaultValue) < FLT_EPSILON);

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<style>
body { margin: 0; width:100%%; height:100%%; background-color:transparent; }
html { width:100%%; height:100%%; background-color:transparent; }
.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%% !important;
height: 100%% !important;
}
</style>
</head>
<body>
<div class="embed-container">
<iframe id="player" src="%@" width="100%" height="100%" frameborder="0"></iframe>
</div>
<script>
var iframe;
function injectCmd(cmd) {
var cmdStr = JSON.stringify({ "event": "inject", "cmd": cmd, "id": 1 });
iframe.contentWindow.postMessage(cmdStr, "*");
}
(function(){
iframe = document.querySelectorAll('iframe')[0];
iframe.onload = function() {
injectCmd('fixInline');
};
})();
</script>
</body>
</html>

View File

@@ -0,0 +1,18 @@
function fixInline() {
var video = document.getElementsByTagName('video')[0];
video.setAttribute('webkit-playsinline', '');
video.setAttribute('playsinline', '');
video.webkitExitFullscreen = undefined;
video.play();
}
function receiveMessage(evt) {
try {
var obj = JSON.parse(evt.data);
if (obj.cmd == 'fixInline')
fixInline();
} catch (ex) { }
}
window.addEventListener('message', receiveMessage, false);

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

View File

@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<style>
body { margin: 0; width:100%%; height:100%%; background-color:#000; }
html { width:100%%; height:100%%; background-color:#000; }
.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%% !important;
height: 100%% !important;
}
video::-webkit-media-controls { display: none !important }
</style>
</head>
<body>
<div class="embed-container">
<video id="video" type="video/mp4" preload="auto" src="%@" webkit-playsinline></video>
</div>
<script>
var video = document.getElementsByTagName('video')[0];
video.addEventListener("playing", onPlaybackStart, false);
video.addEventListener("ended", onPlaybackEnd, false);
function onPlaybackStart() {
window.location.href = 'instagramplayer://onPlayback?data=';
}
function onPlaybackEnd() {
video.currentTime = 0;
video.play();
}
function play() {
video.play();
}
function pause() {
video.pause();
}
video.play();
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

View File

@@ -0,0 +1,11 @@
precision highp float;
varying vec2 varTexcoord;
uniform sampler2D texture;
void main (void)
{
gl_FragColor = texture2D(texture, varTexcoord.st, 0.0);
gl_FragColor.rgb *= gl_FragColor.a;
}

Some files were not shown because too many files have changed in this diff Show More