add support XDND for X
This commit is contained in:
@@ -103,12 +103,29 @@ namespace std {
|
||||
|
||||
} // filesystem
|
||||
} // experimental
|
||||
|
||||
namespace filesystem
|
||||
{
|
||||
using namespace experimental::filesystem;
|
||||
}
|
||||
} // std
|
||||
|
||||
#else
|
||||
# undef NANA_USING_STD_FILESYSTEM
|
||||
# define NANA_USING_STD_FILESYSTEM 1
|
||||
# include <experimental/filesystem>
|
||||
# if ((defined(_MSC_VER) && (_MSC_VER >= 1912) && defined(_MSVC_LANG) && _MSVC_LANG >= 201703)) || \
|
||||
((__cplusplus >= 201703L) && \
|
||||
(defined(__clang__) && (__clang_major__ >= 7) || \
|
||||
(!defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 8))) )
|
||||
# include <filesystem>
|
||||
# else
|
||||
# include <experimental/filesystem>
|
||||
namespace std{
|
||||
namespace filesystem{
|
||||
using namespace std::experimental::filesystem;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -508,8 +525,13 @@ namespace std {
|
||||
# endif
|
||||
} // filesystem
|
||||
} // experimental
|
||||
|
||||
namespace filesystem {
|
||||
using namespace std::experimental::filesystem;
|
||||
}
|
||||
} // std
|
||||
|
||||
|
||||
#endif //NANA_USING_NANA_FILESYSTEM
|
||||
|
||||
#include <nana/pop_ignore_diagnostic>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "basis.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <nana/filesystem/filesystem.hpp>
|
||||
|
||||
namespace nana
|
||||
{
|
||||
@@ -41,22 +42,48 @@ namespace nana
|
||||
implementation* const impl_;
|
||||
};
|
||||
|
||||
namespace detail
|
||||
{
|
||||
struct dragdrop_data;
|
||||
}
|
||||
|
||||
class dragdrop
|
||||
{
|
||||
struct implementation;
|
||||
|
||||
/// Non-copyable
|
||||
dragdrop(const dragdrop&) = delete;
|
||||
dragdrop& operator=(const dragdrop&) = delete;
|
||||
|
||||
/// Non-movable
|
||||
dragdrop(dragdrop&&) = delete;
|
||||
dragdrop& operator=(dragdrop&&) = delete;
|
||||
public:
|
||||
class data
|
||||
{
|
||||
friend struct dragdrop::implementation;
|
||||
|
||||
/// Non-copyable
|
||||
data(const data&) = delete;
|
||||
data& operator=(const data&) = delete;
|
||||
public:
|
||||
data();
|
||||
data(data&&);
|
||||
~data();
|
||||
|
||||
data& operator=(data&& rhs);
|
||||
|
||||
void insert(std::filesystem::path);
|
||||
private:
|
||||
detail::dragdrop_data* real_data_;
|
||||
};
|
||||
|
||||
dragdrop(window source);
|
||||
~dragdrop();
|
||||
|
||||
void condition(std::function<bool()> predicate_fn);
|
||||
|
||||
void make_data(std::function<void()> generator);
|
||||
void prepare_data(std::function<data()> generator);
|
||||
void drop_finished(std::function<void(bool)> finish_fn);
|
||||
private:
|
||||
implementation* const impl_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user