/* Copyright (C) 1998-2002 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
 */

_DEFS(gtkmm,gtk)
_CONFIGINCLUDE(gtkmmconfig.h)
_IS_DEPRECATED // The entire file is deprecated.

#include <glibmm/interface.h>
#include <gtkmm/treemodel.h>
#include <gdkmm/contentprovider.h>

_PINCLUDE(glibmm/private/interface_p.h)

#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()

#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
{
typedef struct _GtkTreeDragSourceIface GtkTreeDragSourceIface;
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

namespace Gtk
{

/** Interface for Drag-and-Drop sources in Gtk::TreeView.
 *
 * @ingroup TreeView
 * @deprecated 4.10: List views use widgets to display their contents.
 *   You can use Gtk::DragSource to implement a drag source.
 */
class GTKMM_API TreeDragSource : public Glib::Interface
{
  _CLASS_INTERFACE(TreeDragSource, GtkTreeDragSource, GTK_TREE_DRAG_SOURCE, GtkTreeDragSourceIface, , , GTKMM_API)

public:
  _WRAP_METHOD(bool row_draggable(const TreeModel::Path& path) const, gtk_tree_drag_source_row_draggable)

  // gtk_tree_drag_source_drag_data_get() returns a newly created GdkContentProvider.
  _WRAP_METHOD(Glib::RefPtr<Gdk::ContentProvider> drag_data_get(const TreeModel::Path& path) const, gtk_tree_drag_source_drag_data_get)

  _WRAP_METHOD(bool drag_data_delete(const TreeModel::Path& path), gtk_tree_drag_source_drag_data_delete)

protected:

  _WRAP_VFUNC(bool row_draggable(const TreeModel::Path& path) const, row_draggable)
#m4 _CONVERSION(`Glib::RefPtr<Gdk::ContentProvider>', `GdkContentProvider*', __CONVERT_REFPTR_TO_P)
  _WRAP_VFUNC(Glib::RefPtr<Gdk::ContentProvider> drag_data_get(const TreeModel::Path& path) const,
    drag_data_get, refreturn_ctype)
  _WRAP_VFUNC(bool drag_data_delete(const TreeModel::Path& path), drag_data_delete)
};

} // namespace Gtk
