blob: 1fc3af3fa821cf320cbbdc4f06000673cb459cda [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/bind.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/platform_window/platform_window_handler/wm_platform_export.h"
namespace ui {
class OSExchangeData;
class PlatformWindow;
class WM_PLATFORM_EXPORT WmDragHandler {
// Starts dragging with |data| which it wants to deliver to the destination.
// |operation| is the suggested operation which is bitmask of DRAG_NONE,
// DRAG_MOVE, DRAG_COPY and DRAG_LINK in DragDropTypes::DragOperation to the
// destination and the destination sets the final operation when the drop
// action is performed.
virtual void StartDrag(const OSExchangeData& data,
int operation,
gfx::NativeCursor cursor,
base::OnceCallback<void(int)> callback) = 0;
virtual ~WmDragHandler() {}
WM_PLATFORM_EXPORT void SetWmDragHandler(PlatformWindow* platform_window,
WmDragHandler* drag_handler);
WM_PLATFORM_EXPORT WmDragHandler* GetWmDragHandler(
const PlatformWindow& platform_window);
} // namespace ui