Commit b66033dd authored by Felix Paul Kühne's avatar Felix Paul Kühne

mac plugin: re-add support for the legacy 32bit ObjC runtime

parent ce43239c
...@@ -51,16 +51,20 @@ CGImageRef createImageNamed(NSString *); ...@@ -51,16 +51,20 @@ CGImageRef createImageNamed(NSString *);
#pragma mark - objc class interfaces #pragma mark - objc class interfaces
@interface VLCNoMediaLayer : CALayer @interface VLCNoMediaLayer : CALayer
{
VlcPluginMac *_cppPlugin;
}
@property (readwrite) VlcPluginMac * cppPlugin; @property (readwrite) VlcPluginMac *cppPlugin;
@end @end
@interface VLCBrowserRootLayer : CALayer { @interface VLCBrowserRootLayer : CALayer {
NSTimer *_interfaceUpdateTimer; NSTimer *_interfaceUpdateTimer;
VlcPluginMac *_cppPlugin;
} }
@property (readwrite) VlcPluginMac * cppPlugin; @property (readwrite) VlcPluginMac *cppPlugin;
- (void)startUIUpdateTimer; - (void)startUIUpdateTimer;
...@@ -85,11 +89,16 @@ CGImageRef createImageNamed(NSString *); ...@@ -85,11 +89,16 @@ CGImageRef createImageNamed(NSString *);
BOOL _wasPlayingBeforeMouseDown; BOOL _wasPlayingBeforeMouseDown;
BOOL _isScrubbing; BOOL _isScrubbing;
CGFloat _mouseDownXDelta; CGFloat _mouseDownXDelta;
double _mediaPosition;
BOOL _isPlaying;
BOOL _isFullscreen;
VlcPluginMac *_cppPlugin;
} }
@property (readwrite) double mediaPosition; @property (readwrite) double mediaPosition;
@property (readwrite) BOOL isPlaying; @property (readwrite) BOOL isPlaying;
@property (readwrite) BOOL isFullscreen; @property (readwrite) BOOL isFullscreen;
@property (readwrite) VlcPluginMac * cppPlugin; @property (readwrite) VlcPluginMac *cppPlugin;
- (void)handleMouseDown:(CGPoint)point; - (void)handleMouseDown:(CGPoint)point;
- (void)handleMouseUp:(CGPoint)point; - (void)handleMouseUp:(CGPoint)point;
...@@ -113,7 +122,7 @@ CGImageRef createImageNamed(NSString *); ...@@ -113,7 +122,7 @@ CGImageRef createImageNamed(NSString *);
VlcPluginMac *_cppPlugin; VlcPluginMac *_cppPlugin;
NSTimeInterval _timeSinceLastMouseMove; NSTimeInterval _timeSinceLastMouseMove;
} }
@property (readwrite) VlcPluginMac * cppPlugin; @property (readwrite) VlcPluginMac *cppPlugin;
- (void)hideToolbar; - (void)hideToolbar;
...@@ -123,7 +132,7 @@ CGImageRef createImageNamed(NSString *); ...@@ -123,7 +132,7 @@ CGImageRef createImageNamed(NSString *);
NSRect _initialFrame; NSRect _initialFrame;
VLCFullscreenContentView *_customContentView; VLCFullscreenContentView *_customContentView;
} }
@property (readonly) VLCFullscreenContentView* customContentView; @property (readonly) VLCFullscreenContentView *customContentView;
- (id)initWithContentRect:(NSRect)contentRect; - (id)initWithContentRect:(NSRect)contentRect;
...@@ -136,6 +145,15 @@ CGImageRef createImageNamed(NSString *); ...@@ -136,6 +145,15 @@ CGImageRef createImageNamed(NSString *);
@end @end
@interface VLCPerInstanceStorage : NSObject @interface VLCPerInstanceStorage : NSObject
{
VlcPluginMac *_cppPlugin;
VLCBrowserRootLayer *_browserRootLayer;
VLCPlaybackLayer *_playbackLayer;
VLCNoMediaLayer *_noMediaLayer;
VLCControllerLayer *_controllerLayer;
VLCFullscreenWindow *_fullscreenWindow;
VLCFullscreenContentView *_fullscreenView;
}
@property (readwrite, assign) VlcPluginMac *cppPlugin; @property (readwrite, assign) VlcPluginMac *cppPlugin;
@property (readwrite, retain) VLCBrowserRootLayer *browserRootLayer; @property (readwrite, retain) VLCBrowserRootLayer *browserRootLayer;
...@@ -149,6 +167,8 @@ CGImageRef createImageNamed(NSString *); ...@@ -149,6 +167,8 @@ CGImageRef createImageNamed(NSString *);
@implementation VLCPerInstanceStorage @implementation VLCPerInstanceStorage
@synthesize cppPlugin = _cppPlugin, browserRootLayer = _browserRootLayer, playbackLayer = _playbackLayer, noMediaLayer = _noMediaLayer, controllerLayer = _controllerLayer, fullscreenWindow = _fullscreenWindow, fullscreenView = _fullscreenView;
@end @end
#pragma mark - handling of c++ bindings #pragma mark - handling of c++ bindings
...@@ -447,6 +467,8 @@ bool VlcPluginMac::handle_event(void *event) ...@@ -447,6 +467,8 @@ bool VlcPluginMac::handle_event(void *event)
@implementation VLCBrowserRootLayer @implementation VLCBrowserRootLayer
@synthesize cppPlugin = _cppPlugin;
- (id)init - (id)init
{ {
if (self = [super init]) { if (self = [super init]) {
...@@ -535,6 +557,8 @@ bool VlcPluginMac::handle_event(void *event) ...@@ -535,6 +557,8 @@ bool VlcPluginMac::handle_event(void *event)
@implementation VLCNoMediaLayer @implementation VLCNoMediaLayer
@synthesize cppPlugin = _cppPlugin;
- (id)init - (id)init
{ {
if (self = [super init]) { if (self = [super init]) {
...@@ -681,6 +705,8 @@ bool VlcPluginMac::handle_event(void *event) ...@@ -681,6 +705,8 @@ bool VlcPluginMac::handle_event(void *event)
@implementation VLCControllerLayer @implementation VLCControllerLayer
@synthesize cppPlugin = _cppPlugin, mediaPosition = _mediaPosition, isPlaying = _isPlaying, isFullscreen = _isFullscreen;
- (id)init - (id)init
{ {
if (self = [super init]) { if (self = [super init]) {
...@@ -891,6 +917,8 @@ bool VlcPluginMac::handle_event(void *event) ...@@ -891,6 +917,8 @@ bool VlcPluginMac::handle_event(void *event)
@implementation VLCFullscreenWindow @implementation VLCFullscreenWindow
@synthesize customContentView = _customContentView;
- (id)initWithContentRect:(NSRect)contentRect - (id)initWithContentRect:(NSRect)contentRect
{ {
if (self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) { if (self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) {
...@@ -926,6 +954,8 @@ bool VlcPluginMac::handle_event(void *event) ...@@ -926,6 +954,8 @@ bool VlcPluginMac::handle_event(void *event)
@implementation VLCFullscreenContentView @implementation VLCFullscreenContentView
@synthesize cppPlugin = _cppPlugin;
- (BOOL)acceptsFirstResponder - (BOOL)acceptsFirstResponder
{ {
return YES; return YES;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment