
/* Compile:
 cc -g -Wall -o 01-texttag `pkg-config --cflags --libs gtk+-2.0` 01-texttag.c
 */

#include <gtk/gtkmain.h>
#include <gtk/gtktextbuffer.h>
#include <gtk/gtktexttag.h>

int main(int argc, char **argv)
{
	GtkTextBuffer *buf;
	GtkTextTag *tag1, *tag2;
	GType type;

	gtk_init(&argc, &argv);

	buf = gtk_text_buffer_new(NULL);
	tag1 = gtk_text_buffer_create_tag(buf, "foo", NULL);
	printf("Tag 1: %p\n", tag1);

	tag2 = gtk_text_buffer_create_tag(buf, "foo", NULL);
	printf("Tag 2: %p\n", tag2);

	type = G_TYPE_FROM_INSTANCE(tag2);

	return 0;
}

