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


#include <glibmm.h>

#include <gtkmm/mediacontrols.h>
#include <gtkmm/private/mediacontrols_p.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/>.
 */

#include <gtk/gtk.h>


namespace
{
} // anonymous namespace


namespace Glib
{

Gtk::MediaControls* wrap(GtkMediaControls* object, bool take_copy)
{
  return dynamic_cast<Gtk::MediaControls *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& MediaControls_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_ = &MediaControls_Class::class_init_function;

    // Do not derive a GType, or use a derived class:
    gtype_ = gtk_media_controls_get_type();

  }

  return *this;
}


void MediaControls_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* MediaControls_Class::wrap_new(GObject* o)
{
  return manage(new MediaControls((GtkMediaControls*)(o)));

}


/* The implementation: */

MediaControls::MediaControls(const Glib::ConstructParams& construct_params)
:
  Gtk::Widget(construct_params)
{
  }

MediaControls::MediaControls(GtkMediaControls* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


MediaControls::MediaControls(MediaControls&& src) noexcept
: Gtk::Widget(std::move(src))
{}

MediaControls& MediaControls::operator=(MediaControls&& src) noexcept
{
  Gtk::Widget::operator=(std::move(src));
  return *this;
}

MediaControls::~MediaControls() noexcept
{
  destroy_();
}

MediaControls::CppClassType MediaControls::mediacontrols_class_; // initialize static member

GType MediaControls::get_type()
{
  return mediacontrols_class_.init().get_type();
}


GType MediaControls::get_base_type()
{
  return gtk_media_controls_get_type();
}


MediaControls::MediaControls()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(mediacontrols_class_.init()))
{
  

}

MediaControls::MediaControls(const Glib::RefPtr<MediaStream>& media_stream)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(mediacontrols_class_.init(), "media_stream", Glib::unwrap(media_stream), nullptr))
{
  

}

Glib::RefPtr<MediaStream> MediaControls::get_media_stream()
{
  auto retvalue = Glib::wrap(gtk_media_controls_get_media_stream(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const MediaStream> MediaControls::get_media_stream() const
{
  return const_cast<MediaControls*>(this)->get_media_stream();
}

void MediaControls::set_media_stream(const Glib::RefPtr<MediaStream>& stream)
{
  gtk_media_controls_set_media_stream(gobj(), Glib::unwrap(stream));
}


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

Glib::PropertyProxy< Glib::RefPtr<MediaStream> > MediaControls::property_media_stream() 
{
  return Glib::PropertyProxy< Glib::RefPtr<MediaStream> >(this, "media-stream");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<MediaStream> > MediaControls::property_media_stream() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<MediaStream> >(this, "media-stream");
}


} // namespace Gtk


