tdesktop/Telegram/SourceFiles/platform/mac/touchbar.h

47 lines
1.0 KiB
Objective-C

/*
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>
namespace Platform {
enum class TouchBarType {
None,
Main,
AudioPlayer,
AudioPlayerForce,
};
} // namespace
@interface TouchBar : NSTouchBar {
@private
NSView *_parentView;
NSMutableArray *_mainPinnedButtons;
NSTouchBar *_touchBarMain;
NSTouchBar *_touchBarAudioPlayer;
Platform::TouchBarType _touchBarType;
Platform::TouchBarType _touchBarTypeBeforeLock;
double _duration;
double _position;
rpl::lifetime _lifetime;
}
@property(retain) NSDictionary * _Nullable touchBarItems;
- (id _Nonnull) init:(NSView * _Nonnull)view;
- (void) handleTrackStateChange:(Media::Player::TrackState)state;
- (void) setTouchBar:(Platform::TouchBarType)type;
@end