since: 2.10

Declaration [src]

gtk_text_buffer_deserialize_set_can_create_tags (
  GtkTextBuffer* buffer,
  GdkAtom format,
  gboolean can_create_tags

Description [src]

Use this function to allow a rich text deserialization function to create new tags in the receiving buffer. Note that using this function is almost always a bad idea, because the rich text functions you register should know how to map the rich text format they handler to your text buffers set of tags.

The ability of creating new (arbitrary!) tags in the receiving buffer is meant for special rich text formats like the internal one that is registered using gtk_text_buffer_register_deserialize_tagset(), because that format is essentially a dump of the internal structure of the source buffer, including its tag names.

You should allow creation of tags only if you know what you are doing, e.g. if you defined a tagset name for your application suite’s text buffers and you know that it’s fine to receive new tags from these buffers, because you know that your application can handle the newly created tags.

Available since: 2.10



Type: GdkAtom

A GdkAtom representing a registered rich text format.


Type: gboolean

Whether deserializing this format may create tags.