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


#include <glibmm.h>

#include <gtkmm/printoperation.h>
#include <gtkmm/private/printoperation_p.h>


/* Copyright (C) 2006 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 <https://www.gnu.org/licenses/>.
 */

#include <gtk/gtk.h>

using Result = Gtk::PrintOperation::Result;

extern "C"
{
// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
static void
SignalProxy_PrintSetupDone_gtk_callback(GtkPageSetup* page_setup, gpointer data)
{
  const auto the_slot = static_cast<Gtk::SlotPrintSetupDone*>(data);

  try
  {
    auto ps = Glib::wrap(page_setup);
    (*the_slot)(ps);
  }
  catch (...)
  {
    Glib::exception_handlers_invoke();
  }

  delete the_slot;
}
} // extern "C"

namespace Gtk
{

PrintOperation::Result
PrintOperation::run(Action action)
{
  GError* gerror = nullptr;
  Result res =
    (Result)gtk_print_operation_run(this->gobj(), (GtkPrintOperationAction)action, nullptr, &gerror);

  if (res == PrintOperation::Result::ERROR)
  {
    gtk_print_operation_get_error(this->gobj(), &gerror);
    ::Glib::Error::throw_exception(gerror);
  }

  return res;
}

Glib::RefPtr<PageSetup>
run_page_setup_dialog(Window& parent,
                      const Glib::RefPtr<const PageSetup>& page_setup,
                      const Glib::RefPtr<const PrintSettings>& print_settings)
{
  // Specify the exact type with template specialization, to avoid possible
  // ambiguities between the const and non-const versions of unwrap() reported
  // by Sun's compiler (specifying unwrap<const Object> was reported
  // not to work):
  return Glib::wrap(
    gtk_print_run_page_setup_dialog(
      parent.gobj(),
      const_cast<GtkPageSetup*>(Glib::unwrap<PageSetup>(page_setup)),
      const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings))));

}

Glib::RefPtr<PageSetup>
run_page_setup_dialog(Window& parent,
                      const Glib::RefPtr<const PrintSettings>& print_settings)
{
  // Specify the exact type with template specialization, to avoid possible
  // ambiguities between the const and non-const versions of unwrap() reported
  // by Sun's compiler (specifying unwrap<const Object> was reported
  // not to work):
  return Glib::wrap(
    gtk_print_run_page_setup_dialog(
      parent.gobj(),
      nullptr,
      const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings))));

}

void
run_page_setup_dialog_async(Window& parent,
                            const Glib::RefPtr<const PageSetup>& page_setup,
                            const Glib::RefPtr<const PrintSettings>& print_settings,
                            const SlotPrintSetupDone& slot)
{
  auto slot_copy = new SlotPrintSetupDone(slot);

  // Specify the exact type with template specialization, to avoid possible
  // ambiguities between the const and non-const versions of unwrap() reported
  // by Sun's compiler (specifying unwrap<const Object> was reported
  // not to work):
  gtk_print_run_page_setup_dialog_async(
    parent.gobj(),
    const_cast<GtkPageSetup*>(Glib::unwrap<PageSetup>(page_setup)),
    const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings)),
    &SignalProxy_PrintSetupDone_gtk_callback,
    slot_copy);
}

void
run_page_setup_dialog_async(Window& parent,
                            const Glib::RefPtr<const PrintSettings>& print_settings,
                            const SlotPrintSetupDone& slot)
{
  auto slot_copy = new SlotPrintSetupDone(slot);

  // Specify the exact type with template specialization, to avoid possible
  // ambiguities between the const and non-const versions of unwrap() reported
  // by Sun's compiler (specifying unwrap<const Object> was reported
  // not to work):
  gtk_print_run_page_setup_dialog_async(
    parent.gobj(),
    nullptr,
    const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings)),
    &SignalProxy_PrintSetupDone_gtk_callback,
    slot_copy);
}

} // namespace Gtk

namespace
{


extern "C" {
static void PrintOperation_signal_done_connect_callback(GtkPrintOperation* self, GtkPrintOperationResult result,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(Result)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(static_cast<Result>(result)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_done_info =
{
  "done",
  (GCallback) &PrintOperation_signal_done_connect_callback,
  (GCallback) &PrintOperation_signal_done_connect_callback
};


using PrintOperation_signal_done_functype = void (*)(GtkPrintOperation* self, GtkPrintOperationResult result);
PrintOperation_signal_done_functype PrintOperation_signal_done_funcptr;
extern "C" {
static void PrintOperation_signal_done_default_callback(GtkPrintOperation* self, GtkPrintOperationResult result)
{
  PrintOperation_signal_done_funcptr( self, result);
}
} // extern "C"


extern "C" {
static void PrintOperation_signal_begin_print_connect_callback(GtkPrintOperation* self, GtkPrintContext* context,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<PrintContext>&)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(context, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_begin_print_info =
{
  "begin_print",
  (GCallback) &PrintOperation_signal_begin_print_connect_callback,
  (GCallback) &PrintOperation_signal_begin_print_connect_callback
};


using PrintOperation_signal_begin_print_functype = void (*)(GtkPrintOperation* self, GtkPrintContext* context);
PrintOperation_signal_begin_print_functype PrintOperation_signal_begin_print_funcptr;
extern "C" {
static void PrintOperation_signal_begin_print_default_callback(GtkPrintOperation* self, GtkPrintContext* context)
{
  PrintOperation_signal_begin_print_funcptr( self, context);
}
} // extern "C"


extern "C" {
static gboolean PrintOperation_signal_paginate_connect_callback(GtkPrintOperation* self, GtkPrintContext* context,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<bool(const Glib::RefPtr<PrintContext>&)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(context, true)
));
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }

  using RType = gboolean;
  return RType();
}

static gboolean PrintOperation_signal_paginate_notify_callback(GtkPrintOperation* self, GtkPrintContext* context, void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<PrintContext>&)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(context, true)
);
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
  }

  using RType = gboolean;
  return RType();
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_paginate_info =
{
  "paginate",
  (GCallback) &PrintOperation_signal_paginate_connect_callback,
  (GCallback) &PrintOperation_signal_paginate_notify_callback
};


using PrintOperation_signal_paginate_functype = gboolean (*)(GtkPrintOperation* self, GtkPrintContext* context);
PrintOperation_signal_paginate_functype PrintOperation_signal_paginate_funcptr;
extern "C" {
static gboolean PrintOperation_signal_paginate_default_callback(GtkPrintOperation* self, GtkPrintContext* context)
{
  return PrintOperation_signal_paginate_funcptr( self, context);
}
} // extern "C"


extern "C" {
static void PrintOperation_signal_request_page_setup_connect_callback(GtkPrintOperation* self, GtkPrintContext* context,gint page_nr,GtkPageSetup* setup,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<PrintContext>&, int, const Glib::RefPtr<PageSetup>&)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(context, true)
, page_nr
, Glib::wrap(setup, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_request_page_setup_info =
{
  "request_page_setup",
  (GCallback) &PrintOperation_signal_request_page_setup_connect_callback,
  (GCallback) &PrintOperation_signal_request_page_setup_connect_callback
};


using PrintOperation_signal_request_page_setup_functype = void (*)(GtkPrintOperation* self, GtkPrintContext* context, gint page_nr, GtkPageSetup* setup);
PrintOperation_signal_request_page_setup_functype PrintOperation_signal_request_page_setup_funcptr;
extern "C" {
static void PrintOperation_signal_request_page_setup_default_callback(GtkPrintOperation* self, GtkPrintContext* context, gint page_nr, GtkPageSetup* setup)
{
  PrintOperation_signal_request_page_setup_funcptr( self, context, page_nr, setup);
}
} // extern "C"


extern "C" {
static void PrintOperation_signal_draw_page_connect_callback(GtkPrintOperation* self, GtkPrintContext* context,gint page_nr,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<PrintContext>&, int)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(context, true)
, page_nr
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_draw_page_info =
{
  "draw_page",
  (GCallback) &PrintOperation_signal_draw_page_connect_callback,
  (GCallback) &PrintOperation_signal_draw_page_connect_callback
};


using PrintOperation_signal_draw_page_functype = void (*)(GtkPrintOperation* self, GtkPrintContext* context, gint page_nr);
PrintOperation_signal_draw_page_functype PrintOperation_signal_draw_page_funcptr;
extern "C" {
static void PrintOperation_signal_draw_page_default_callback(GtkPrintOperation* self, GtkPrintContext* context, gint page_nr)
{
  PrintOperation_signal_draw_page_funcptr( self, context, page_nr);
}
} // extern "C"


extern "C" {
static void PrintOperation_signal_end_print_connect_callback(GtkPrintOperation* self, GtkPrintContext* context,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<PrintContext>&)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(context, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_end_print_info =
{
  "end_print",
  (GCallback) &PrintOperation_signal_end_print_connect_callback,
  (GCallback) &PrintOperation_signal_end_print_connect_callback
};


using PrintOperation_signal_end_print_functype = void (*)(GtkPrintOperation* self, GtkPrintContext* context);
PrintOperation_signal_end_print_functype PrintOperation_signal_end_print_funcptr;
extern "C" {
static void PrintOperation_signal_end_print_default_callback(GtkPrintOperation* self, GtkPrintContext* context)
{
  PrintOperation_signal_end_print_funcptr( self, context);
}
} // extern "C"


static const Glib::SignalProxyInfo PrintOperation_signal_status_changed_info =
{
  "status_changed",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


using PrintOperation_signal_status_changed_functype = void (*)(GtkPrintOperation* self);
PrintOperation_signal_status_changed_functype PrintOperation_signal_status_changed_funcptr;
extern "C" {
static void PrintOperation_signal_status_changed_default_callback(GtkPrintOperation* self)
{
  PrintOperation_signal_status_changed_funcptr( self);
}
} // extern "C"


extern "C" {
static GtkWidget* PrintOperation_signal_create_custom_widget_connect_callback(GtkPrintOperation* self, void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<Widget*()>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        return (GtkWidget*)Glib::unwrap((*static_cast<SlotType*>(slot))());
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }

  using RType = GtkWidget*;
  return RType();
}

static GtkWidget* PrintOperation_signal_create_custom_widget_notify_callback(GtkPrintOperation* self,  void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void()>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))();
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
  }

  using RType = GtkWidget*;
  return RType();
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_create_custom_widget_info =
{
  "create_custom_widget",
  (GCallback) &PrintOperation_signal_create_custom_widget_connect_callback,
  (GCallback) &PrintOperation_signal_create_custom_widget_notify_callback
};


using PrintOperation_signal_create_custom_widget_functype = GtkWidget* (*)(GtkPrintOperation* self);
PrintOperation_signal_create_custom_widget_functype PrintOperation_signal_create_custom_widget_funcptr;
extern "C" {
static GtkWidget* PrintOperation_signal_create_custom_widget_default_callback(GtkPrintOperation* self)
{
  return PrintOperation_signal_create_custom_widget_funcptr( self);
}
} // extern "C"


extern "C" {
static void PrintOperation_signal_custom_widget_apply_connect_callback(GtkPrintOperation* self, GtkWidget* widget,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(Widget*)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(widget)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_custom_widget_apply_info =
{
  "custom_widget_apply",
  (GCallback) &PrintOperation_signal_custom_widget_apply_connect_callback,
  (GCallback) &PrintOperation_signal_custom_widget_apply_connect_callback
};


using PrintOperation_signal_custom_widget_apply_functype = void (*)(GtkPrintOperation* self, GtkWidget* widget);
PrintOperation_signal_custom_widget_apply_functype PrintOperation_signal_custom_widget_apply_funcptr;
extern "C" {
static void PrintOperation_signal_custom_widget_apply_default_callback(GtkPrintOperation* self, GtkWidget* widget)
{
  PrintOperation_signal_custom_widget_apply_funcptr( self, widget);
}
} // extern "C"


extern "C" {
static gboolean PrintOperation_signal_preview_connect_callback(GtkPrintOperation* self, GtkPrintOperationPreview* preview,GtkPrintContext* context,GtkWindow* parent,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<bool(const Glib::RefPtr<PrintOperationPreview>&, const Glib::RefPtr<PrintContext>&, Window*)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(preview, true)
, Glib::wrap(context, true)
, Glib::wrap(parent)
));
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }

  using RType = gboolean;
  return RType();
}

static gboolean PrintOperation_signal_preview_notify_callback(GtkPrintOperation* self, GtkPrintOperationPreview* preview,GtkPrintContext* context,GtkWindow* parent, void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(const Glib::RefPtr<PrintOperationPreview>&, const Glib::RefPtr<PrintContext>&, Window*)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(preview, true)
, Glib::wrap(context, true)
, Glib::wrap(parent)
);
    }
    catch(...)
    {
      Glib::exception_handlers_invoke();
    }
  }

  using RType = gboolean;
  return RType();
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_preview_info =
{
  "preview",
  (GCallback) &PrintOperation_signal_preview_connect_callback,
  (GCallback) &PrintOperation_signal_preview_notify_callback
};


using PrintOperation_signal_preview_functype = gboolean (*)(GtkPrintOperation* self, GtkPrintOperationPreview* preview, GtkPrintContext* context, GtkWindow* parent);
PrintOperation_signal_preview_functype PrintOperation_signal_preview_funcptr;
extern "C" {
static gboolean PrintOperation_signal_preview_default_callback(GtkPrintOperation* self, GtkPrintOperationPreview* preview, GtkPrintContext* context, GtkWindow* parent)
{
  return PrintOperation_signal_preview_funcptr( self, preview, context, parent);
}
} // extern "C"


extern "C" {
static void PrintOperation_signal_update_custom_widget_connect_callback(GtkPrintOperation* self, GtkWidget* widget,GtkPageSetup* setup,GtkPrintSettings* settings,void* data)
{
  using namespace Gtk;
  using SlotType = sigc::slot<void(Widget*, const Glib::RefPtr<PageSetup>&, const Glib::RefPtr<PrintSettings>&)>;

  auto obj = dynamic_cast<PrintOperation*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::wrap(widget)
, Glib::wrap(setup, true)
, Glib::wrap(settings, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}
} // extern "C"

static const Glib::SignalProxyInfo PrintOperation_signal_update_custom_widget_info =
{
  "update_custom_widget",
  (GCallback) &PrintOperation_signal_update_custom_widget_connect_callback,
  (GCallback) &PrintOperation_signal_update_custom_widget_connect_callback
};


using PrintOperation_signal_update_custom_widget_functype = void (*)(GtkPrintOperation* self, GtkWidget* widget, GtkPageSetup* setup, GtkPrintSettings* settings);
PrintOperation_signal_update_custom_widget_functype PrintOperation_signal_update_custom_widget_funcptr;
extern "C" {
static void PrintOperation_signal_update_custom_widget_default_callback(GtkPrintOperation* self, GtkWidget* widget, GtkPageSetup* setup, GtkPrintSettings* settings)
{
  PrintOperation_signal_update_custom_widget_funcptr( self, widget, setup, settings);
}
} // extern "C"
} // anonymous namespace

// static
GType Glib::Value<Gtk::PrintStatus>::value_type()
{
  return gtk_print_status_get_type();
}


Gtk::PrintError::PrintError(Gtk::PrintError::Code error_code, const Glib::ustring& error_message)
:
  Glib::Error (GTK_PRINT_ERROR, error_code, error_message)
{}

Gtk::PrintError::PrintError(GError* gobject)
:
  Glib::Error (gobject)
{}

Gtk::PrintError::Code Gtk::PrintError::code() const
{
  return static_cast<Code>(Glib::Error::code());
}

void Gtk::PrintError::throw_func(GError* gobject)
{
  throw Gtk::PrintError(gobject);
}

// static
GType Glib::Value<Gtk::PrintError::Code>::value_type()
{
  return gtk_print_error_get_type();
}

// static
GType Glib::Value<Gtk::PrintOperation::Result>::value_type()
{
  return gtk_print_operation_result_get_type();
}

// static
GType Glib::Value<Gtk::PrintOperation::Action>::value_type()
{
  return gtk_print_operation_action_get_type();
}


namespace Glib
{

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

} /* namespace Glib */


namespace Gtk
{


/* The *_Class implementation: */

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

    // Add derived versions of interfaces, if the C type implements any interfaces:
  PrintOperationPreview::add_interface(get_type());

  }

  return *this;
}


void PrintOperation_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);


  klass->done = &PrintOperation_signal_done_default_callback;
  PrintOperation_signal_done_funcptr = &done_callback;
  klass->begin_print = &PrintOperation_signal_begin_print_default_callback;
  PrintOperation_signal_begin_print_funcptr = &begin_print_callback;
  klass->paginate = &PrintOperation_signal_paginate_default_callback;
  PrintOperation_signal_paginate_funcptr = &paginate_callback;
  klass->request_page_setup = &PrintOperation_signal_request_page_setup_default_callback;
  PrintOperation_signal_request_page_setup_funcptr = &request_page_setup_callback;
  klass->draw_page = &PrintOperation_signal_draw_page_default_callback;
  PrintOperation_signal_draw_page_funcptr = &draw_page_callback;
  klass->end_print = &PrintOperation_signal_end_print_default_callback;
  PrintOperation_signal_end_print_funcptr = &end_print_callback;
  klass->status_changed = &PrintOperation_signal_status_changed_default_callback;
  PrintOperation_signal_status_changed_funcptr = &status_changed_callback;
  klass->create_custom_widget = &PrintOperation_signal_create_custom_widget_default_callback;
  PrintOperation_signal_create_custom_widget_funcptr = &create_custom_widget_callback;
  klass->custom_widget_apply = &PrintOperation_signal_custom_widget_apply_default_callback;
  PrintOperation_signal_custom_widget_apply_funcptr = &custom_widget_apply_callback;
  klass->preview = &PrintOperation_signal_preview_default_callback;
  PrintOperation_signal_preview_funcptr = &preview_callback;
  klass->update_custom_widget = &PrintOperation_signal_update_custom_widget_default_callback;
  PrintOperation_signal_update_custom_widget_funcptr = &update_custom_widget_callback;
}


void PrintOperation_Class::done_callback(GtkPrintOperation* self, GtkPrintOperationResult result)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_done(static_cast<Result>(result)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->done)
    (*base->done)(self, result);
}
void PrintOperation_Class::begin_print_callback(GtkPrintOperation* self, GtkPrintContext* context)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_begin_print(Glib::wrap(context, true)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->begin_print)
    (*base->begin_print)(self, context);
}
gboolean PrintOperation_Class::paginate_callback(GtkPrintOperation* self, GtkPrintContext* context)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return static_cast<int>(obj->on_paginate(Glib::wrap(context, true)
));
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->paginate)
    return (*base->paginate)(self, context);

  using RType = gboolean;
  return RType();
}
void PrintOperation_Class::request_page_setup_callback(GtkPrintOperation* self, GtkPrintContext* context, gint page_nr, GtkPageSetup* setup)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_request_page_setup(Glib::wrap(context, true)
, page_nr
, Glib::wrap(setup, true)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->request_page_setup)
    (*base->request_page_setup)(self, context, page_nr, setup);
}
void PrintOperation_Class::draw_page_callback(GtkPrintOperation* self, GtkPrintContext* context, gint page_nr)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_draw_page(Glib::wrap(context, true)
, page_nr
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->draw_page)
    (*base->draw_page)(self, context, page_nr);
}
void PrintOperation_Class::end_print_callback(GtkPrintOperation* self, GtkPrintContext* context)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_end_print(Glib::wrap(context, true)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->end_print)
    (*base->end_print)(self, context);
}
void PrintOperation_Class::status_changed_callback(GtkPrintOperation* self)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_status_changed();
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->status_changed)
    (*base->status_changed)(self);
}
GtkWidget* PrintOperation_Class::create_custom_widget_callback(GtkPrintOperation* self)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return (GtkWidget*)Glib::unwrap(obj->on_create_custom_widget());
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->create_custom_widget)
    return (*base->create_custom_widget)(self);

  using RType = GtkWidget*;
  return RType();
}
void PrintOperation_Class::custom_widget_apply_callback(GtkPrintOperation* self, GtkWidget* widget)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_custom_widget_apply(Glib::wrap(widget)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->custom_widget_apply)
    (*base->custom_widget_apply)(self, widget);
}
gboolean PrintOperation_Class::preview_callback(GtkPrintOperation* self, GtkPrintOperationPreview* preview, GtkPrintContext* context, GtkWindow* parent)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return static_cast<int>(obj->on_preview(Glib::wrap(preview, true)
, Glib::wrap(context, true)
, Glib::wrap(parent)
));
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->preview)
    return (*base->preview)(self, preview, context, parent);

  using RType = gboolean;
  return RType();
}
void PrintOperation_Class::update_custom_widget_callback(GtkPrintOperation* self, GtkWidget* widget, GtkPageSetup* setup, GtkPrintSettings* settings)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_update_custom_widget(Glib::wrap(widget)
, Glib::wrap(setup, true)
, Glib::wrap(settings, true)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
    );

  // Call the original underlying C function:
  if(base && base->update_custom_widget)
    (*base->update_custom_widget)(self, widget, setup, settings);
}


Glib::ObjectBase* PrintOperation_Class::wrap_new(GObject* object)
{
  return new PrintOperation((GtkPrintOperation*)object);
}


/* The implementation: */

GtkPrintOperation* PrintOperation::gobj_copy()
{
  reference();
  return gobj();
}

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

}

PrintOperation::PrintOperation(GtkPrintOperation* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


PrintOperation::PrintOperation(PrintOperation&& src) noexcept
: Glib::Object(std::move(src))
  , PrintOperationPreview(std::move(src))
{}

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


PrintOperation::~PrintOperation() noexcept
{}


PrintOperation::CppClassType PrintOperation::printoperation_class_; // initialize static member

GType PrintOperation::get_type()
{
  return printoperation_class_.init().get_type();
}


GType PrintOperation::get_base_type()
{
  return gtk_print_operation_get_type();
}


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

}

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

void PrintOperation::set_default_page_setup(const Glib::RefPtr<PageSetup>& default_page_setup)
{
  gtk_print_operation_set_default_page_setup(gobj(), Glib::unwrap(default_page_setup));
}

Glib::RefPtr<PageSetup> PrintOperation::get_default_page_setup()
{
  auto retvalue = Glib::wrap(gtk_print_operation_get_default_page_setup(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const PageSetup> PrintOperation::get_default_page_setup() const
{
  return const_cast<PrintOperation*>(this)->get_default_page_setup();
}

void PrintOperation::set_print_settings(const Glib::RefPtr<PrintSettings>& print_settings)
{
  gtk_print_operation_set_print_settings(gobj(), Glib::unwrap(print_settings));
}

Glib::RefPtr<PrintSettings> PrintOperation::get_print_settings()
{
  auto retvalue = Glib::wrap(gtk_print_operation_get_print_settings(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const PrintSettings> PrintOperation::get_print_settings() const
{
  return const_cast<PrintOperation*>(this)->get_print_settings();
}

void PrintOperation::set_job_name(const Glib::ustring& job_name)
{
  gtk_print_operation_set_job_name(gobj(), job_name.c_str());
}

void PrintOperation::set_n_pages(int n_pages)
{
  gtk_print_operation_set_n_pages(gobj(), n_pages);
}

void PrintOperation::set_current_page(int current_page)
{
  gtk_print_operation_set_current_page(gobj(), current_page);
}

void PrintOperation::set_use_full_page(bool use_full_page)
{
  gtk_print_operation_set_use_full_page(gobj(), static_cast<int>(use_full_page));
}

void PrintOperation::set_unit(Unit unit)
{
  gtk_print_operation_set_unit(gobj(), static_cast<GtkUnit>(unit));
}

void PrintOperation::set_export_filename(const std::string& filename)
{
  gtk_print_operation_set_export_filename(gobj(), filename.c_str());
}

void PrintOperation::set_track_print_status(bool track_status)
{
  gtk_print_operation_set_track_print_status(gobj(), static_cast<int>(track_status));
}

void PrintOperation::set_show_progress(bool show_progress)
{
  gtk_print_operation_set_show_progress(gobj(), static_cast<int>(show_progress));
}

void PrintOperation::set_allow_async(bool allow_async)
{
  gtk_print_operation_set_allow_async(gobj(), static_cast<int>(allow_async));
}

void PrintOperation::set_custom_tab_label(const Glib::ustring& label)
{
  gtk_print_operation_set_custom_tab_label(gobj(), label.c_str());
}

Result PrintOperation::run(Action action, Window& parent)
{
  GError* gerror = nullptr;
  auto retvalue = static_cast<Result>(gtk_print_operation_run(gobj(), static_cast<GtkPrintOperationAction>(action), (parent).gobj(), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

PrintStatus PrintOperation::get_status() const
{
  return static_cast<PrintStatus>(gtk_print_operation_get_status(const_cast<GtkPrintOperation*>(gobj())));
}

Glib::ustring PrintOperation::get_status_string() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_print_operation_get_status_string(const_cast<GtkPrintOperation*>(gobj())));
}

void PrintOperation::cancel()
{
  gtk_print_operation_cancel(gobj());
}

bool PrintOperation::is_finished() const
{
  return gtk_print_operation_is_finished(const_cast<GtkPrintOperation*>(gobj()));
}

void PrintOperation::draw_page_finish()
{
  gtk_print_operation_draw_page_finish(gobj());
}

void PrintOperation::set_defer_drawing()
{
  gtk_print_operation_set_defer_drawing(gobj());
}

void PrintOperation::set_support_selection(bool support_selection)
{
  gtk_print_operation_set_support_selection(gobj(), static_cast<int>(support_selection));
}

bool PrintOperation::get_support_selection() const
{
  return gtk_print_operation_get_support_selection(const_cast<GtkPrintOperation*>(gobj()));
}

void PrintOperation::set_has_selection(bool has_selection)
{
  gtk_print_operation_set_has_selection(gobj(), static_cast<int>(has_selection));
}

bool PrintOperation::get_has_selection() const
{
  return gtk_print_operation_get_has_selection(const_cast<GtkPrintOperation*>(gobj()));
}

void PrintOperation::set_embed_page_setup(bool embed)
{
  gtk_print_operation_set_embed_page_setup(gobj(), static_cast<int>(embed));
}

bool PrintOperation::get_embed_page_setup() const
{
  return gtk_print_operation_get_embed_page_setup(const_cast<GtkPrintOperation*>(gobj()));
}

int PrintOperation::get_n_pages_to_print() const
{
  return gtk_print_operation_get_n_pages_to_print(const_cast<GtkPrintOperation*>(gobj()));
}


Glib::SignalProxy<void(Result)> PrintOperation::signal_done()
{
  return Glib::SignalProxy<void(Result) >(this, &PrintOperation_signal_done_info);
}


Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&)> PrintOperation::signal_begin_print()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&) >(this, &PrintOperation_signal_begin_print_info);
}


Glib::SignalProxy<bool(const Glib::RefPtr<PrintContext>&)> PrintOperation::signal_paginate()
{
  return Glib::SignalProxy<bool(const Glib::RefPtr<PrintContext>&) >(this, &PrintOperation_signal_paginate_info);
}


Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&, int, const Glib::RefPtr<PageSetup>&)> PrintOperation::signal_request_page_setup()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&, int, const Glib::RefPtr<PageSetup>&) >(this, &PrintOperation_signal_request_page_setup_info);
}


Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&, int)> PrintOperation::signal_draw_page()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&, int) >(this, &PrintOperation_signal_draw_page_info);
}


Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&)> PrintOperation::signal_end_print()
{
  return Glib::SignalProxy<void(const Glib::RefPtr<PrintContext>&) >(this, &PrintOperation_signal_end_print_info);
}


Glib::SignalProxy<void()> PrintOperation::signal_status_changed()
{
  return Glib::SignalProxy<void() >(this, &PrintOperation_signal_status_changed_info);
}


Glib::SignalProxy<Widget*()> PrintOperation::signal_create_custom_widget()
{
  return Glib::SignalProxy<Widget*() >(this, &PrintOperation_signal_create_custom_widget_info);
}


Glib::SignalProxy<void(Widget*)> PrintOperation::signal_custom_widget_apply()
{
  return Glib::SignalProxy<void(Widget*) >(this, &PrintOperation_signal_custom_widget_apply_info);
}


Glib::SignalProxy<bool(const Glib::RefPtr<PrintOperationPreview>&, const Glib::RefPtr<PrintContext>&, Window*)> PrintOperation::signal_preview()
{
  return Glib::SignalProxy<bool(const Glib::RefPtr<PrintOperationPreview>&, const Glib::RefPtr<PrintContext>&, Window*) >(this, &PrintOperation_signal_preview_info);
}


Glib::SignalProxy<void(Widget*, const Glib::RefPtr<PageSetup>&, const Glib::RefPtr<PrintSettings>&)> PrintOperation::signal_update_custom_widget()
{
  return Glib::SignalProxy<void(Widget*, const Glib::RefPtr<PageSetup>&, const Glib::RefPtr<PrintSettings>&) >(this, &PrintOperation_signal_update_custom_widget_info);
}


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

Glib::PropertyProxy< Glib::RefPtr<PageSetup> > PrintOperation::property_default_page_setup() 
{
  return Glib::PropertyProxy< Glib::RefPtr<PageSetup> >(this, "default-page-setup");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PageSetup> > PrintOperation::property_default_page_setup() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PageSetup> >(this, "default-page-setup");
}

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

Glib::PropertyProxy< Glib::RefPtr<PrintSettings> > PrintOperation::property_print_settings() 
{
  return Glib::PropertyProxy< Glib::RefPtr<PrintSettings> >(this, "print-settings");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PrintSettings> > PrintOperation::property_print_settings() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<PrintSettings> >(this, "print-settings");
}

Glib::PropertyProxy< Glib::ustring > PrintOperation::property_job_name() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "job-name");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintOperation::property_job_name() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "job-name");
}

Glib::PropertyProxy< int > PrintOperation::property_n_pages() 
{
  return Glib::PropertyProxy< int >(this, "n-pages");
}

Glib::PropertyProxy_ReadOnly< int > PrintOperation::property_n_pages() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "n-pages");
}

Glib::PropertyProxy< int > PrintOperation::property_current_page() 
{
  return Glib::PropertyProxy< int >(this, "current-page");
}

Glib::PropertyProxy_ReadOnly< int > PrintOperation::property_current_page() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "current-page");
}

Glib::PropertyProxy< bool > PrintOperation::property_use_full_page() 
{
  return Glib::PropertyProxy< bool >(this, "use-full-page");
}

Glib::PropertyProxy_ReadOnly< bool > PrintOperation::property_use_full_page() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "use-full-page");
}

Glib::PropertyProxy< bool > PrintOperation::property_track_print_status() 
{
  return Glib::PropertyProxy< bool >(this, "track-print-status");
}

Glib::PropertyProxy_ReadOnly< bool > PrintOperation::property_track_print_status() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "track-print-status");
}

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

Glib::PropertyProxy< Unit > PrintOperation::property_unit() 
{
  return Glib::PropertyProxy< Unit >(this, "unit");
}

Glib::PropertyProxy_ReadOnly< Unit > PrintOperation::property_unit() const
{
  return Glib::PropertyProxy_ReadOnly< Unit >(this, "unit");
}

Glib::PropertyProxy< bool > PrintOperation::property_show_progress() 
{
  return Glib::PropertyProxy< bool >(this, "show-progress");
}

Glib::PropertyProxy_ReadOnly< bool > PrintOperation::property_show_progress() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "show-progress");
}

Glib::PropertyProxy< bool > PrintOperation::property_allow_async() 
{
  return Glib::PropertyProxy< bool >(this, "allow-async");
}

Glib::PropertyProxy_ReadOnly< bool > PrintOperation::property_allow_async() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "allow-async");
}

Glib::PropertyProxy< std::string > PrintOperation::property_export_filename() 
{
  return Glib::PropertyProxy< std::string >(this, "export-filename");
}

Glib::PropertyProxy_ReadOnly< std::string > PrintOperation::property_export_filename() const
{
  return Glib::PropertyProxy_ReadOnly< std::string >(this, "export-filename");
}

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

Glib::PropertyProxy_ReadOnly< PrintStatus > PrintOperation::property_status() const
{
  return Glib::PropertyProxy_ReadOnly< PrintStatus >(this, "status");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintOperation::property_status_string() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "status-string");
}

Glib::PropertyProxy< Glib::ustring > PrintOperation::property_custom_tab_label() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "custom-tab-label");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PrintOperation::property_custom_tab_label() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "custom-tab-label");
}

Glib::PropertyProxy< bool > PrintOperation::property_support_selection() 
{
  return Glib::PropertyProxy< bool >(this, "support-selection");
}

Glib::PropertyProxy_ReadOnly< bool > PrintOperation::property_support_selection() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "support-selection");
}

Glib::PropertyProxy< bool > PrintOperation::property_has_selection() 
{
  return Glib::PropertyProxy< bool >(this, "has-selection");
}

Glib::PropertyProxy_ReadOnly< bool > PrintOperation::property_has_selection() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "has-selection");
}

Glib::PropertyProxy< bool > PrintOperation::property_embed_page_setup() 
{
  return Glib::PropertyProxy< bool >(this, "embed-page-setup");
}

Glib::PropertyProxy_ReadOnly< bool > PrintOperation::property_embed_page_setup() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "embed-page-setup");
}

Glib::PropertyProxy_ReadOnly< int > PrintOperation::property_n_pages_to_print() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "n-pages-to-print");
}


void Gtk::PrintOperation::on_done(Result result)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->done)
    (*base->done)(gobj(),static_cast<GtkPrintOperationResult>(result));
}
void Gtk::PrintOperation::on_begin_print(const Glib::RefPtr<PrintContext>& context)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->begin_print)
    (*base->begin_print)(gobj(),Glib::unwrap(context));
}
bool Gtk::PrintOperation::on_paginate(const Glib::RefPtr<PrintContext>& context)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->paginate)
    return (*base->paginate)(gobj(),Glib::unwrap(context));

  using RType = bool;
  return RType();
}
void Gtk::PrintOperation::on_request_page_setup(const Glib::RefPtr<PrintContext>& context, int page_no, const Glib::RefPtr<PageSetup>& setup)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->request_page_setup)
    (*base->request_page_setup)(gobj(),Glib::unwrap(context),page_no,Glib::unwrap(setup));
}
void Gtk::PrintOperation::on_draw_page(const Glib::RefPtr<PrintContext>& context, int page_nr)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->draw_page)
    (*base->draw_page)(gobj(),Glib::unwrap(context),page_nr);
}
void Gtk::PrintOperation::on_end_print(const Glib::RefPtr<PrintContext>& context)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->end_print)
    (*base->end_print)(gobj(),Glib::unwrap(context));
}
void Gtk::PrintOperation::on_status_changed()
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->status_changed)
    (*base->status_changed)(gobj());
}
Widget* Gtk::PrintOperation::on_create_custom_widget()
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->create_custom_widget)
    return Glib::wrap((*base->create_custom_widget)(gobj()));

  using RType = Widget*;
  return RType();
}
void Gtk::PrintOperation::on_custom_widget_apply(Widget* widget)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->custom_widget_apply)
    (*base->custom_widget_apply)(gobj(),(GtkWidget*)Glib::unwrap(widget));
}
bool Gtk::PrintOperation::on_preview(const Glib::RefPtr<PrintOperationPreview>& preview, const Glib::RefPtr<PrintContext>& context, Window* parent)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->preview)
    return (*base->preview)(gobj(),(Glib::unwrap(preview)),Glib::unwrap(context),Glib::unwrap(parent));

  using RType = bool;
  return RType();
}
void Gtk::PrintOperation::on_update_custom_widget(Widget* widget, const Glib::RefPtr<PageSetup>& setup, const Glib::RefPtr<PrintSettings>& settings)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->update_custom_widget)
    (*base->update_custom_widget)(gobj(),(GtkWidget*)Glib::unwrap(widget),Glib::unwrap(setup),Glib::unwrap(settings));
}


} // namespace Gtk


