/* * X-Window XDND Protocol Implementation * Nana C++ Library(http://www.nanapro.org) * Copyright(C) 2018 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * @file: nana/detail/posix/xdnd_protocol.hpp * * The XDS is not supported. */ #ifndef NANA_DETAIL_POSIX_XDND_PROTOCOL_INCLUDED #define NANA_DETAIL_POSIX_XDND_PROTOCOL_INCLUDED #include "platform_spec.hpp" #include #include #include //debug namespace nana{ namespace detail { struct xdnd_data { std::vector files; }; class xdnd_protocol { public: enum class xdnd_status_state { normal, position_sent, status_ignore }; xdnd_protocol(Window source): spec_(nana::detail::platform_spec::instance()), source_(source) { detail::platform_scope_guard lock; ::XSetSelectionOwner(spec_.open_display(), spec_.atombase().xdnd_selection, source, CurrentTime); std::cout<<"XSetSelectionOwner "<(xclient.data.l[0]); bool is_accepted_by_target = (xclient.data.l[1] & 1); std::cout<<"XdndStatus: Accepted="<(xclient.data.l[2] >> 16), static_cast(xclient.data.l[2] & 0xFFFF), static_cast(xclient.data.l[3] >> 16), static_cast(xclient.data.l[3] & 0xFFFF) }; if(!rct.empty()) { mvout_table_[target_wd] = rct; std::cout<<". rct=("< mvout_table_; }; //end class xdnd_protocol } } #endif