Adding ViroKit. Needs AWSCore :(

This commit is contained in:
John Lyon-Smith
2018-03-27 17:46:15 -07:00
parent 2ab15e7dc1
commit 02e06dface
844 changed files with 86921 additions and 21 deletions

View File

@@ -0,0 +1,51 @@
//
// VROPortalDelegateiOS.h
// ViroKit
//
// Created by Vik Advani on 9/14/17.
// Copyright © 2017 Viro Media. All rights reserved.
//
#ifndef VROPortalDelegateiOS_h
#define VROPortalDelegateiOS_h
#import "VROPortalDelegate.h"
#import <Foundation/Foundation.h>
/*
Protocol to be implemented by objective C controls to be
set on VROEventDelegateiOS for the notification of
input events.
*/
@protocol VROPortalDelegateProtocol<NSObject>
@required
- (void)onPortalEnter;
- (void)onPortalExit;
@end
/*
iOS implementation of VROEventDelegate for the notification
of delegate events across the bridge.
*/
class VROPortalDelegateiOS : public VROPortalDelegate {
public:
VROPortalDelegateiOS(id<VROPortalDelegateProtocol> delegate) :
_delegate(delegate) {}
virtual ~VROPortalDelegateiOS() {}
/*
Delegate events triggered by the EventManager.
*/
virtual void onPortalEnter() {
[_delegate onPortalEnter];
}
virtual void onPortalExit() {
[_delegate onPortalExit];
}
private:
__weak id<VROPortalDelegateProtocol> _delegate;
};
#endif /* VROPortalDelegateiOS_h */