| 352 | } |
| 353 | |
| 354 | cc_result Window_OpenFileDialog(const struct OpenFileDialogArgs* args) { |
| 355 | #if defined CC_BUILD_OS2 |
| 356 | FILEDLG fileDialog; |
| 357 | HWND hDialog; |
| 358 | |
| 359 | memset(&fileDialog, 0, sizeof(FILEDLG)); |
| 360 | fileDialog.cbSize = sizeof(FILEDLG); |
| 361 | fileDialog.fl = FDS_HELPBUTTON | FDS_CENTER | FDS_PRELOAD_VOLINFO | FDS_OPEN_DIALOG; |
| 362 | fileDialog.pszTitle = args->description; |
| 363 | fileDialog.pszOKButton = NULL; |
| 364 | fileDialog.pfnDlgProc = WinDefFileDlgProc; |
| 365 | |
| 366 | Mem_Copy(fileDialog.szFullFile, *args->filters, CCHMAXPATH); |
| 367 | hDialog = WinFileDlg(HWND_DESKTOP, 0, &fileDialog); |
| 368 | if (fileDialog.lReturn == DID_OK) { |
| 369 | cc_string temp = String_FromRaw(fileDialog.szFullFile, CCHMAXPATH); |
| 370 | args->Callback(&temp); |
| 371 | } |
| 372 | |
| 373 | return 0; |
| 374 | #else |
| 375 | return ERR_NOT_SUPPORTED; |
| 376 | #endif |
| 377 | } |
| 378 | |
| 379 | cc_result Window_SaveFileDialog(const struct SaveFileDialogArgs* args) { |
| 380 | #if defined CC_BUILD_OS2 |
nothing calls this directly
no test coverage detected