### Constructor

# Gimp Unit new

#### Declaration [src]

    GimpUnit
    gimp_unit_new (
      gchar* identifier,
      gdouble factor,
      gint digits,
      gchar* symbol,
      gchar* abbreviation,
      gchar* singular,
      gchar* plural
    )

#### Description [src]

Returns the integer ID of the new `GimpUnit`.

Note that a new unit is always created with its deletion flag set to `TRUE`. You will have to set it to `FALSE` with `gimp_unit_set_deletion_flag()` to make the unit definition persistent.

#### Parameters

`identifier` | `gchar*`
| The unit’s identifier string.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`factor` | `gdouble`
| The unit’s factor (how many units are in one inch).
`digits` | `gint`
| The unit’s suggested number of digits (see gimp_unit_get_digits()).
`symbol` | `gchar*`
| The symbol of the unit (e.g. “”” for inch).
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`abbreviation` | `gchar*`
| The abbreviation of the unit.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`singular` | `gchar*`
| The singular form of the unit.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`plural` | `gchar*`
| The plural form of the unit.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `GimpUnit`
| The ID of the new unit.