Interface
AtkValue
Description [src]
interface Atk.Value : GObject.Object
The ATK interface implemented by valuators and components which display or select a value from a bounded range of values.
AtkValue
should be implemented for components which either display
a value from a bounded range, or which allow the user to specify a
value from a bounded range, or both. For instance, most sliders and
range controls, as well as dials, should have AtkObject
representations which implement AtkValue
on the component’s
behalf. AtKValues
may be read-only, in which case attempts to
alter the value return would fail.
A level bar whose value changes to reflect the battery charge. The color remains the same regardless of the charge and there is no on-screen text reflecting the fullness of the battery. In this case, because the position within the bar is the only indication the user has of the current charge, value text should not be provided by the implementor.
AtkValue
should NOT be implemented for widgets whose displayed
value is not reflective of a meaningful amount. For instance, a
progress pulse indicator whose value alternates between 0.0 and 1.0
to indicate that some process is still taking place should not
implement AtkValue
because the current value does not reflect
progress towards completion.
atk_value_type_get_localized_name()
with the following
already-localized constants for commonly-needed values can be used:
Prerequisite
In order to implement Value, your type must inherit fromGObject
.
Instance methods
atk_value_get_increment
Gets the minimum increment by which the value of this object may be changed. If zero, the minimum increment is undefined, which may mean that it is limited only by the floating point precision of the platform.
since: 2.12
atk_value_get_minimum_increment
Gets the minimum increment by which the value of this object may be changed. If zero, the minimum increment is undefined, which may mean that it is limited only by the floating point precision of the platform.
deprecated: Unknown since: 1.12
atk_value_get_sub_ranges
Gets the list of subranges defined for this object. See AtkValue
introduction for examples of subranges and when to expose them.
since: 2.12
atk_value_get_value_and_text
Gets the current value and the human readable text alternative of
obj
. text
is a newly created string, that must be freed by the
caller. Can be NULL if no descriptor is available.
since: 2.12
Signals
Atk.Value::value-changed
The ‘value-changed’ signal is emitted when the current value
that represent the object changes. value
is the numerical
representation of this new value. text
is the human
readable text alternative of value
, and can be NULL if it is
not available. Note that if there is a textual description
associated with the new numeric value, that description
should be included regardless of whether or not it has also changed.
since: 2.12
Interface structure
struct AtkValueIface {
GTypeInterface parent;
void (* get_current_value) (
AtkValue* obj,
GValue* value
);
void (* get_maximum_value) (
AtkValue* obj,
GValue* value
);
void (* get_minimum_value) (
AtkValue* obj,
GValue* value
);
gboolean (* set_current_value) (
AtkValue* obj,
const GValue* value
);
void (* get_minimum_increment) (
AtkValue* obj,
GValue* value
);
void (* get_value_and_text) (
AtkValue* obj,
gdouble* value,
gchar** text
);
AtkRange* (* get_range) (
AtkValue* obj
);
gdouble (* get_increment) (
AtkValue* obj
);
GSList* (* get_sub_ranges) (
AtkValue* obj
);
void (* set_value) (
AtkValue* obj,
const gdouble new_value
);
}
No description available.
Interface members
parent |
|
No description available. |
|
get_current_value |
|
This virtual function is deprecated since 2.12 and it should not be overriden. |
|
get_maximum_value |
|
This virtual function is deprecated since 2.12 and it should not be overriden. |
|
get_minimum_value |
|
This virtual function is deprecated since 2.12 and it should not be overriden. |
|
set_current_value |
|
This virtual function is deprecated since 2.12 and it should not be overriden. |
|
get_minimum_increment |
|
This virtual function is deprecated since 2.12 and it should not be overriden. |
|
get_value_and_text |
|
Gets the current value and the human readable text alternative (if available) of this object. Since 2.12. |
|
get_range |
|
Gets the range that defines the minimum and maximum value of this object. Returns NULL if there is no range defined. Since 2.12. |
|
get_increment |
|
Gets the minimum increment by which the value of this object may be changed. If zero it is undefined. Since 2.12. |
|
get_sub_ranges |
|
Returns a list of different subranges, and their description (if available) of this object. Returns NULL if there is not subranges defined. Since 2.12. |
|
set_value |
|
Sets the value of this object. Since 2.12. |
Virtual methods
Atk.Value.get_increment
Gets the minimum increment by which the value of this object may be changed. If zero, the minimum increment is undefined, which may mean that it is limited only by the floating point precision of the platform.
since: 2.12
Atk.Value.get_minimum_increment
Gets the minimum increment by which the value of this object may be changed. If zero, the minimum increment is undefined, which may mean that it is limited only by the floating point precision of the platform.
deprecated: Unknown since: 1.12
Atk.Value.get_sub_ranges
Gets the list of subranges defined for this object. See AtkValue
introduction for examples of subranges and when to expose them.
since: 2.12
Atk.Value.get_value_and_text
Gets the current value and the human readable text alternative of
obj
. text
is a newly created string, that must be freed by the
caller. Can be NULL if no descriptor is available.
since: 2.12