Add AppEvents
This commit is contained in:
15
openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.h
Normal file
15
openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface OpenVulkanoAppDelegate : UIResponder<UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
49
openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.mm
Normal file
49
openVulkanoCpp/Host/iOS/OpenVulkanoAppDelegate.mm
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#import "OpenVulkanoAppDelegate.h"
|
||||
|
||||
#include "Base/AppEvents.hpp"
|
||||
|
||||
using namespace openVulkanoCpp;
|
||||
|
||||
@interface OpenVulkanoAppDelegate ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation OpenVulkanoAppDelegate
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
AppEvents::OnWillResignActive();
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||
{
|
||||
AppEvents::OnDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||
{
|
||||
AppEvents::OnWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
AppEvents::OnDidBecomeActive();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application
|
||||
{
|
||||
AppEvents::OnWillTerminate();
|
||||
}
|
||||
|
||||
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
|
||||
{
|
||||
AppEvents::OnReceivedMemoryWarning();
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user