gtk/gtkcellsizerequest.c: Use G_DEFINE_INTERFACE macro

This commit is contained in:
Javier Jardón 2010-08-25 21:58:50 +02:00
parent 24fedeccac
commit c0b8104232

View File

@ -29,23 +29,17 @@
#define DEBUG_CELL_SIZE_REQUEST 0
GType
gtk_cell_size_request_get_type (void)
typedef GtkCellSizeRequestIface GtkCellSizeRequestInterface;
G_DEFINE_INTERFACE (GtkCellSizeRequest, gtk_cell_size_request, GTK_TYPE_CELL_RENDERER);
static void
gtk_cell_size_request_default_init (GtkCellSizeRequestInterface *iface)
{
static GType cell_size_request_type = 0;
if (G_UNLIKELY(!cell_size_request_type))
{
cell_size_request_type =
g_type_register_static_simple (G_TYPE_INTERFACE, I_("GtkCellSizeRequest"),
sizeof (GtkCellSizeRequestIface),
NULL, 0, NULL, 0);
g_type_interface_add_prerequisite (cell_size_request_type, GTK_TYPE_CELL_RENDERER);
}
return cell_size_request_type;
}
/**
* gtk_cell_size_request_get_request_mode:
* @cell: a #GtkCellSizeRequest instance