Constructor

GimpUnitnew

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

Type: 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

Type: gdouble

The unit’s factor (how many units are in one inch).

digits

Type: gint

The unit’s suggested number of digits (see gimp_unit_get_digits()).

symbol

Type: 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

Type: 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

Type: 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

Type: 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

Type: GimpUnit

The ID of the new unit.