/* 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 .
*/
#include
static gint SignalProxy_SlotForwardPage_gtk_callback(gint current_page, gpointer data)
{
auto the_slot = static_cast(data);
try
{
return (*the_slot)(current_page);
}
catch(...)
{
Glib::exception_handlers_invoke();
return gint();
}
}
static void SignalProxy_SlotForwardPage_gtk_callback_destroy(void* data)
{
delete static_cast(data);
}
namespace Gtk
{
void Assistant::set_forward_page_func(const SlotForwardPage& slot)
{
// Create a copy of the slot object. A pointer to this will be passed
// through the callback's data parameter. It will be deleted
// when SignalProxy_SlotForwardPage_gtk_callback_destroy() is called.
auto slot_copy = new SlotForwardPage(slot);
gtk_assistant_set_forward_page_func(gobj(),
&SignalProxy_SlotForwardPage_gtk_callback, slot_copy,
&SignalProxy_SlotForwardPage_gtk_callback_destroy);
}
} // namespace Gtk