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


#include <glibmm.h>

#include <gdkmm/gltexturebuilder.h>
#include <gdkmm/private/gltexturebuilder_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/glcontext.h>
#include <gdkmm/texture.h>
#include <gdk/gdk.h>

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

namespace
{
} // anonymous namespace


namespace Glib
{

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

  }

  return *this;
}


Glib::ObjectBase* GLTextureBuilder_Class::wrap_new(GObject* object)
{
  return new GLTextureBuilder((GdkGLTextureBuilder*)object);
}


/* The implementation: */

GdkGLTextureBuilder* GLTextureBuilder::gobj_copy()
{
  reference();
  return gobj();
}

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

}

GLTextureBuilder::GLTextureBuilder(GdkGLTextureBuilder* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


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

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


GLTextureBuilder::~GLTextureBuilder() noexcept
{}


GLTextureBuilder::CppClassType GLTextureBuilder::gltexturebuilder_class_; // initialize static member

GType GLTextureBuilder::get_type()
{
  return gltexturebuilder_class_.init().get_type();
}


GType GLTextureBuilder::get_base_type()
{
  return gdk_gl_texture_builder_get_type();
}


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

}

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

Glib::RefPtr<GLContext> GLTextureBuilder::get_context()
{
  auto retvalue = Glib::wrap(gdk_gl_texture_builder_get_context(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const GLContext> GLTextureBuilder::get_context() const
{
  return const_cast<GLTextureBuilder*>(this)->get_context();
}

void GLTextureBuilder::set_context(const Glib::RefPtr<GLContext>& context)
{
  gdk_gl_texture_builder_set_context(gobj(), Glib::unwrap(context));
}

guint GLTextureBuilder::get_id() const
{
  return gdk_gl_texture_builder_get_id(const_cast<GdkGLTextureBuilder*>(gobj()));
}

void GLTextureBuilder::set_id(guint id)
{
  gdk_gl_texture_builder_set_id(gobj(), id);
}

int GLTextureBuilder::get_width() const
{
  return gdk_gl_texture_builder_get_width(const_cast<GdkGLTextureBuilder*>(gobj()));
}

void GLTextureBuilder::set_width(int width)
{
  gdk_gl_texture_builder_set_width(gobj(), width);
}

int GLTextureBuilder::get_height() const
{
  return gdk_gl_texture_builder_get_height(const_cast<GdkGLTextureBuilder*>(gobj()));
}

void GLTextureBuilder::set_height(int height)
{
  gdk_gl_texture_builder_set_height(gobj(), height);
}

MemoryFormat GLTextureBuilder::get_format() const
{
  return static_cast<MemoryFormat>(gdk_gl_texture_builder_get_format(const_cast<GdkGLTextureBuilder*>(gobj())));
}

void GLTextureBuilder::set_format(MemoryFormat format)
{
  gdk_gl_texture_builder_set_format(gobj(), static_cast<GdkMemoryFormat>(format));
}

bool GLTextureBuilder::get_has_mipmap() const
{
  return gdk_gl_texture_builder_get_has_mipmap(const_cast<GdkGLTextureBuilder*>(gobj()));
}

void GLTextureBuilder::set_has_mipmap(bool has_mipmap)
{
  gdk_gl_texture_builder_set_has_mipmap(gobj(), static_cast<int>(has_mipmap));
}

void* GLTextureBuilder::get_sync() const
{
  return gdk_gl_texture_builder_get_sync(const_cast<GdkGLTextureBuilder*>(gobj()));
}

void GLTextureBuilder::set_sync(void* sync)
{
  gdk_gl_texture_builder_set_sync(gobj(), sync);
}

Glib::RefPtr<Texture> GLTextureBuilder::get_update_texture()
{
  auto retvalue = Glib::wrap(gdk_gl_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> GLTextureBuilder::get_update_texture() const
{
  return const_cast<GLTextureBuilder*>(this)->get_update_texture();
}

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

::Cairo::RefPtr< ::Cairo::Region> GLTextureBuilder::get_update_region()
{
  auto retvalue = Gdk::Cairo::wrap(gdk_gl_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> GLTextureBuilder::get_update_region() const
{
  return const_cast<GLTextureBuilder*>(this)->get_update_region();
}

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

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

  return Glib::wrap(gdk_gl_texture_builder_build(gobj(), &GLTextureBuilder_destroy_callback, slot_copy));
}


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

Glib::PropertyProxy< Glib::RefPtr<GLContext> > GLTextureBuilder::property_context() 
{
  return Glib::PropertyProxy< Glib::RefPtr<GLContext> >(this, "context");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<GLContext> > GLTextureBuilder::property_context() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<GLContext> >(this, "context");
}

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

Glib::PropertyProxy< MemoryFormat > GLTextureBuilder::property_format() 
{
  return Glib::PropertyProxy< MemoryFormat >(this, "format");
}

Glib::PropertyProxy_ReadOnly< MemoryFormat > GLTextureBuilder::property_format() const
{
  return Glib::PropertyProxy_ReadOnly< MemoryFormat >(this, "format");
}

Glib::PropertyProxy< bool > GLTextureBuilder::property_has_mipmap() 
{
  return Glib::PropertyProxy< bool >(this, "has-mipmap");
}

Glib::PropertyProxy_ReadOnly< bool > GLTextureBuilder::property_has_mipmap() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "has-mipmap");
}

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

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

Glib::PropertyProxy< guint > GLTextureBuilder::property_id() 
{
  return Glib::PropertyProxy< guint >(this, "id");
}

Glib::PropertyProxy_ReadOnly< guint > GLTextureBuilder::property_id() const
{
  return Glib::PropertyProxy_ReadOnly< guint >(this, "id");
}

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> > GLTextureBuilder::property_update_region() 
{
  return Glib::PropertyProxy< ::Cairo::RefPtr< ::Cairo::Region> >(this, "update-region");
}

Glib::PropertyProxy_ReadOnly< ::Cairo::RefPtr< ::Cairo::Region> > GLTextureBuilder::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> > GLTextureBuilder::property_update_texture() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Texture> >(this, "update-texture");
}

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

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

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


} // namespace Gdk


