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


#include <glibmm.h>

#include <gdkmm/display.h>
#include <gdkmm/private/display_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 <vector>

#include <giomm/listmodel.h>
#include <gdkmm/applaunchcontext.h>
#include <gdkmm/clipboard.h>
#include <gdkmm/glcontext.h>
#include <gdkmm/seat.h>
#include <gdkmm/monitor.h>
#include <gdkmm/surface.h>
#include <gdk/gdk.h>

namespace Gdk
{
} //namespace Gdk

namespace
{


extern "C" {
static void Display_signal_closed_connect_callback(GdkDisplay* self, gboolean p0,void* data)
{
  using namespace Gdk;
  using SlotType = sigc::slot<void(bool)>;

  auto obj = dynamic_cast<Display*>(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))(p0
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo Display_signal_closed_info =
{
  "closed",
  (GCallback) &Display_signal_closed_connect_callback,
  (GCallback) &Display_signal_closed_connect_callback
};


static const Glib::SignalProxyInfo Display_signal_opened_info =
{
  "opened",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


extern "C" {
static void Display_signal_seat_added_connect_callback(GdkDisplay* self, GdkSeat* p0,void* data)
{
  using namespace Gdk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<Seat>&)>;

  auto obj = dynamic_cast<Display*>(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))(Glib::wrap(p0, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo Display_signal_seat_added_info =
{
  "seat-added",
  (GCallback) &Display_signal_seat_added_connect_callback,
  (GCallback) &Display_signal_seat_added_connect_callback
};


extern "C" {
static void Display_signal_seat_removed_connect_callback(GdkDisplay* self, GdkSeat* p0,void* data)
{
  using namespace Gdk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<Seat>&)>;

  auto obj = dynamic_cast<Display*>(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))(Glib::wrap(p0, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo Display_signal_seat_removed_info =
{
  "seat-removed",
  (GCallback) &Display_signal_seat_removed_connect_callback,
  (GCallback) &Display_signal_seat_removed_connect_callback
};


extern "C" {
static void Display_signal_setting_changed_connect_callback(GdkDisplay* self, const gchar* p0,void* data)
{
  using namespace Gdk;
  using SlotType = sigc::slot<void(const Glib::ustring&)>;

  auto obj = dynamic_cast<Display*>(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))(Glib::convert_const_gchar_ptr_to_ustring(p0)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo Display_signal_setting_changed_info =
{
  "setting-changed",
  (GCallback) &Display_signal_setting_changed_connect_callback,
  (GCallback) &Display_signal_setting_changed_connect_callback
};


} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gdk::Display> wrap(GdkDisplay* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gdk::Display>( dynamic_cast<Gdk::Display*> (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& Display_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_ = &Display_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_display_get_type());

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

  }

  return *this;
}


void Display_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* Display_Class::wrap_new(GObject* object)
{
  return new Display((GdkDisplay*)object);
}


/* The implementation: */

GdkDisplay* Display::gobj_copy()
{
  reference();
  return gobj();
}

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

}

Display::Display(GdkDisplay* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


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

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


Display::~Display() noexcept
{}


Display::CppClassType Display::display_class_; // initialize static member

GType Display::get_type()
{
  return display_class_.init().get_type();
}


GType Display::get_base_type()
{
  return gdk_display_get_type();
}


Display::Display()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Glib::Object(Glib::ConstructParams(display_class_.init()))
{
  

}

Glib::RefPtr<Display> Display::open(const Glib::ustring& display_name)
{

  auto retvalue = Glib::wrap(gdk_display_open(display_name.c_str()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us
  return retvalue;
}

Glib::ustring Display::get_name() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gdk_display_get_name(const_cast<GdkDisplay*>(gobj())));
}

bool Display::device_is_grabbed(const Glib::RefPtr<const Gdk::Device>& device) const
{
  return gdk_display_device_is_grabbed(const_cast<GdkDisplay*>(gobj()), const_cast<GdkDevice*>(Glib::unwrap<Gdk::Device>(device)));
}

void Display::beep()
{
  gdk_display_beep(gobj());
}

void Display::sync()
{
  gdk_display_sync(gobj());
}

void Display::close()
{
  gdk_display_close(gobj());
}

bool Display::is_closed() const
{
  return gdk_display_is_closed(const_cast<GdkDisplay*>(gobj()));
}

bool Display::is_composited() const
{
  return gdk_display_is_composited(const_cast<GdkDisplay*>(gobj()));
}

bool Display::is_rgba() const
{
  return gdk_display_is_rgba(const_cast<GdkDisplay*>(gobj()));
}

#ifndef GDKMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Display::put_event(const Glib::RefPtr<const Event>& event)
{
  gdk_display_put_event(gobj(), const_cast<GdkEvent*>(Glib::unwrap(event)));
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GDKMM_DISABLE_DEPRECATED

Glib::RefPtr<Display> Display::get_default()
{

  auto retvalue = Glib::wrap(gdk_display_get_default());
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us
  return retvalue;
}

void Display::flush()
{
  gdk_display_flush(gobj());
}

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

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

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

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

bool Display::supports_input_shapes() const
{
  return gdk_display_supports_input_shapes(const_cast<GdkDisplay*>(gobj()));
}

void Display::prepare_gl()
{
  GError* gerror = nullptr;
  gdk_display_prepare_gl(gobj(), &(gerror));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
}

Glib::RefPtr<GLContext> Display::create_gl_context()
{
  GError* gerror = nullptr;
  auto retvalue = Glib::wrap(gdk_display_create_gl_context(gobj(), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

#ifndef GDKMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Display::notify_startup_complete(const Glib::ustring& startup_id)
{
  gdk_display_notify_startup_complete(gobj(), startup_id.c_str());
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GDKMM_DISABLE_DEPRECATED

#ifndef GDKMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
Glib::ustring Display::get_startup_notification_id() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gdk_display_get_startup_notification_id(const_cast<GdkDisplay*>(gobj())));
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GDKMM_DISABLE_DEPRECATED

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

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

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

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

std::vector<Glib::RefPtr<Seat>> Display::list_seats()
{
  return Glib::ListHandler<Glib::RefPtr<Seat>>::list_to_vector(gdk_display_list_seats(gobj()), Glib::OWNERSHIP_SHALLOW);
}

std::vector<Glib::RefPtr<const Seat>> Display::list_seats() const
{
  return Glib::ListHandler<Glib::RefPtr<const Seat>>::list_to_vector(gdk_display_list_seats(const_cast<GdkDisplay*>(gobj())), Glib::OWNERSHIP_SHALLOW);
}

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

Glib::RefPtr<const Gio::ListModel> Display::get_monitors() const
{
  return const_cast<Display*>(this)->get_monitors();
}

Glib::RefPtr<Monitor> Display::get_monitor_at_surface(const Glib::RefPtr<Surface>& surface)
{
  auto retvalue = Glib::wrap(gdk_display_get_monitor_at_surface(gobj(), Glib::unwrap(surface)));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Monitor> Display::get_monitor_at_surface(const Glib::RefPtr<Surface>& surface) const
{
  return const_cast<Display*>(this)->get_monitor_at_surface(surface);
}


Glib::SignalProxy<void(bool)> Display::signal_closed()
{
  return Glib::SignalProxy<void(bool) >(this, &Display_signal_closed_info);
}


Glib::SignalProxy<void()> Display::signal_opened()
{
  return Glib::SignalProxy<void() >(this, &Display_signal_opened_info);
}


Glib::SignalProxy<void(const Glib::RefPtr<Seat>&)> Display::signal_seat_added()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<Seat>&) >(this, &Display_signal_seat_added_info);
}


Glib::SignalProxy<void(const Glib::RefPtr<Seat>&)> Display::signal_seat_removed()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<Seat>&) >(this, &Display_signal_seat_removed_info);
}


Glib::SignalProxy<void(const Glib::ustring&)> Display::signal_setting_changed()
{
  return Glib::SignalProxy<void(const Glib::ustring&) >(this, &Display_signal_setting_changed_info);
}


Glib::PropertyProxy_ReadOnly< bool > Display::property_composited() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "composited");
}

Glib::PropertyProxy_ReadOnly< bool > Display::property_rgba() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "rgba");
}

Glib::PropertyProxy_ReadOnly< bool > Display::property_input_shapes() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "input-shapes");
}


} // namespace Gdk


