mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
gtk/gtkcelllayout.c: Use G_DEFINE_INTERFACE macro
This commit is contained in:
parent
208e548ab1
commit
24fedeccac
@ -25,34 +25,13 @@
|
||||
#include "gtkintl.h"
|
||||
|
||||
|
||||
GType
|
||||
gtk_cell_layout_get_type (void)
|
||||
typedef GtkCellLayoutIface GtkCellLayoutInterface;
|
||||
G_DEFINE_INTERFACE (GtkCellLayout, gtk_cell_layout, G_TYPE_OBJECT);
|
||||
|
||||
|
||||
static void
|
||||
gtk_cell_layout_default_init (GtkCellLayoutInterface *iface)
|
||||
{
|
||||
static GType cell_layout_type = 0;
|
||||
|
||||
if (! cell_layout_type)
|
||||
{
|
||||
const GTypeInfo cell_layout_info =
|
||||
{
|
||||
sizeof (GtkCellLayoutIface),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
cell_layout_type =
|
||||
g_type_register_static (G_TYPE_INTERFACE, I_("GtkCellLayout"),
|
||||
&cell_layout_info, 0);
|
||||
|
||||
g_type_interface_add_prerequisite (cell_layout_type, G_TYPE_OBJECT);
|
||||
}
|
||||
|
||||
return cell_layout_type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user