Loading...
Searching...
No Matches
MyPaintBrushInputInfo Struct Reference

Holds information about a single MyPaintBrushInput. More...

`#include <mypaint-brush-settings.h>`

## Public Member Functions

const MyPaintBrushInputInfo * | mypaint_brush_input_info (MyPaintBrushInput id)
| Get a pointer to the constant info struct for the given input id.
const gchar * | mypaint_brush_input_info_get_name (const MyPaintBrushInputInfo *self)
| Get the translated display name for the given input.
const gchar * | mypaint_brush_input_info_get_tooltip (const MyPaintBrushInputInfo *self)
| Get the translated display name for the given input.
MyPaintBrushInput | mypaint_brush_input_from_cname (const char *cname)
| Get the MyPaintBrushInput id matching the given canonical name.

## Data Fields

const gchar * | cname
| Canonical name - uniquely identifies the input.
float | hard_min
| Hard lower limit of the input's range.
float | soft_min
| Default lower limit of the input's range.
float | normal
| Expected normal value for the input - only used as a reference when creating mappings.
float | soft_max
| Default upper limit of the input's range.
float | hard_max
| Hard upper limit of the input's range.
const gchar * | name
| Display name - descriptive name of the input.
const gchar * | tooltip
| Tooltip - brief description of the input.

## Detailed Description

Holds information about a single MyPaintBrushInput.

Like MyPaintBrushSettingInfo, these structs hold information about canonical names, display names and tooltips. The remaining data should be used to limit how the inputs are mapped to settings.

The min and max values in MyPaintBrushSettingInfo define limits on the range that an input should be mapped to for a setting. The hard/soft_min/max values in this struct define limits on the input range for mappings from an input.

## Member Function Documentation

## mypaint_brush_input_from_cname()

MyPaintBrushInput mypaint_brush_input_from_cname | ( | const char * | cname | ) |

Get the MyPaintBrushInput id matching the given canonical name.

If the given input is not a canonical name of an input, -1 is returned.

Parameters

  cname | the canonical name for the input id to retrieve

Returns
  The id whose corresponding MyPaintBrushInputInfo::cname matches cname, or -1 if cname is not a valid canonical name.

## mypaint_brush_input_info()

const MyPaintBrushInputInfo * mypaint_brush_input_info | ( | MyPaintBrushInput | id | ) |

Get a pointer to the constant info struct for the given input id.

Parameters

  id | The MyPaintBrushInput whose information will be returned.

## mypaint_brush_input_info_get_name()

const gchar * mypaint_brush_input_info_get_name | ( | const MyPaintBrushInputInfo * | self | ) |

Get the translated display name for the given input.

Parameters

  self | pointer to the input info struct whose translated name will be returned.

Returns
  the translated display name, or the original display name if no translation exists for the active locale.

## mypaint_brush_input_info_get_tooltip()

const gchar * mypaint_brush_input_info_get_tooltip | ( | const MyPaintBrushInputInfo * | self | ) |

Get the translated display name for the given input.

Parameters

  self | pointer to the input info struct whose translated name will be returned.

Returns
  the translated tooltip, or the original tooltip if no translation exists for the active locale.

## Field Documentation

## cname

const gchar* MyPaintBrushInputInfo::cname

Canonical name - uniquely identifies the input.

## hard_max

float MyPaintBrushInputInfo::hard_max

Hard upper limit of the input's range.

A value of FLT_MAX should be interpreted as "undefined", and a constant maximum should be used instead (MyPaint uses 20).

## hard_min

float MyPaintBrushInputInfo::hard_min

Hard lower limit of the input's range.

A value of -FLT_MAX should be interpreted as "undefined", and a constant minimum should be used instead (MyPaint uses -20).

## name

const gchar* MyPaintBrushInputInfo::name

Display name - descriptive name of the input.

See also
  mypaint_brush_input_info_get_name

## normal

float MyPaintBrushInputInfo::normal

Expected normal value for the input - only used as a reference when creating mappings.

## soft_max

float MyPaintBrushInputInfo::soft_max

Default upper limit of the input's range.

## soft_min

float MyPaintBrushInputInfo::soft_min

Default lower limit of the input's range.

## tooltip

const gchar* MyPaintBrushInputInfo::tooltip

Tooltip - brief description of the input.

See also
  mypaint_brush_input_info_get_tooltip

The documentation for this struct was generated from the following file:

- mypaint-brush-settings.h