Commit 1b77e36a authored by Javier Jardón's avatar Javier Jardón

gtk/gtksizerequest.c: Use G_DEFINE_INTERFACE macro

parent 523ea1c6
......@@ -121,26 +121,19 @@ typedef struct {
static GQuark quark_cache = 0;
gtk_size_request_get_type (void)
static GType size_request_type = 0;
if (G_UNLIKELY(!size_request_type))
size_request_type =
g_type_register_static_simple (G_TYPE_INTERFACE, I_("GtkSizeRequest"),
sizeof (GtkSizeRequestIface),
NULL, 0, NULL, 0);
g_type_interface_add_prerequisite (size_request_type, GTK_TYPE_WIDGET);
typedef GtkSizeRequestIface GtkSizeRequestInterface;
quark_cache = g_quark_from_static_string ("gtk-size-request-cache"));
quark_cache = g_quark_from_static_string ("gtk-size-request-cache");
return size_request_type;
static void
gtk_size_request_default_init (GtkSizeRequestInterface *iface)
/* looks for a cached size request for this for_size. If not
* found, returns the oldest entry so it can be overwritten
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment