MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / NFD_SaveDialogN

Function NFD_SaveDialogN

extern/nfd/nfd_portal.cpp:1354–1391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354nfdresult_t NFD_SaveDialogN(nfdnchar_t** outPath,
1355 const nfdnfilteritem_t* filterList,
1356 nfdfiltersize_t filterCount,
1357 const nfdnchar_t* defaultPath,
1358 const nfdnchar_t* defaultName) {
1359 DBusMessage* msg;
1360 {
1361 const nfdresult_t res =
1362 NFD_DBus_SaveFile(msg, filterList, filterCount, defaultPath, defaultName);
1363 if (res != NFD_OKAY) {
1364 return res;
1365 }
1366 }
1367 DBusMessage_Guard msg_guard(msg);
1368
1369#ifdef NFD_APPEND_EXTENSION
1370 const char* uri;
1371 const char* extn;
1372 {
1373 const nfdresult_t res = ReadResponseUrisSingleAndCurrentExtension(msg, uri, extn);
1374 if (res != NFD_OKAY) {
1375 return res;
1376 }
1377 }
1378
1379 return AllocAndCopyFilePathWithExtn(uri, extn, *outPath);
1380#else
1381 const char* uri;
1382 {
1383 const nfdresult_t res = ReadResponseUrisSingle(msg, uri);
1384 if (res != NFD_OKAY) {
1385 return res;
1386 }
1387 }
1388
1389 return AllocAndCopyFilePath(uri, *outPath);
1390#endif
1391}
1392
1393nfdresult_t NFD_PickFolderN(nfdnchar_t** outPath, const nfdnchar_t* defaultPath) {
1394 (void)defaultPath; // Default path not supported for portal backend

Callers

nothing calls this directly

Calls 5

NFD_DBus_SaveFileFunction · 0.85
ReadResponseUrisSingleFunction · 0.85
AllocAndCopyFilePathFunction · 0.85

Tested by

no test coverage detected