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


#include <glibmm.h>

#include <gdkmm/frameclock.h>
#include <gdkmm/private/frameclock_p.h>

#include <gdk/gdk.h>

/* Copyright (C) 2018 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 <http://www.gnu.org/licenses/>.
 */


namespace
{


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


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


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


} // anonymous namespace

// static
GType Glib::Value<Gdk::FrameClock::Phase>::value_type()
{
  return gdk_frame_clock_phase_get_type();
}


namespace Glib
{

Glib::RefPtr<Gdk::FrameClock> wrap(GdkFrameClock* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gdk::FrameClock>( dynamic_cast<Gdk::FrameClock*> (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& FrameClock_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_ = &FrameClock_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_frame_clock_get_type());

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

  }

  return *this;
}


void FrameClock_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* FrameClock_Class::wrap_new(GObject* object)
{
  return new FrameClock((GdkFrameClock*)object);
}


/* The implementation: */

GdkFrameClock* FrameClock::gobj_copy()
{
  reference();
  return gobj();
}

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

}

FrameClock::FrameClock(GdkFrameClock* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


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

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


FrameClock::~FrameClock() noexcept
{}


FrameClock::CppClassType FrameClock::frameclock_class_; // initialize static member

GType FrameClock::get_type()
{
  return frameclock_class_.init().get_type();
}


GType FrameClock::get_base_type()
{
  return gdk_frame_clock_get_type();
}


gint64 FrameClock::get_frame_time() const
{
  return gdk_frame_clock_get_frame_time(const_cast<GdkFrameClock*>(gobj()));
}

void FrameClock::request_phase(Phase phase)
{
  gdk_frame_clock_request_phase(gobj(), static_cast<GdkFrameClockPhase>(phase));
}

void FrameClock::begin_updating()
{
  gdk_frame_clock_begin_updating(gobj());
}

void FrameClock::end_updating()
{
  gdk_frame_clock_end_updating(gobj());
}

gint64 FrameClock::get_frame_counter() const
{
  return gdk_frame_clock_get_frame_counter(const_cast<GdkFrameClock*>(gobj()));
}

gint64 FrameClock::get_history_start() const
{
  return gdk_frame_clock_get_history_start(const_cast<GdkFrameClock*>(gobj()));
}

Glib::RefPtr<FrameTimings> FrameClock::get_timings(gint64 frame_counter)
{
  auto retvalue = Glib::wrap(gdk_frame_clock_get_timings(gobj(), frame_counter));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const FrameTimings> FrameClock::get_timings(gint64 frame_counter) const
{
  return const_cast<FrameClock*>(this)->get_timings(frame_counter);
}

Glib::RefPtr<FrameTimings> FrameClock::get_current_timings()
{
  auto retvalue = Glib::wrap(gdk_frame_clock_get_current_timings(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const FrameTimings> FrameClock::get_current_timings() const
{
  return const_cast<FrameClock*>(this)->get_current_timings();
}

void FrameClock::get_refresh_info(gint64 base_time, gint64& refresh_interval_return, gint64& presentation_time_return) const
{
  gdk_frame_clock_get_refresh_info(const_cast<GdkFrameClock*>(gobj()), base_time, &(refresh_interval_return), &(presentation_time_return));
}

double FrameClock::get_fps() const
{
  return gdk_frame_clock_get_fps(const_cast<GdkFrameClock*>(gobj()));
}


Glib::SignalProxy<void()> FrameClock::signal_update()
{
  return Glib::SignalProxy<void() >(this, &FrameClock_signal_update_info);
}


Glib::SignalProxy<void()> FrameClock::signal_layout()
{
  return Glib::SignalProxy<void() >(this, &FrameClock_signal_layout_info);
}


Glib::SignalProxy<void()> FrameClock::signal_paint()
{
  return Glib::SignalProxy<void() >(this, &FrameClock_signal_paint_info);
}


} // namespace Gdk


