// Generated by gmmproc 2.72.1 -- DO NOT MODIFY!


#include <glibmm.h>

#include <gdkmm/drag.h>
#include <gdkmm/private/drag_p.h>


/*
 * Copyright 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <gdkmm/contentformats.h>
#include <gdkmm/contentprovider.h>
#include <gdkmm/display.h>
#include <gdkmm/device.h>
#include <gdkmm/surface.h>
#include <gdk/gdk.h>


namespace
{


static void Drag_signal_cancel_callback(GdkDrag* self, GdkDragCancelReason p0,void* data)
{
  using namespace Gdk;
  using SlotType = sigc::slot<void(DragCancelReason)>;

  auto obj = dynamic_cast<Drag*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(static_cast<DragCancelReason>(p0)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo Drag_signal_cancel_info =
{
  "cancel",
  (GCallback) &Drag_signal_cancel_callback,
  (GCallback) &Drag_signal_cancel_callback
};


static const Glib::SignalProxyInfo Drag_signal_drop_performed_info =
{
  "drop-performed",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


static const Glib::SignalProxyInfo Drag_signal_dnd_finished_info =
{
  "dnd-finished",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


} // anonymous namespace

// static
GType Glib::Value<Gdk::DragCancelReason>::value_type()
{
  return gdk_drag_cancel_reason_get_type();
}


namespace Glib
{

Glib::RefPtr<Gdk::Drag> wrap(GdkDrag* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gdk::Drag>( dynamic_cast<Gdk::Drag*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Gdk
{


/* The *_Class implementation: */

const Glib::Class& Drag_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &Drag_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gdk_drag_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void Drag_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* Drag_Class::wrap_new(GObject* object)
{
  return new Drag((GdkDrag*)object);
}


/* The implementation: */

GdkDrag* Drag::gobj_copy()
{
  reference();
  return gobj();
}

Drag::Drag(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{

}

Drag::Drag(GdkDrag* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


Drag::Drag(Drag&& src) noexcept
: Glib::Object(std::move(src))
{}

Drag& Drag::operator=(Drag&& src) noexcept
{
  Glib::Object::operator=(std::move(src));
  return *this;
}


Drag::~Drag() noexcept
{}


Drag::CppClassType Drag::drag_class_; // initialize static member

GType Drag::get_type()
{
  return drag_class_.init().get_type();
}


GType Drag::get_base_type()
{
  return gdk_drag_get_type();
}


Glib::RefPtr<Display> Drag::get_display()
{
  auto retvalue = Glib::wrap(gdk_drag_get_display(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Display> Drag::get_display() const
{
  return const_cast<Drag*>(this)->get_display();
}

Glib::RefPtr<Device> Drag::get_device()
{
  auto retvalue = Glib::wrap(gdk_drag_get_device(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Device> Drag::get_device() const
{
  return const_cast<Drag*>(this)->get_device();
}

Glib::RefPtr<ContentFormats> Drag::get_formats()
{
  auto retvalue = Glib::wrap(gdk_drag_get_formats(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const ContentFormats> Drag::get_formats() const
{
  return const_cast<Drag*>(this)->get_formats();
}

DragAction Drag::get_actions() const
{
  return static_cast<DragAction>(gdk_drag_get_actions(const_cast<GdkDrag*>(gobj())));
}

DragAction Drag::get_selected_action() const
{
  return static_cast<DragAction>(gdk_drag_get_selected_action(const_cast<GdkDrag*>(gobj())));
}

bool Drag::action_is_unique(DragAction action)
{
  return gdk_drag_action_is_unique(static_cast<GdkDragAction>(action));
}

void Drag::drag_drop_done(bool success)
{
  gdk_drag_drop_done(gobj(), static_cast<int>(success));
}

Glib::RefPtr<Surface> Drag::get_drag_surface()
{
  auto retvalue = Glib::wrap(gdk_drag_get_drag_surface(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Surface> Drag::get_drag_surface() const
{
  return const_cast<Drag*>(this)->get_drag_surface();
}

void Drag::set_hotspot(int hot_x, int hot_y)
{
  gdk_drag_set_hotspot(gobj(), hot_x, hot_y);
}

Glib::RefPtr<ContentProvider> Drag::get_content()
{
  auto retvalue = Glib::wrap(gdk_drag_get_content(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const ContentProvider> Drag::get_content() const
{
  return const_cast<Drag*>(this)->get_content();
}

Glib::RefPtr<Surface> Drag::get_surface()
{
  auto retvalue = Glib::wrap(gdk_drag_get_surface(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Surface> Drag::get_surface() const
{
  return const_cast<Drag*>(this)->get_surface();
}


Glib::SignalProxy<void(DragCancelReason)> Drag::signal_cancel()
{
  return Glib::SignalProxy<void(DragCancelReason) >(this, &Drag_signal_cancel_info);
}


Glib::SignalProxy<void()> Drag::signal_drop_performed()
{
  return Glib::SignalProxy<void() >(this, &Drag_signal_drop_performed_info);
}


Glib::SignalProxy<void()> Drag::signal_dnd_finished()
{
  return Glib::SignalProxy<void() >(this, &Drag_signal_dnd_finished_info);
}


static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<ContentProvider>>::value,
  "Type Glib::RefPtr<ContentProvider> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ContentProvider> > Drag::property_content() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ContentProvider> >(this, "content");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<Device>>::value,
  "Type Glib::RefPtr<Device> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Device> > Drag::property_device() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Device> >(this, "device");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<Display>>::value,
  "Type Glib::RefPtr<Display> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > Drag::property_display() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> >(this, "display");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<ContentFormats>>::value,
  "Type Glib::RefPtr<ContentFormats> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ContentFormats> > Drag::property_formats() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ContentFormats> >(this, "formats");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<DragAction>::value,
  "Type DragAction cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< DragAction > Drag::property_selected_action() 
{
  return Glib::PropertyProxy< DragAction >(this, "selected-action");
}

Glib::PropertyProxy_ReadOnly< DragAction > Drag::property_selected_action() const
{
  return Glib::PropertyProxy_ReadOnly< DragAction >(this, "selected-action");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<DragAction>::value,
  "Type DragAction cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< DragAction > Drag::property_actions() 
{
  return Glib::PropertyProxy< DragAction >(this, "actions");
}

Glib::PropertyProxy_ReadOnly< DragAction > Drag::property_actions() const
{
  return Glib::PropertyProxy_ReadOnly< DragAction >(this, "actions");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<Surface>>::value,
  "Type Glib::RefPtr<Surface> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Surface> > Drag::property_surface() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Surface> >(this, "surface");
}


} // namespace Gdk


