Added missed OSX checking to touchbar's files.

This commit is contained in:
23rd 2020-07-13 17:46:50 +03:00 committed by John Preston
parent 87aa8a249f
commit 780b5555d7
13 changed files with 46 additions and 6 deletions

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSPopoverTouchBarItem.h>
#import <AppKit/NSTouchBar.h>
@ -14,3 +16,5 @@ API_AVAILABLE(macos(10.12.2))
@interface TextFormatPopover : NSPopoverTouchBarItem
- (id)init:(NSTouchBarItemIdentifier)identifier;
@end
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#include <AppKit/NSImageView.h>
namespace Main {
@ -18,3 +20,5 @@ API_AVAILABLE(macos(10.12.2))
- (id)init:(not_null<Main::Session*>)session
destroyEvent:(rpl::producer<>)touchBarSwitches;
@end
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSPopoverTouchBarItem.h>
#import <AppKit/NSTouchBar.h>
@ -19,3 +21,5 @@ API_AVAILABLE(macos(10.12.2))
- (id)init:(not_null<Window::Controller*>)controller
identifier:(NSTouchBarItemIdentifier)identifier;
@end
#endif // OS_OSX

View file

@ -7,9 +7,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSTouchBar.h>
API_AVAILABLE(macos(10.12.2))
@interface TouchBarAudioPlayer : NSTouchBar<NSTouchBarDelegate>
- (rpl::producer<>)closeRequests;
@end
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_audio.h"
#ifndef OS_OSX
#include "media/audio/media_audio.h"
#include "media/player/media_player_instance.h"
#include "platform/mac/touchbar/mac_touchbar_common.h"
@ -18,8 +20,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#import <AppKit/NSSlider.h>
#import <AppKit/NSSliderTouchBarItem.h>
#ifndef OS_OSX
NSImage *qt_mac_create_nsimage(const QPixmap &pm);
using TouchBar::kCircleDiameter;
using TouchBar::CreateNSImageFromStyleIcon;

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSImage.h>
#import <Foundation/Foundation.h>
@ -30,3 +32,5 @@ int WidthFromString(NSString *s);
NSImage *CreateNSImageFromStyleIcon(const style::icon &icon, int size);
} // namespace TouchBar
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_common.h"
#ifndef OS_OSX
#import <AppKit/NSTextField.h>
NSImage *qt_mac_create_nsimage(const QPixmap &pm);
@ -28,3 +30,5 @@ NSImage *CreateNSImageFromStyleIcon(const style::icon &icon, int size) {
}
} // namespace TouchBar
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
namespace Media {
namespace Player {
struct TrackState;
@ -63,3 +65,5 @@ NSCustomTouchBarItem *CreateTouchBarTrackPosition(
rpl::producer<Media::Player::TrackState> stateChanged);
} // namespace TouchBar
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_controls.h"
#ifndef OS_OSX
#include "base/platform/mac/base_utilities_mac.h" // Q2NSString()
#include "core/sandbox.h" // Sandbox::customEnterFromEventLoop()
#include "layout.h" // formatDurationText()
@ -274,3 +276,5 @@ NSCustomTouchBarItem *CreateTouchBarTrackPosition(
}
} // namespace TouchBar
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSTouchBar.h>
namespace Window {
@ -26,3 +28,5 @@ API_AVAILABLE(macos(10.12.2))
- (id)init:(not_null<Window::Controller*>)controller
touchBarSwitches:(rpl::producer<>)touchBarSwitches;
@end
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_main.h"
#ifndef OS_OSX
#include "platform/mac/touchbar/items/mac_formatter_item.h"
#include "platform/mac/touchbar/items/mac_pinned_chats_item.h"
#include "platform/mac/touchbar/items/mac_scrubber_item.h"
@ -16,8 +18,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#import <AppKit/NSCustomTouchBarItem.h>
#ifndef OS_OSX
using namespace TouchBar::Main;
#pragma mark - TouchBarMain

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#ifndef OS_OSX
#import <AppKit/NSTouchBar.h>
namespace Main {
@ -23,3 +25,5 @@ API_AVAILABLE(macos(10.12.2))
controller:(not_null<Window::Controller*>)controller
domain:(not_null<Main::Domain*>)domain;
@end
#endif // OS_OSX

View file

@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/mac/touchbar/mac_touchbar_manager.h"
#ifndef OS_OSX
#include "apiwrap.h" // ApiWrap::updateStickers()
#include "core/application.h"
#include "data/data_peer.h" // PeerData::canWrite()
@ -24,8 +26,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#import <AppKit/NSGroupTouchBarItem.h>
#ifndef OS_OSX
using namespace TouchBar::Main;
namespace {