2019-04-29 13:41:51 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "platform/platform_specific.h"
|
|
|
|
#include "media/audio/media_audio.h"
|
|
|
|
#include "media/player/media_player_instance.h"
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2019-04-29 16:55:11 +00:00
|
|
|
namespace {
|
|
|
|
enum class TouchBarType {
|
2019-04-30 18:31:42 +00:00
|
|
|
None,
|
2019-04-29 16:55:11 +00:00
|
|
|
Main,
|
|
|
|
AudioPlayer,
|
2019-05-04 09:43:22 +00:00
|
|
|
AudioPlayerForce,
|
2019-04-29 16:55:11 +00:00
|
|
|
};
|
|
|
|
} // namespace
|
|
|
|
|
2019-05-10 09:50:47 +00:00
|
|
|
@interface TouchBar : NSTouchBar {
|
|
|
|
rpl::lifetime lifetime;
|
|
|
|
}
|
2019-04-29 16:55:11 +00:00
|
|
|
@property TouchBarType touchBarType;
|
2019-05-02 11:02:54 +00:00
|
|
|
@property TouchBarType touchBarTypeBeforeLock;
|
2019-04-29 13:41:51 +00:00
|
|
|
|
|
|
|
@property(retain) NSDictionary * _Nullable touchbarItems;
|
2019-04-29 16:55:11 +00:00
|
|
|
@property(retain) NSTouchBar * _Nullable touchBarMain;
|
|
|
|
@property(retain) NSTouchBar * _Nullable touchBarAudioPlayer;
|
2019-04-30 18:31:42 +00:00
|
|
|
@property(retain) NSView * _Nullable view;
|
2019-04-29 13:41:51 +00:00
|
|
|
@property(nonatomic, assign) double duration;
|
|
|
|
@property(nonatomic, assign) double position;
|
|
|
|
|
2019-05-07 17:08:00 +00:00
|
|
|
@property(retain) NSMutableArray * _Nullable mainPinnedButtons;
|
|
|
|
|
2019-04-30 18:31:42 +00:00
|
|
|
- (id _Nonnull) init:(NSView * _Nonnull)view;
|
2019-05-10 12:37:18 +00:00
|
|
|
- (void) handleTrackStateChange:(Media::Player::TrackState)property;
|
2019-05-08 10:42:15 +00:00
|
|
|
- (void) setTouchBar:(TouchBarType)type;
|
2019-04-29 13:41:51 +00:00
|
|
|
|
|
|
|
@end
|