Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:32:49

0001 /* ATK -  Accessibility Toolkit
0002  * Copyright 2001 Sun Microsystems Inc.
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public
0015  * License along with this library; if not, write to the
0016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0017  * Boston, MA 02111-1307, USA.
0018  */
0019 
0020 #ifndef __ATK_VALUE_H__
0021 #define __ATK_VALUE_H__
0022 
0023 #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION)
0024 #error "Only <atk/atk.h> can be included directly."
0025 #endif
0026 
0027 #include <atk/atkobject.h>
0028 #include <atk/atkrange.h>
0029 
0030 G_BEGIN_DECLS
0031 
0032 #define ATK_TYPE_VALUE (atk_value_get_type ())
0033 #define ATK_IS_VALUE(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_VALUE)
0034 #define ATK_VALUE(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_VALUE, AtkValue)
0035 #define ATK_VALUE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_VALUE, AtkValueIface))
0036 
0037 #ifndef _TYPEDEF_ATK_VALUE_
0038 #define _TYPEDEF_ATK_VALUE__
0039 typedef struct _AtkValue AtkValue;
0040 #endif
0041 typedef struct _AtkValueIface AtkValueIface;
0042 
0043 /**
0044  * AtkValueType:
0045  *
0046  * Default types for a given value. Those are defined in order to
0047  * easily get localized strings to describe a given value or a given
0048  * subrange, using atk_value_type_get_localized_name().
0049  *
0050  */
0051 typedef enum
0052 {
0053   ATK_VALUE_VERY_WEAK,
0054   ATK_VALUE_WEAK,
0055   ATK_VALUE_ACCEPTABLE,
0056   ATK_VALUE_STRONG,
0057   ATK_VALUE_VERY_STRONG,
0058   ATK_VALUE_VERY_LOW,
0059   ATK_VALUE_LOW,
0060   ATK_VALUE_MEDIUM,
0061   ATK_VALUE_HIGH,
0062   ATK_VALUE_VERY_HIGH,
0063   ATK_VALUE_VERY_BAD,
0064   ATK_VALUE_BAD,
0065   ATK_VALUE_GOOD,
0066   ATK_VALUE_VERY_GOOD,
0067   ATK_VALUE_BEST,
0068   ATK_VALUE_LAST_DEFINED
0069 } AtkValueType;
0070 
0071 /**
0072  * AtkValueIface:
0073  * @get_current_value: This virtual function is deprecated since 2.12
0074  *  and it should not be overriden.
0075  * @get_maximum_value: This virtual function is deprecated since 2.12
0076  *  and it should not be overriden.
0077  * @get_minimum_value: This virtual function is deprecated since 2.12
0078  *  and it should not be overriden.
0079  * @set_current_value: This virtual function is deprecated since 2.12
0080  *  and it should not be overriden.
0081  * @get_minimum_increment: This virtual function is deprecated since
0082  *  2.12 and it should not be overriden.
0083  * @get_value_and_text: gets the current value and the human readable
0084  * text alternative (if available) of this object. Since 2.12.
0085  * @get_range: gets the range that defines the minimum and maximum
0086  *  value of this object. Returns NULL if there is no range
0087  *  defined. Since 2.12.
0088  * @get_increment: gets the minimum increment by which the value of
0089  *  this object may be changed. If zero it is undefined. Since 2.12.
0090  * @get_sub_ranges: returns a list of different subranges, and their
0091  *  description (if available) of this object. Returns NULL if there
0092  *  is not subranges defined. Since 2.12.
0093  * @set_value: sets the value of this object. Since 2.12.
0094  */
0095 struct _AtkValueIface
0096 {
0097   GTypeInterface parent;
0098 
0099   /*<deprecated>*/
0100   void (*get_current_value) (AtkValue *obj,
0101                              GValue *value);
0102   void (*get_maximum_value) (AtkValue *obj,
0103                              GValue *value);
0104   void (*get_minimum_value) (AtkValue *obj,
0105                              GValue *value);
0106   gboolean (*set_current_value) (AtkValue *obj,
0107                                  const GValue *value);
0108   void (*get_minimum_increment) (AtkValue *obj,
0109                                  GValue *value);
0110   /*</deprecated>*/
0111   void (*get_value_and_text) (AtkValue *obj,
0112                               gdouble *value,
0113                               gchar **text);
0114   AtkRange *(*get_range) (AtkValue *obj);
0115   gdouble (*get_increment) (AtkValue *obj);
0116   GSList *(*get_sub_ranges) (AtkValue *obj);
0117   void (*set_value) (AtkValue *obj,
0118                      const gdouble new_value);
0119 };
0120 
0121 ATK_AVAILABLE_IN_ALL
0122 GType atk_value_get_type (void);
0123 
0124 ATK_DEPRECATED_IN_2_12_FOR (atk_value_get_value_and_text)
0125 void atk_value_get_current_value (AtkValue *obj,
0126                                   GValue *value);
0127 
0128 ATK_DEPRECATED_IN_2_12_FOR (atk_value_get_range)
0129 void atk_value_get_maximum_value (AtkValue *obj,
0130                                   GValue *value);
0131 ATK_DEPRECATED_IN_2_12_FOR (atk_value_get_range)
0132 void atk_value_get_minimum_value (AtkValue *obj,
0133                                   GValue *value);
0134 ATK_DEPRECATED_IN_2_12_FOR (atk_value_set_value)
0135 gboolean atk_value_set_current_value (AtkValue *obj,
0136                                       const GValue *value);
0137 ATK_DEPRECATED_IN_2_12_FOR (atk_value_get_increment)
0138 void atk_value_get_minimum_increment (AtkValue *obj,
0139                                       GValue *value);
0140 
0141 ATK_AVAILABLE_IN_2_12
0142 void atk_value_get_value_and_text (AtkValue *obj,
0143                                    gdouble *value,
0144                                    gchar **text);
0145 ATK_AVAILABLE_IN_2_12
0146 AtkRange *atk_value_get_range (AtkValue *obj);
0147 ATK_AVAILABLE_IN_2_12
0148 gdouble atk_value_get_increment (AtkValue *obj);
0149 ATK_AVAILABLE_IN_2_12
0150 GSList *atk_value_get_sub_ranges (AtkValue *obj);
0151 ATK_AVAILABLE_IN_2_12
0152 void atk_value_set_value (AtkValue *obj,
0153                           const gdouble new_value);
0154 /* AtkValueType methods */
0155 ATK_AVAILABLE_IN_ALL
0156 const gchar *atk_value_type_get_name (AtkValueType value_type);
0157 ATK_AVAILABLE_IN_ALL
0158 const gchar *atk_value_type_get_localized_name (AtkValueType value_type);
0159 
0160 G_END_DECLS
0161 
0162 #endif /* __ATK_VALUE_H__ */