gtk/gtktoolshell.c: Use G_DEFINE_INTERFACE macro
This commit is contained in:
parent
c0b8104232
commit
523ea1c656
@ -43,22 +43,17 @@
|
||||
* Dummy structure for accessing instances of #GtkToolShellIface.
|
||||
*/
|
||||
|
||||
GType
|
||||
gtk_tool_shell_get_type (void)
|
||||
|
||||
typedef GtkToolShellIface GtkToolShellInterface;
|
||||
G_DEFINE_INTERFACE (GtkToolShell, gtk_tool_shell, GTK_TYPE_WIDGET);
|
||||
|
||||
|
||||
static void
|
||||
gtk_tool_shell_default_init (GtkToolShellInterface *iface)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
type = g_type_register_static_simple (G_TYPE_INTERFACE, I_("GtkToolShell"),
|
||||
sizeof (GtkToolShellIface),
|
||||
NULL, 0, NULL, 0);
|
||||
g_type_interface_add_prerequisite (type, GTK_TYPE_WIDGET);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gtk_tool_shell_get_icon_size:
|
||||
* @shell: a #GtkToolShell
|
||||
|
Loading…
Reference in New Issue
Block a user