/* Native File Dialog http://www.frogtoss.com/labs */ /** * Copied from https://github.com/mlabbe/nativefiledialog * Modified to be modern Geode-fitting C++ */ #include #ifdef GEODE_IS_WINDOWS #ifdef __MINGW32__ // Explicitly setting NTDDI version, this is necessary for the MinGW compiler #define NTDDI_VERSION NTDDI_VISTA #define _WIN32_WINNT _WIN32_WINNT_VISTA #endif #define _CRTDBG_MAP_ALLOC #include #include /* only locally define UNICODE in this compilation unit */ #ifndef UNICODE #define UNICODE #endif #include #include #include #include #include #include #include #include #include #define NFD_MAX_STRLEN 256 #define _NFD_UNUSED(x) ((void)x) #define NFD_UTF8_BOM "\xEF\xBB\xBF" #include USE_GEODE_NAMESPACE(); enum class NFDMode { OpenFile, OpenFiles, SaveFile, OpenFolder, }; Result<> nfdPick( NFDMode mode, file::FilePickOptions const& options, void* result ); #endif