### Method

# Gtk TextBuffer create_tag

#### Declaration [src]

    GtkTextTag*
    gtk_text_buffer_create_tag (
      GtkTextBuffer* buffer,
      const char* tag_name,
      const char* first_property_name,
      ...
    )

#### Description [src]

Creates a tag and adds it to the tag table for `buffer`.

Equivalent to calling gtk_text_tag_new() and then adding the tag to the buffer’s tag table. The returned tag is owned by the buffer’s tag table, so the ref count will be equal to one.

If `tag_name` is `NULL`, the tag is anonymous.

If `tag_name` is non-`NULL`, a tag called `tag_name` must not already exist in the tag table for this buffer.

The `first_property_name` argument and subsequent arguments are a list of properties to set on the tag, as with g_object_set().

#### Parameters

`tag_name` | `const char*`
| Name of the new tag.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The string is a NUL terminated UTF-8 string.
`first_property_name` | `const char*`
| Name of first property to set.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The string is a NUL terminated UTF-8 string.
`...` | ``
| `NULL`-terminated list of property names and values.

#### Return value

Returns: | `GtkTextTag`
| A new tag.
| The data is owned by the instance.