libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description |
IpatchRange; IpatchParamSpecRange; #define IPATCH_TYPE_RANGE #define IPATCH_VALUE_HOLDS_RANGE (value) #define IPATCH_RANGE_SET_VALUES (range, val1, val2) #define IPATCH_RANGE_SET_NULL (range) IpatchRange * ipatch_range_new (int low
,int high
); IpatchRange * ipatch_range_copy (IpatchRange *range
); void ipatch_range_free (IpatchRange *range
); void ipatch_value_set_range (GValue *value
,const IpatchRange *range
); void ipatch_value_set_static_range (GValue *value
,IpatchRange *range
); IpatchRange * ipatch_value_get_range (const GValue *value
); #define IPATCH_TYPE_PARAM_RANGE GType ipatch_param_spec_range_get_type (void
); 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
);
Boxed type used for GValue and GParamSpec properties. Consists of a low and a high integer value defining a range.
typedef struct { int low; /* low endpoint of range or -1 if undefined */ int high; /* high endpoint of range or -1 if undefined */ } IpatchRange;
typedef struct { GParamSpec parent_instance; /* derived from GParamSpec */ int min, max; /* min and max values for range endpoints */ int default_low, default_high; /* default vals for low and high endpoints */ } IpatchParamSpecRange;
IpatchRange * ipatch_range_new (int low
,int high
);
Create a new value range structure (to store an integer range).
|
Low value to initialize range to |
|
High value to initialize range to |
Returns : |
Newly allocated integer range structure. |
IpatchRange * ipatch_range_copy (IpatchRange *range
);
Duplicates an integer range structure.
|
Range structure to duplicate |
Returns : |
New duplicate range structure. |
void ipatch_range_free (IpatchRange *range
);
Free a range structure previously allocated with ipatch_range_new()
.
|
Integer range structure to free |
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.
|
a valid GValue of IPATCH_TYPE_RANGE boxed type |
|
Range structure to assign to value
|
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.
|
A valid GValue of IPATCH_TYPE_RANGE boxed type |
|
Range structure to assign to value
|
IpatchRange * ipatch_value_get_range (const GValue *value
);
Get the range structure from a IPATCH_TYPE_RANGE GValue.
|
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 .
|
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.
|
Property name |
|
Property nick name |
|
Property description blurb |
|
Minimum value for range end points (can be -1 to allow undefined ranges) |
|
Maximum value for range end points |
|
Default value for low endpoint of range |
|
Default value for high endpoint of range |
|
Property flags |
Returns : |
New range parameter specification. |