1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

sokol: sapp_macos_set_title

This commit is contained in:
Alexander Medvednikov 2020-07-27 21:18:33 +02:00
parent 61c1c4a690
commit f33d9f4f68

View File

@ -846,6 +846,7 @@ SOKOL_API_DECL const void* sapp_metal_get_renderpass_descriptor(void);
SOKOL_API_DECL const void* sapp_metal_get_drawable(void);
/* macOS: get ARC-bridged pointer to macOS NSWindow */
SOKOL_API_DECL const void* sapp_macos_get_window(void);
SOKOL_API_DECL void sapp_macos_set_title(const char* title);
/* iOS: get ARC-bridged pointer to iOS UIWindow */
SOKOL_API_DECL const void* sapp_ios_get_window(void);
@ -7527,6 +7528,12 @@ SOKOL_API_IMPL const void* sapp_macos_get_window(void) {
#endif
}
SOKOL_API_IMPL void sapp_macos_set_title(const char* title) {
#if defined(__APPLE__) && !TARGET_OS_IPHONE
[_sapp_macos_window_obj setTitle: [NSString stringWithUTF8String:title]];
#endif
}
SOKOL_API_IMPL const void* sapp_ios_get_window(void) {
#if defined(__APPLE__) && TARGET_OS_IPHONE
const void* obj = (__bridge const void*) _sapp_ios_window_obj;