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


#include <glibmm.h>

#include <gdkmm/event.h>
#include <gdkmm/private/event_p.h>

#include <gdk/gdk.h>

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

#include <gdkmm/device.h>
#include <gdkmm/display.h>
#include <gdkmm/seat.h>
#include <gdkmm/surface.h>

using Type = Gdk::Event::Type;


namespace
{
} // anonymous namespace

// static
GType Glib::Value<Gdk::Event::Type>::value_type()
{
  return gdk_event_type_get_type();
}


namespace Glib
{

Glib::RefPtr<Gdk::Event> wrap(GdkEvent* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gdk::Event>( dynamic_cast<Gdk::Event*> (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& Event_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_ = &Event_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_event_get_type());

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

  }

  return *this;
}


void Event_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* Event_Class::wrap_new(GObject* object)
{
  return new Event((GdkEvent*)object);
}


/* The implementation: */

GdkEvent* Event::gobj_copy()
{
  reference();
  return gobj();
}

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

}

Event::Event(GdkEvent* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


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

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


Event::~Event() noexcept
{}


Event::CppClassType Event::event_class_; // initialize static member

GType Event::get_type()
{
  return event_class_.init().get_type();
}


GType Event::get_base_type()
{
  return gdk_event_get_type();
}


Event::Event(Type event_type)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Glib::Object(Glib::ConstructParams(event_class_.init(), "event_type", static_cast<GdkEventType>(event_type), nullptr))
{
  

}

Glib::RefPtr<Event> Event::create(Type event_type)
{
  return Glib::make_refptr_for_instance<Event>( new Event(event_type) );
}

Glib::RefPtr<Event> Event::copy() const
{
  return Glib::wrap(gdk_event_copy(const_cast<GdkEvent*>(gobj())));
}

Type Event::get_event_type() const
{
  return static_cast<Type>(gdk_event_get_event_type(const_cast<GdkEvent*>(gobj())));
}

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

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

bool Event::is_sent() const
{
  return gdk_event_is_sent(const_cast<GdkEvent*>(gobj()));
}

void Event::set_show_events(bool show_events)
{
  gdk_set_show_events(static_cast<int>(show_events));
}

bool Event::get_show_events()
{
  return gdk_get_show_events();
}

void Event::set_device(const Glib::RefPtr<Device>& device)
{
  gdk_event_set_device(gobj(), Glib::unwrap(device));
}

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

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

void Event::set_source_device(const Glib::RefPtr<Device>& device)
{
  gdk_event_set_source_device(gobj(), Glib::unwrap(device));
}

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

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

void Event::set_display(const Glib::RefPtr<Display>& display)
{
  gdk_event_set_display(gobj(), Glib::unwrap(display));
}

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

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

Glib::RefPtr<Seat> Event::get_seat()
{
  auto retvalue = Glib::wrap(gdk_event_get_seat(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Seat> Event::get_seat() const
{
  return const_cast<Event*>(this)->get_seat();
}


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

Glib::PropertyProxy_ReadOnly< Type > Event::property_event_type() const
{
  return Glib::PropertyProxy_ReadOnly< Type >(this, "event-type");
}


} // namespace Gdk


