aboutsummaryrefslogtreecommitdiff
path: root/src/platform/gui/osx/UiApplication.mm
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-08-18 17:22:22 +0800
committerYuqian Yang <crupest@crupest.life>2025-08-18 17:22:22 +0800
commitd54052bccefe3bc4332a1636d348a10b197ad869 (patch)
treeadb41c6b79f6dc6fd12b68341e2a2f3a6d8e6816 /src/platform/gui/osx/UiApplication.mm
parent63807c3064002ec75b48c444a767e396c273f403 (diff)
downloadcru-d54052bccefe3bc4332a1636d348a10b197ad869.tar.gz
cru-d54052bccefe3bc4332a1636d348a10b197ad869.tar.bz2
cru-d54052bccefe3bc4332a1636d348a10b197ad869.zip
Rename ToCFStringRef to ToCFString.
Diffstat (limited to 'src/platform/gui/osx/UiApplication.mm')
-rw-r--r--src/platform/gui/osx/UiApplication.mm16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/platform/gui/osx/UiApplication.mm b/src/platform/gui/osx/UiApplication.mm
index 2733e8af..7e744928 100644
--- a/src/platform/gui/osx/UiApplication.mm
+++ b/src/platform/gui/osx/UiApplication.mm
@@ -179,15 +179,15 @@ graphics::IGraphicsFactory* OsxUiApplication::GetGraphicsFactory() {
std::optional<String> OsxUiApplication::ShowSaveDialog(SaveDialogOptions options) {
NSSavePanel* panel = [NSSavePanel savePanel];
- [panel setTitle:(NSString*)ToCFStringRef(options.title).ref];
- [panel setPrompt:(NSString*)ToCFStringRef(options.prompt).ref];
- [panel setMessage:(NSString*)ToCFStringRef(options.message).ref];
+ [panel setTitle:(NSString*)ToCFString(options.title).ref];
+ [panel setPrompt:(NSString*)ToCFString(options.prompt).ref];
+ [panel setMessage:(NSString*)ToCFString(options.message).ref];
NSMutableArray* allowed_content_types = [NSMutableArray array];
for (const auto& file_type : options.allowed_file_types) {
[allowed_content_types
- addObject:[UTType typeWithFilenameExtension:(NSString*)ToCFStringRef(file_type).ref]];
+ addObject:[UTType typeWithFilenameExtension:(NSString*)ToCFString(file_type).ref]];
}
[panel setAllowedContentTypes:allowed_content_types];
@@ -203,15 +203,15 @@ std::optional<String> OsxUiApplication::ShowSaveDialog(SaveDialogOptions options
std::optional<std::vector<String>> OsxUiApplication::ShowOpenDialog(OpenDialogOptions options) {
NSOpenPanel* panel = [NSOpenPanel openPanel];
- [panel setTitle:(NSString*)ToCFStringRef(options.title).ref];
- [panel setPrompt:(NSString*)ToCFStringRef(options.prompt).ref];
- [panel setMessage:(NSString*)ToCFStringRef(options.message).ref];
+ [panel setTitle:(NSString*)ToCFString(options.title).ref];
+ [panel setPrompt:(NSString*)ToCFString(options.prompt).ref];
+ [panel setMessage:(NSString*)ToCFString(options.message).ref];
NSMutableArray* allowed_content_types = [NSMutableArray array];
for (const auto& file_type : options.allowed_file_types) {
[allowed_content_types
- addObject:[UTType typeWithFilenameExtension:(NSString*)ToCFStringRef(file_type).ref]];
+ addObject:[UTType typeWithFilenameExtension:(NSString*)ToCFString(file_type).ref]];
}
[panel setAllowedContentTypes:allowed_content_types];