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


#include <glibmm.h>

#include <gtkmm/expression.h>
#include <gtkmm/private/expression_p.h>


/* Copyright (C) 2020 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/>.
 */

#include <gtkmm/expression.h>


namespace Gtk
{

namespace Expression_Private
{
  
void watch_callback(gpointer data)
{
  auto slot = static_cast<sigc::slot<void()>*>(data);
  (*slot)();
}

void closure_callback_func()
{}

} // namespace Expression_Private

} // namespace Gtk

namespace
{
} // anonymous namespace


/* Why reinterpret_cast<ExpressionBase*>(gobject) is needed:
 *
 * A ExpressionBase instance is in fact always a GtkExpression instance.
 * Unfortunately, GtkExpression cannot be a member of ExpressionBase,
 * because it is an opaque struct.  Also, the C interface does not provide
 * any hooks to install a destroy notification handler, thus we cannot
 * wrap it dynamically either.
 *
 * The cast works because ExpressionBase does not have any member data, and
 * it is impossible to derive from it.  This is ensured by using final on the
 * class and by using = delete on the default constructor.
 */

namespace Glib
{

Glib::RefPtr<Gtk::ExpressionBase> wrap(GtkExpression* object, bool take_copy)
{
  if(take_copy && object)
    gtk_expression_ref(object);

  // See the comment at the top of this file, if you want to know why the cast works.
  return Glib::make_refptr_for_instance<Gtk::ExpressionBase>(reinterpret_cast<Gtk::ExpressionBase*>(object));
}

} // namespace Glib


namespace Gtk
{

void ExpressionBase::reference() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  gtk_expression_ref(reinterpret_cast<GtkExpression*>(const_cast<ExpressionBase*>(this)));
}

void ExpressionBase::unreference() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  gtk_expression_unref(reinterpret_cast<GtkExpression*>(const_cast<ExpressionBase*>(this)));
}

GtkExpression* ExpressionBase::gobj()
{
  // See the comment at the top of this file, if you want to know why the cast works.
  return reinterpret_cast<GtkExpression*>(this);
}

const GtkExpression* ExpressionBase::gobj() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  return reinterpret_cast<const GtkExpression*>(this);
}

GtkExpression* ExpressionBase::gobj_copy() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  const auto gobject = reinterpret_cast<GtkExpression*>(const_cast<ExpressionBase*>(this));
  gtk_expression_ref(gobject);
  return gobject;
}


GType ExpressionBase::get_value_type() const
{
  return gtk_expression_get_value_type(const_cast<GtkExpression*>(gobj()));
}

bool ExpressionBase::is_static() const
{
  return gtk_expression_is_static(const_cast<GtkExpression*>(gobj()));
}


} // namespace Gtk


