X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=atk%2Fatkvalue.c;h=2a6b083e94202e64c02eddf37027d381fdd43556;hb=4f6af53bad4ec54579484a07b0291b781bcbb8ad;hp=22d1b6d9e39170b554f0713d87f1099a7e1d765b;hpb=cd96f06d1ec770abd8c11abeafd115e8bd8ebafc;p=platform%2Fupstream%2Fatk.git diff --git a/atk/atkvalue.c b/atk/atkvalue.c index 22d1b6d..2a6b083 100755 --- a/atk/atkvalue.c +++ b/atk/atkvalue.c @@ -20,8 +20,24 @@ #include #include "atkvalue.h" +/** + * SECTION:atkvalue + * @Short_description: The ATK interface implemented by valuators and + * components which display or select a value from a bounded range of + * values. + * @Title:AtkValue + * + * #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 FALSE to indicate failure. + */ + GType -atk_value_get_type () +atk_value_get_type (void) { static GType type = 0; @@ -128,6 +144,39 @@ atk_value_get_minimum_value (AtkValue *obj, } /** + * atk_value_get_minimum_increment: + * @obj: a GObject instance that implements AtkValueIface + * @value: a #GValue representing the minimum increment by which the accessible value may be changed + * + * 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: 1.12 + **/ +void +atk_value_get_minimum_increment (AtkValue *obj, + GValue *value) +{ + AtkValueIface *iface; + + g_return_if_fail (value != NULL); + g_return_if_fail (ATK_IS_VALUE (obj)); + + iface = ATK_VALUE_GET_IFACE (obj); + + if (iface->get_minimum_increment) + { + if (G_IS_VALUE (value)) + g_value_unset (value); + else + memset (value, 0, sizeof (*value)); + + (iface->get_minimum_increment) (obj, value); + } +} + +/** * atk_value_set_current_value: * @obj: a GObject instance that implements AtkValueIface * @value: a #GValue which is the desired new accessible value.