// Generated by gtkmmproc -- DO NOT MODIFY!


#include <cluttermm/backend.h>
#include <cluttermm/private/backend_p.h>

/* Copyright (C) 2009 The cluttermm 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <clutter/clutter.h>

namespace Clutter
{

} //namespace Clutter


namespace
{


static const Glib::SignalProxyInfo Backend_signal_font_changed_info =
{
  "font-changed",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


static const Glib::SignalProxyInfo Backend_signal_resolution_changed_info =
{
  "resolution-changed",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */


namespace Clutter
{


/* The *_Class implementation: */

const Glib::Class& Backend_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_ = &Backend_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(clutter_backend_get_type());

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

  }

  return *this;
}


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


}


Glib::ObjectBase* Backend_Class::wrap_new(GObject* object)
{
  return new Backend((ClutterBackend*)object);
}


/* The implementation: */

ClutterBackend* Backend::gobj_copy()
{
  reference();
  return gobj();
}

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

}

Backend::Backend(ClutterBackend* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


Backend::~Backend()
{}


Backend::CppClassType Backend::backend_class_; // initialize static member

GType Backend::get_type()
{
  return backend_class_.init().get_type();
}


GType Backend::get_base_type()
{
  return clutter_backend_get_type();
}


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

}

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

  Glib::RefPtr<Backend> retvalue = Glib::wrap(clutter_get_default_backend());

  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}


double Backend::get_resolution() const
{
  return clutter_backend_get_resolution(const_cast<ClutterBackend*>(gobj()));
}

void Backend::set_resolution(double dpi)
{
clutter_backend_set_resolution(gobj(), dpi); 
}

guint Backend::get_double_click_time() const
{
  return clutter_backend_get_double_click_time(const_cast<ClutterBackend*>(gobj()));
}

void Backend::set_double_click_time(guint msec)
{
clutter_backend_set_double_click_time(gobj(), msec); 
}

guint Backend::get_double_click_distance() const
{
  return clutter_backend_get_double_click_distance(const_cast<ClutterBackend*>(gobj()));
}

void Backend::set_double_click_distance(guint distance)
{
clutter_backend_set_double_click_distance(gobj(), distance); 
}

::Cairo::FontOptions Backend::get_font_options() const
{
  return ::Cairo::FontOptions(const_cast<cairo_font_options_t*>(clutter_backend_get_font_options(const_cast<ClutterBackend*>(gobj()))), true);
}

void Backend::set_font_options(const ::Cairo::FontOptions& options)
{
clutter_backend_set_font_options(gobj(), (options).cobj()); 
}

Glib::ustring Backend::get_font_name() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(clutter_backend_get_font_name(const_cast<ClutterBackend*>(gobj())));
}

void Backend::set_font_name(const Glib::ustring& font_name)
{
clutter_backend_set_font_name(gobj(), font_name.c_str()); 
}


Glib::SignalProxy0< void > Backend::signal_font_changed()
{
  return Glib::SignalProxy0< void >(this, &Backend_signal_font_changed_info);
}


Glib::SignalProxy0< void > Backend::signal_resolution_changed()
{
  return Glib::SignalProxy0< void >(this, &Backend_signal_resolution_changed_info);
}


} // namespace Clutter


