IpatchRange

IpatchRange — A boxed type which defines a number range

Stability Level

Stable, unless otherwise indicated

Functions

Object Hierarchy

    GBoxed
    ╰── IpatchRange
    GParam
    ╰── IpatchParamSpecRange

Description

Boxed type used for GValue and GParamSpec properties. Consists of a low and a high integer value defining a range.

Functions

IPATCH_RANGE_SET_VALUES()

#define             IPATCH_RANGE_SET_VALUES(range, val1, val2)

IPATCH_RANGE_SET_NULL()

#define             IPATCH_RANGE_SET_NULL(range)

ipatch_range_new ()

IpatchRange *
ipatch_range_new (int low,
                  int high);

Create a new value range structure (to store an integer range).

Parameters

low

Low value to initialize range to

 

high

High value to initialize range to

 

Returns

Newly allocated integer range structure.


ipatch_range_copy ()

IpatchRange *
ipatch_range_copy (IpatchRange *range);

Duplicates an integer range structure.

Parameters

range

Range structure to duplicate

 

Returns

New duplicate range structure.


ipatch_range_free ()

void
ipatch_range_free (IpatchRange *range);

Free a range structure previously allocated with ipatch_range_new().

Parameters

range

Integer range structure to free

 

ipatch_value_set_range ()

void
ipatch_value_set_range (GValue *value,
                        const IpatchRange *range);

Set the range values of a IPATCH_TYPE_RANGE GValue. The range structure is copied.

Parameters

value

a valid GValue of IPATCH_TYPE_RANGE boxed type

 

range

Range structure to assign to value

 

ipatch_value_set_static_range ()

void
ipatch_value_set_static_range (GValue *value,
                               IpatchRange *range);

Set the range values of a IPATCH_TYPE_RANGE GValue. This function uses range directly and so it should be static, use ipatch_value_set_range() if the range value should be duplicated.

[skip]

Parameters

value

A valid GValue of IPATCH_TYPE_RANGE boxed type

 

range

Range structure to assign to value .

[transfer full]

ipatch_value_get_range ()

IpatchRange *
ipatch_value_get_range (const GValue *value);

Get the range structure from a IPATCH_TYPE_RANGE GValue.

Parameters

value

A valid GValue of IPATCH_TYPE_RANGE boxed type

 

Returns

IpatchRange structure containing the range values of value or NULL if not set. The returned structure is NOT duplicated and is the same pointer used in value .

[transfer none]


ipatch_param_spec_range ()

GParamSpec *
ipatch_param_spec_range (const char *name,
                         const char *nick,
                         const char *blurb,
                         int min,
                         int max,
                         int default_low,
                         int default_high,
                         GParamFlags flags);

Create a parameter specification for IPATCH_TYPE_RANGE GValues.

Parameters

name

Property name

 

nick

Property nick name

 

blurb

Property description blurb

 

min

Minimum value for range end points (can be -1 to allow undefined ranges)

 

max

Maximum value for range end points

 

default_low

Default value for low endpoint of range

 

default_high

Default value for high endpoint of range

 

flags

Property flags

 

Returns

New range parameter specification.

[transfer full]