#import <ObjFW/OFBlock.h>
#include <gtk/gtk.h>

#import "JubGtkHelper.h"

/* References for static linking */
void _references_to_categories_of_OFObject(void)
{
	_OFObject_JubGlibThread_reference = 1;
}

static gboolean call_block(gpointer data)
{
	void (^block)(void) = data;
	block();
	[block release];

	return FALSE;
}

void g_idle_add_block(void (^block)(void))
{
	g_idle_add(call_block, [block copy]);
}
