VulkanDevice: Fix for MacOS

This commit is contained in:
Stenzek
2023-08-24 18:02:55 +10:00
parent 64998b49dc
commit d750e4d417
4 changed files with 64 additions and 15 deletions

View File

@ -10,16 +10,21 @@ struct WindowInfo;
#import <Cocoa/Cocoa.h>
namespace CocoaTools {
NSString* StringViewToNSString(const std::string_view& str);
NSString* StringViewToNSString(const std::string_view& str);
}
#endif
namespace CocoaTools {
/// Add a handler to be run when macOS changes between dark and light themes
void AddThemeChangeHandler(void* ctx, void(handler)(void* ctx));
/// Add a handler to be run when macOS changes between dark and light themes
void AddThemeChangeHandler(void* ctx, void(handler)(void* ctx));
/// Remove a handler previously added using AddThemeChangeHandler with the given context
void RemoveThemeChangeHandler(void* ctx);
}
/// Remove a handler previously added using AddThemeChangeHandler with the given context
void RemoveThemeChangeHandler(void* ctx);
/// Creates metal layer on specified window surface.
bool CreateMetalLayer(WindowInfo* wi);
/// Destroys metal layer on specified window surface.
void DestroyMetalLayer(WindowInfo* wi);
} // namespace CocoaTools