atkdocument: add get_current_page_number() and get_page_count() methods
[platform/upstream/atk.git] / atk / atkobject.h
index bbfebbf..712060d 100755 (executable)
@@ -152,8 +152,44 @@ G_BEGIN_DECLS
  *@ATK_ROLE_IMAGE_MAP: An image map object. Usually a graphic with multiple hotspots, where each hotspot can be activated resulting in the loading of another document or section of a document. @Since: ATK-2.1.0
  *@ATK_ROLE_NOTIFICATION: A transitory object designed to present a message to the user, typically at the desktop level rather than inside a particular application.  @Since: ATK-2.1.0
  *@ATK_ROLE_INFO_BAR: An object designed to present a message to the user within an existing window. @Since: ATK-2.1.0
+ *@ATK_ROLE_LEVEL_BAR: A bar that serves as a level indicator to, for instance, show the strength of a password or the state of a battery.  @Since: ATK-2.7.3
+ *@ATK_ROLE_TITLE_BAR: A bar that serves as the title of a window or a
+ * dialog. @Since: ATK-2.12
+ *@ATK_ROLE_BLOCK_QUOTE: An object which contains a text section
+ * that is quoted from another source. @Since: ATK-2.12
+ *@ATK_ROLE_AUDIO: An object which represents an audio element. @Since: ATK-2.12
+ *@ATK_ROLE_VIDEO: An object which represents a video element. @Since: ATK-2.12
+ *@ATK_ROLE_DEFINITION: A definition of a term or concept. @Since: ATK-2.12
+ *@ATK_ROLE_ARTICLE: A section of a page that consists of a
+ * composition that forms an independent part of a document, page, or
+ * site. Examples: A blog entry, a news story, a forum post. @Since:
+ * ATK-2.12
+ *@ATK_ROLE_LANDMARK: A region of a web page intended as a
+ * navigational landmark. This is designed to allow Assistive
+ * Technologies to provide quick navigation among key regions within a
+ * document. @Since: ATK-2.12
+ *@ATK_ROLE_LOG: A text widget or container holding log content, such
+ * as chat history and error logs. In this role there is a
+ * relationship between the arrival of new items in the log and the
+ * reading order. The log contains a meaningful sequence and new
+ * information is added only to the end of the log, not at arbitrary
+ * points. @Since: ATK-2.12
+ *@ATK_ROLE_MARQUEE: A container where non-essential information
+ * changes frequently. Common usages of marquee include stock tickers
+ * and ad banners. The primary difference between a marquee and a log
+ * is that logs usually have a meaningful order or sequence of
+ * important content changes. @Since: ATK-2.12
+ *@ATK_ROLE_MATH: A text widget or container that holds a mathematical
+ * expression. @Since: ATK-2.12
+ *@ATK_ROLE_RATING: A widget whose purpose is to display a rating,
+ * such as the number of stars associated with a song in a media
+ * player. Objects of this role should also implement
+ * AtkValue. @Since: ATK-2.12
+ *@ATK_ROLE_TIMER: An object containing a numerical counter which
+ * indicates an amount of elapsed time from a start point, or the time
+ * remaining until an end point. @Since: ATK-2.12
  *@ATK_ROLE_LAST_DEFINED: not a valid role, used for finding end of the enumeration
- * 
+ *
  * Describes the role of an object
  *
  * These are the built-in enumerated roles that UI components can have in
@@ -162,8 +198,8 @@ G_BEGIN_DECLS
  **/
 typedef enum
 {
-  ATK_ROLE_INVALID = 0, 
-  ATK_ROLE_ACCEL_LABEL,
+  ATK_ROLE_INVALID = 0,
+  ATK_ROLE_ACCEL_LABEL,      /*<nick=accelerator-label>*/
   ATK_ROLE_ALERT,
   ATK_ROLE_ANIMATION,
   ATK_ROLE_ARROW,
@@ -263,11 +299,22 @@ typedef enum
   ATK_ROLE_IMAGE_MAP,
   ATK_ROLE_NOTIFICATION,
   ATK_ROLE_INFO_BAR,
+  ATK_ROLE_LEVEL_BAR,
+  ATK_ROLE_TITLE_BAR,
+  ATK_ROLE_BLOCK_QUOTE,
+  ATK_ROLE_AUDIO,
+  ATK_ROLE_VIDEO,
+  ATK_ROLE_DEFINITION,
+  ATK_ROLE_ARTICLE,
+  ATK_ROLE_LANDMARK,
+  ATK_ROLE_LOG,
+  ATK_ROLE_MARQUEE,
+  ATK_ROLE_MATH,
+  ATK_ROLE_RATING,
+  ATK_ROLE_TIMER,
   ATK_ROLE_LAST_DEFINED
 } AtkRole;
 
-AtkRole                  atk_role_register        (const gchar *name);
-
 /**
  *AtkLayer:
  *@ATK_LAYER_INVALID: The object does not have a layer
@@ -301,20 +348,29 @@ typedef enum
  * AtkAttributeSet:
  *
  * This is a singly-linked list (a #GSList) of #AtkAttribute. It is
- * used by atk_text_get_run_attributes(), atk_text_get_default_attributes()
- * and atk_editable_text_set_run_attributes()
+ * used by atk_text_get_run_attributes(),
+ * atk_text_get_default_attributes(),
+ * atk_editable_text_set_run_attributes(),
+ * atk_document_get_attributes() and atk_object_get_attributes()
  **/
 typedef GSList AtkAttributeSet;
 
 /**
  * AtkAttribute:
- * @name: The attribute name. Call atk_text_attr_get_name()
- * @value: the value of the attribute, represented as a string. 
- * Call atk_text_attr_get_value() for those which are strings.
- * For values which are numbers, the string representation of the number 
- * is in value.
+ * @name: The attribute name.
+ * @value: the value of the attribute, represented as a string.
+ *
+ * AtkAttribute is a string name/value pair representing a generic
+ * attribute. This can be used to expose additional information from
+ * an accessible object as a whole (see atk_object_get_attributes())
+ * or an document (see atk_document_get_attributes()). In the case of
+ * text attributes (see atk_text_get_default_attributes()),
+ * #AtkTextAttribute enum defines all the possible text attribute
+ * names. You can use atk_text_attribute_get_name() to get the string
+ * name from the enum value. See also atk_text_attribute_for_name()
+ * and atk_text_attribute_get_value() for more information.
  *
- * A string name/value pair representing a text attribute. 
+ * A string name/value pair representing a generic attribute.
  **/
 typedef struct _AtkAttribute AtkAttribute;
 
@@ -351,15 +407,15 @@ typedef struct _AtkStateSet               AtkStateSet;
  * @old_value: The old property value, NULL; in some contexts this value is undefined (see note below).
  * @new_value: The new value of the named property.
  *
- * @note: For most properties the old_value field of AtkPropertyValues will
- * not contain a valid value.
+ * Note: for most properties the old_value field of #AtkPropertyValues
+ * will not contain a valid value.
  *
  * Currently, the only property for which old_value is used is
  * accessible-state; for instance if there is a focus state the
  * property change handler will be called for the object which lost the focus
- * with the old_value containing an AtkState value corresponding to focused
+ * with the old_value containing an #AtkState value corresponding to focused
  * and the property change handler will be called for the object which
- * received the focus with the new_value containing an AtkState value
+ * received the focus with the new_value containing an #AtkState value
  * corresponding to focused.
  *
  **/
@@ -372,7 +428,17 @@ struct _AtkPropertyValues
 
 typedef struct _AtkPropertyValues        AtkPropertyValues;
 
-typedef gboolean (*AtkFunction)          (gpointer data); 
+/**
+ * AtkFunction:
+ * @user_data: custom data defined by the user
+ *
+ * An AtkFunction is a function definition used for padding which has
+ * been added to class and interface structures to allow for expansion
+ * in the future.
+ *
+ * Returns: not used
+ */
+typedef gboolean (*AtkFunction)          (gpointer user_data);
 /*
  * For most properties the old_value field of AtkPropertyValues will
  * not contain a valid value.
@@ -385,7 +451,17 @@ typedef gboolean (*AtkFunction)          (gpointer data);
  * received the focus with the new_value containing an AtkState value
  * corresponding to focused.
  */
-typedef void (*AtkPropertyChangeHandler) (AtkObject*, AtkPropertyValues*);
+
+/**
+ * AtkPropertyChangeHandler:
+ * @obj: atkobject which property changes
+ * @vals: values changed
+ *
+ * An AtkPropertyChangeHandler is a function which is executed when an
+ * AtkObject's property changes value. It is specified in a call to
+ * atk_object_connect_property_change_handler().
+ */
+typedef void (*AtkPropertyChangeHandler) (AtkObject* obj, AtkPropertyValues* vals);
 
 
 struct _AtkObject
@@ -400,6 +476,14 @@ struct _AtkObject
   AtkLayer layer;
 };
 
+
+/**
+ * AtkObjectClass:
+ * @focus_event: The signal handler which is executed when there is a
+ *   focus event for an object. This virtual function is deprecated
+ *   since 2.9.4 and it should not be overriden. Use
+ *   state-changed:focused signal instead.
+ */
 struct _AtkObjectClass
 {
   GObjectClass parent;
@@ -529,12 +613,21 @@ void                      (* initialize)                         (AtkObject
    * Since ATK 1.12
    */
   AtkAttributeSet*       (*get_attributes)            (AtkObject                  *accessible);
+
+  const gchar*            (*get_object_locale)         (AtkObject                  *accessible);
+
   AtkFunction             pad1;
-  AtkFunction             pad2;
 };
 
 GType            atk_object_get_type   (void);
 
+/**
+ * AtkImplementorIface:
+ *
+ * The AtkImplementor interface is implemented by objects for which
+ * AtkObject peers may be obtained via calls to
+ * iface->(ref_accessible)(implementor);
+ */
 struct _AtkImplementorIface
 {
   GTypeInterface parent;
@@ -543,18 +636,6 @@ struct _AtkImplementorIface
 };
 GType atk_implementor_get_type (void);
 
-/*
- * This method uses the ref_accessible method in AtkImplementorIface,
- * if the object's class implements AtkImplementorIface.
- * Otherwise it returns %NULL.
- *
- * IMPORTANT:
- * Note also that because this method may return flyweight objects,
- * it increments the returned AtkObject's reference count.
- * Therefore it is the responsibility of the calling
- * program to unreference the object when no longer needed.
- * (c.f. gtk_widget_get_accessible() where this is not the case).
- */
 AtkObject*              atk_implementor_ref_accessible            (AtkImplementor *implementor);
 
 /*
@@ -569,12 +650,12 @@ AtkObject*              atk_object_ref_accessible_child           (AtkObject *ac
                                                                    gint        i);
 AtkRelationSet*         atk_object_ref_relation_set               (AtkObject *accessible);
 AtkRole                 atk_object_get_role                       (AtkObject *accessible);
-#ifndef ATK_DISABLE_DEPRECATED
+
 G_DEPRECATED_FOR(atk_component_get_layer)
 AtkLayer                atk_object_get_layer                      (AtkObject *accessible);
 G_DEPRECATED_FOR(atk_component_get_mdi_zorder)
 gint                    atk_object_get_mdi_zorder                 (AtkObject *accessible);
-#endif /* ATK_DISABLE_DEPRECATED */
+
 AtkAttributeSet*        atk_object_get_attributes                 (AtkObject *accessible);
 AtkStateSet*            atk_object_ref_state_set                  (AtkObject *accessible);
 gint                    atk_object_get_index_in_parent            (AtkObject *accessible);
@@ -611,66 +692,8 @@ gboolean              atk_object_remove_relationship           (AtkObject      *
                                                                AtkRelationType relationship,
                                                                AtkObject      *target);
 const gchar*          atk_role_get_localized_name              (AtkRole     role);
-
-/* */
-
-
-/*
- * Note: the properties which are registered with the GType
- *   property registry, for type ATK_TYPE_OBJECT, are as follows:
- *
- *   "accessible-name"
- *   "accessible-description"
- *   "accessible-parent"
- *   "accessible-role"
- *   "accessible-value"
- *   "accessible-component-layer"
- *   "accessible-component-zorder"
- *   "accessible-table-caption"
- *   "accessible-table-column-description"
- *   "accessible-table-column-header"
- *   "accessible-table-row-description"
- *   "accessible-table-row-header"
- *   "accessible-table-summary"
- *   "accessible-model"
- *
- * accessibility property change listeners should use the
- *   normal GObject property interfaces and "property-change"
- *   signal handler semantics to interpret the property change
- *   information relayed from AtkObject.
- *   (AtkObject instances will connect to the "notify"
- *   signal in their host objects, and relay the signals when appropriate).
- */
-
-/* For other signals, see related interfaces
- *
- *    AtkActionIface,
- *    AtkComponentIface,
- *    AtkHypertextIface,
- *    AtkImageIface,
- *    AtkSelectionIface,
- *    AtkTableIface,
- *    AtkTextIface,
- *    AtkValueIface.
- *
- *  The usage model for obtaining these interface instances is:
- *    ATK_<interfacename>_GET_IFACE(GObject *accessible),
- *    where accessible, though specified as a GObject, is
- *    the AtkObject instance being queried.
- *  More usually, the interface will be used via a cast to the
- *    interface's corresponding "type":
- *
- *    AtkText textImpl = ATK_TEXT(accessible);
- *    if (textImpl)
- *      {
- *        cpos = atk_text_get_caret_position(textImpl);
- *      }
- *
- *  If it's known in advance that accessible implements AtkTextIface,
- *    this is shortened to:
- *
- *    cpos = atk_text_get_caret_position (ATK_TEXT (accessible));
- */
+AtkRole               atk_role_register                        (const gchar *name);
+const gchar*          atk_object_get_object_locale             (AtkObject   *accessible);
 
 G_END_DECLS