drag_util.h 861 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2016 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_
  5. #define ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_
  6. #include <memory>
  7. #include <vector>
  8. #include "electron/shell/common/api/api.mojom.h"
  9. #include "third_party/skia/include/core/SkRegion.h"
  10. #include "ui/gfx/image/image.h"
  11. namespace base {
  12. class FilePath;
  13. }
  14. namespace electron {
  15. void DragFileItems(const std::vector<base::FilePath>& files,
  16. const gfx::Image& icon,
  17. gfx::NativeView view);
  18. // Convert draggable regions in raw format to SkRegion format.
  19. std::unique_ptr<SkRegion> DraggableRegionsToSkRegion(
  20. const std::vector<mojom::DraggableRegionPtr>& regions);
  21. } // namespace electron
  22. #endif // ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_