#include "ui/base/x/x11_drag_drop_client.h"
#include "base/containers/flat_set.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "ui/base/clipboard/clipboard_constants.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/x/x11_os_exchange_data_provider.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/window_cache.h"
#include "ui/gfx/x/xproto.h"
namespace ui {
const char kXdndDirectSave0[] = …;
namespace {
DragOperation;
constexpr int kWillAcceptDrop = …;
constexpr int kWantFurtherPosEvents = …;
constexpr int kMinXdndVersion = …;
constexpr int kMaxXdndVersion = …;
const char kXdndAware[] = …;
const char kXdndTypeList[] = …;
const char kXdndActionCopy[] = …;
const char kXdndActionMove[] = …;
const char kXdndActionLink[] = …;
const char kXdndActionDirectSave[] = …;
const char kXdndActionList[] = …;
const char kXdndProxy[] = …;
const char kXdndDrop[] = …;
const char kXdndEnter[] = …;
const char kXdndFinished[] = …;
const char kXdndLeave[] = …;
const char kXdndPosition[] = …;
const char kXdndStatus[] = …;
static base::LazyInstance<std::map<x11::Window, XDragDropClient*>>::Leaky
g_live_client_map = …;
x11::Atom DragOperationToAtom(DragOperation operation) { … }
DragOperation AtomToDragOperation(x11::Atom atom) { … }
}
int XGetMaskAsEventFlags() { … }
XDragDropClient* XDragDropClient::GetForWindow(x11::Window window) { … }
XDragDropClient::XDragDropClient(XDragDropClient::Delegate* delegate,
x11::Window xwindow)
: … { … }
XDragDropClient::~XDragDropClient() { … }
std::vector<x11::Atom> XDragDropClient::GetOfferedDragOperations() const { … }
void XDragDropClient::CompleteXdndPosition(x11::Window source_window,
const gfx::Point& screen_point) { … }
void XDragDropClient::ProcessMouseMove(const gfx::Point& screen_point,
unsigned long event_time) { … }
bool XDragDropClient::HandleXdndEvent(const x11::ClientMessageEvent& event) { … }
void XDragDropClient::OnXdndEnter(const x11::ClientMessageEvent& event) { … }
void XDragDropClient::OnXdndPosition(const x11::ClientMessageEvent& event) { … }
void XDragDropClient::OnXdndStatus(const x11::ClientMessageEvent& event) { … }
void XDragDropClient::OnXdndLeave(const x11::ClientMessageEvent& event) { … }
void XDragDropClient::OnXdndDrop(const x11::ClientMessageEvent& event) { … }
void XDragDropClient::OnXdndFinished(const x11::ClientMessageEvent& event) { … }
void XDragDropClient::OnSelectionNotify(
const x11::SelectionNotifyEvent& xselection) { … }
void XDragDropClient::InitDrag(int allowed_operations,
const OSExchangeData* data) { … }
void XDragDropClient::CleanupDrag() { … }
void XDragDropClient::UpdateModifierState(int flags) { … }
void XDragDropClient::ResetDragContext() { … }
void XDragDropClient::StopRepeatMouseMoveTimer() { … }
void XDragDropClient::StartEndMoveLoopTimer() { … }
void XDragDropClient::StopEndMoveLoopTimer() { … }
void XDragDropClient::HandleMouseMovement(const gfx::Point& screen_point,
int flags,
base::TimeTicks event_time) { … }
void XDragDropClient::HandleMouseReleased() { … }
void XDragDropClient::HandleMoveLoopEnded() { … }
x11::ClientMessageEvent XDragDropClient::PrepareXdndClientMessage(
const char* message,
x11::Window recipient) const { … }
x11::Window XDragDropClient::FindWindowFor(const gfx::Point& screen_point) { … }
void XDragDropClient::SendXClientEvent(x11::Window window,
const x11::ClientMessageEvent& xev) { … }
void XDragDropClient::SendXdndEnter(x11::Window dest_window,
const std::vector<x11::Atom>& targets) { … }
void XDragDropClient::SendXdndPosition(x11::Window dest_window,
const gfx::Point& screen_point,
unsigned long event_time) { … }
void XDragDropClient::SendXdndLeave(x11::Window dest_window) { … }
void XDragDropClient::SendXdndDrop(x11::Window dest_window) { … }
void XDragDropClient::EndMoveLoop() { … }
}