Add AppEvents

This commit is contained in:
2023-08-17 15:54:22 +02:00
parent 3d73efee81
commit aa0f1e7967
4 changed files with 116 additions and 0 deletions

View 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

View 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