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


#include <glibmm.h>

#include <gdkmm/dmabuftexturebuilder.h>
#include <gdkmm/private/dmabuftexturebuilder_p.h>


/* Copyright (C) 2023 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 <gdkmm/cairoutils.h>
#include <gdkmm/value_cairo.h>
#include <gdkmm/colorstate.h>
#include <gdkmm/display.h>
#include <gdkmm/texture.h>
#include <gdk/gdk.h>

namespace
{
extern "C"
{
static void DmabufTextureBuilder_destroy_callback(void* data)
{
  auto the_slot = static_cast<Gdk::DmabufTextureBuilder::SlotDmabufTextureReleased*>(data);
  try
  {
    (*the_slot)();
  }
  catch (...)
  {
    Glib::exception_handlers_invoke();
  }
  delete the_slot;
}
} // extern "C"
} // anonymous namespace

namespace Gdk
{
Glib::RefPtr<Texture> DmabufTextureBuilder::build(const SlotDmabufTextureReleased& slot)
{
  // Create a copy of the slot.
  auto slot_copy = new SlotDmabufTextureReleased(slot); 

  GError* gerror = nullptr;
  auto retvalue = Glib::wrap(gdk_dmabuf_texture_builder_build(gobj(),
    &DmabufTextureBuilder_destroy_callback, slot_copy, &gerror));
  if (gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}
} // namespace Gdk

namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gdk::DmabufTextureBuilder> wrap(GdkDmabufTextureBuilder* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gdk::DmabufTextureBuilder>( dynamic_cast<Gdk::DmabufTextureBuilder*> (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& DmabufTextureBuilder_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Do not derive a GType, or use a derived class:
    gtype_ = gdk_dmabuf_texture_builder_get_type();

  }

  return *this;
}


Glib::ObjectBase* DmabufTextureBuilder_Class::wrap_new(GObject* object)
{
  return new DmabufTextureBuilder((GdkDmabufTextureBuilder*)object);
}


/* The implementation: */

GdkDmabufTextureBuilder* DmabufTextureBuilder::gobj_copy()
{
  reference();
  return gobj();
}

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

}

DmabufTextureBuilder::DmabufTextureBuilder(GdkDmabufTextureBuilder* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


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

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


DmabufTextureBuilder::~DmabufTextureBuilder() noexcept
{}


DmabufTextureBuilder::CppClassType DmabufTextureBuilder::dmabuftexturebuilder_class_; // initialize static member

GType DmabufTextureBuilder::get_type()
{
  return dmabuftexturebuilder_class_.init().get_type();
}


GType DmabufTextureBuilder::get_base_type()
{
  return gdk_dmabuf_texture_builder_get_type();
}


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

}

Glib::RefPtr<DmabufTextureBuilder> DmabufTextureBuilder::create()
{
  return Glib::make_refptr_for_instance<DmabufTextureBuilder>( new DmabufTextureBuilder() );
}

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

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

void DmabufTextureBuilder::set_display(const Glib::RefPtr<Display>& display)
{
  gdk_dmabuf_texture_builder_set_display(gobj(), Glib::unwrap(display));
}

unsigned int DmabufTextureBuilder::get_width() const
{
  return gdk_dmabuf_texture_builder_get_width(const_cast<GdkDmabufTextureBuilder*>(gobj()));
}

void DmabufTextureBuilder::set_width(unsigned int width)
{
  gdk_dmabuf_texture_builder_set_width(gobj(), width);
}

unsigned int DmabufTextureBuilder::get_height() const
{
  return gdk_dmabuf_texture_builder_get_height(const_cast<GdkDmabufTextureBuilder*>(gobj()));
}

void DmabufTextureBuilder::set_height(unsigned int height)
{
  gdk_dmabuf_texture_builder_set_height(gobj(), height);
}

guint32 DmabufTextureBuilder::get_fourcc() const
{
  return gdk_dmabuf_texture_builder_get_fourcc(const_cast<GdkDmabufTextureBuilder*>(gobj()));
}

void DmabufTextureBuilder::set_fourcc(guint32 fourcc)
{
  gdk_dmabuf_texture_builder_set_fourcc(gobj(), fourcc);
}

guint64 DmabufTextureBuilder::get_modifier() const
{
  return gdk_dmabuf_texture_builder_get_modifier(const_cast<GdkDmabufTextureBuilder*>(gobj()));
}

void DmabufTextureBuilder::set_modifier(guint64 modifier)
{
  gdk_dmabuf_texture_builder_set_modifier(gobj(), modifier);
}

bool DmabufTextureBuilder::get_premultiplied() const
{
  return gdk_dmabuf_texture_builder_get_premultiplied(const_cast<GdkDmabufTextureBuilder*>(gobj()));
}

void DmabufTextureBuilder::set_premultiplied(bool premultiplied)
{
  gdk_dmabuf_texture_builder_set_premultiplied(gobj(), static_cast<int>(premultiplied));
}

unsigned int DmabufTextureBuilder::get_n_planes() const
{
  return gdk_dmabuf_texture_builder_get_n_planes(const_cast<GdkDmabufTextureBuilder*>(gobj()));
}

void DmabufTextureBuilder::set_n_planes(unsigned int n_planes)
{
  gdk_dmabuf_texture_builder_set_n_planes(gobj(), n_planes);
}

int DmabufTextureBuilder::get_fd(unsigned int plane) const
{
  return gdk_dmabuf_texture_builder_get_fd(const_cast<GdkDmabufTextureBuilder*>(gobj()), plane);
}

void DmabufTextureBuilder::set_fd(unsigned int plane, int fd)
{
  gdk_dmabuf_texture_builder_set_fd(gobj(), plane, fd);
}

unsigned int DmabufTextureBuilder::get_stride(unsigned int plane) const
{
  return gdk_dmabuf_texture_builder_get_stride(const_cast<GdkDmabufTextureBuilder*>(gobj()), plane);
}

void DmabufTextureBuilder::set_stride(unsigned int plane, unsigned int stride)
{
  gdk_dmabuf_texture_builder_set_stride(gobj(), plane, stride);
}

unsigned int DmabufTextureBuilder::get_offset(unsigned int plane) const
{
  return gdk_dmabuf_texture_builder_get_offset(const_cast<GdkDmabufTextureBuilder*>(gobj()), plane);
}

void DmabufTextureBuilder::set_offset(unsigned int plane, unsigned int offset)
{
  gdk_dmabuf_texture_builder_set_offset(gobj(), plane, offset);
}

Glib::RefPtr<ColorState> DmabufTextureBuilder::get_color_state() const
{
  auto retvalue = Glib::wrap(gdk_dmabuf_texture_builder_get_color_state(const_cast<GdkDmabufTextureBuilder*>(gobj())));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

void DmabufTextureBuilder::set_color_state(const Glib::RefPtr<const ColorState>& color_state)
{
  gdk_dmabuf_texture_builder_set_color_state(gobj(), const_cast<GdkColorState*>(Glib::unwrap(color_state)));
}

Glib::RefPtr<Texture> DmabufTextureBuilder::get_update_texture()
{
  auto retvalue = Glib::wrap(gdk_dmabuf_texture_builder_get_update_texture(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Texture> DmabufTextureBuilder::get_update_texture() const
{
  return const_cast<DmabufTextureBuilder*>(this)->get_update_texture();
}

void DmabufTextureBuilder::set_update_texture(const Glib::RefPtr<Texture>& texture)
{
  gdk_dmabuf_texture_builder_set_update_texture(gobj(), Glib::unwrap(texture));
}

::Cairo::RefPtr< ::Cairo::Region> DmabufTextureBuilder::get_update_region()
{
  auto retvalue = Gdk::Cairo::wrap(gdk_dmabuf_texture_builder_get_update_region(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

::Cairo::RefPtr<const ::Cairo::Region> DmabufTextureBuilder::get_update_region() const
{
  return const_cast<DmabufTextureBuilder*>(this)->get_update_region();
}

void DmabufTextureBuilder::set_update_region(const ::Cairo::RefPtr< ::Cairo::Region>& region)
{
  gdk_dmabuf_texture_builder_set_update_region(gobj(), ((region) ? (region)->cobj() : nullptr));
}


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

Glib::PropertyProxy< Glib::RefPtr<Display> > DmabufTextureBuilder::property_display() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Display> >(this, "display");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > DmabufTextureBuilder::property_display() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> >(this, "display");
}

Glib::PropertyProxy< unsigned int > DmabufTextureBuilder::property_width() 
{
  return Glib::PropertyProxy< unsigned int >(this, "width");
}

Glib::PropertyProxy_ReadOnly< unsigned int > DmabufTextureBuilder::property_width() const
{
  return Glib::PropertyProxy_ReadOnly< unsigned int >(this, "width");
}

Glib::PropertyProxy< unsigned int > DmabufTextureBuilder::property_height() 
{
  return Glib::PropertyProxy< unsigned int >(this, "height");
}

Glib::PropertyProxy_ReadOnly< unsigned int > DmabufTextureBuilder::property_height() const
{
  return Glib::PropertyProxy_ReadOnly< unsigned int >(this, "height");
}

Glib::PropertyProxy< unsigned int > DmabufTextureBuilder::property_fourcc() 
{
  return Glib::PropertyProxy< unsigned int >(this, "fourcc");
}

Glib::PropertyProxy_ReadOnly< unsigned int > DmabufTextureBuilder::property_fourcc() const
{
  return Glib::PropertyProxy_ReadOnly< unsigned int >(this, "fourcc");
}

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

Glib::PropertyProxy< guint64 > DmabufTextureBuilder::property_modifier() 
{
  return Glib::PropertyProxy< guint64 >(this, "modifier");
}

Glib::PropertyProxy_ReadOnly< guint64 > DmabufTextureBuilder::property_modifier() const
{
  return Glib::PropertyProxy_ReadOnly< guint64 >(this, "modifier");
}

Glib::PropertyProxy< bool > DmabufTextureBuilder::property_premultiplied() 
{
  return Glib::PropertyProxy< bool >(this, "premultiplied");
}

Glib::PropertyProxy_ReadOnly< bool > DmabufTextureBuilder::property_premultiplied() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "premultiplied");
}

Glib::PropertyProxy< unsigned int > DmabufTextureBuilder::property_n_planes() 
{
  return Glib::PropertyProxy< unsigned int >(this, "n-planes");
}

Glib::PropertyProxy_ReadOnly< unsigned int > DmabufTextureBuilder::property_n_planes() const
{
  return Glib::PropertyProxy_ReadOnly< unsigned int >(this, "n-planes");
}

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

Glib::PropertyProxy< Glib::RefPtr<ColorState> > DmabufTextureBuilder::property_color_state() 
{
  return Glib::PropertyProxy< Glib::RefPtr<ColorState> >(this, "color-state");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ColorState> > DmabufTextureBuilder::property_color_state() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ColorState> >(this, "color-state");
}

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

Glib::PropertyProxy< ::Cairo::RefPtr< ::Cairo::Region> > DmabufTextureBuilder::property_update_region() 
{
  return Glib::PropertyProxy< ::Cairo::RefPtr< ::Cairo::Region> >(this, "update-region");
}

Glib::PropertyProxy_ReadOnly< ::Cairo::RefPtr< ::Cairo::Region> > DmabufTextureBuilder::property_update_region() const
{
  return Glib::PropertyProxy_ReadOnly< ::Cairo::RefPtr< ::Cairo::Region> >(this, "update-region");
}

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

Glib::PropertyProxy< Glib::RefPtr<Texture> > DmabufTextureBuilder::property_update_texture() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Texture> >(this, "update-texture");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Texture> > DmabufTextureBuilder::property_update_texture() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Texture> >(this, "update-texture");
}


} // namespace Gdk


