[g-a-devel]ATK API additions for 2.2 (patch)



Hi:

Attached is a patch that adds some enum values and four new methods to
ATK; it is based on feedback from AT developers and app developers
(including the folks working to make OpenOffice.org/StarOffice
accessible).  It also adds one new signal to AtkText, which is sent when
attributes in a text object change.

I won't be very available to discuss this until Monday or so... Padraig
has agreed to work on some simple implementations for GAIL.

I hope these are the last 2.2 ATK API changes, I realize the freeze is
RealSoonNow. :-)

best regards,

Bill


Index: atk/atkaction.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkaction.h,v
retrieving revision 1.8
diff -u -r1.8 atkaction.h
--- atk/atkaction.h	13 Feb 2002 14:15:05 -0000	1.8
+++ atk/atkaction.h	24 Oct 2002 15:12:48 -0000
@@ -63,7 +63,8 @@
                                                 gint              i,
                                                 const gchar       *desc);
 
-  AtkFunction             pad1;
+  AtkFunction             (*get_localized_name)(AtkAction         *action,
+						gint              i);
   AtkFunction             pad2;
 };
 
@@ -93,6 +94,10 @@
                                                    gint              i,
                                                    const gchar       *desc);
 
+/* NEW in ATK 1.1: */
+
+G_CONST_RETUEN gchar* atk_action_get_localized_name (AtkAction       *action,
+						     gint            i);
 
 /*
  * Additional GObject properties exported by AtkAction:
Index: atk/atkobject.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkobject.h,v
retrieving revision 1.32
diff -u -r1.32 atkobject.h
--- atk/atkobject.h	9 Sep 2002 11:08:34 -0000	1.32
+++ atk/atkobject.h	24 Oct 2002 15:12:49 -0000
@@ -107,7 +107,15 @@
  * ATK_ROLE_TREE_TABLE: An object capable of expanding and collapsing rows as well as showing multiple columns of data
  * ATK_ROLE_UNKNOWN: The object contains some Accessible information, but its role is not known
  * ATK_ROLE_VIEWPORT: An object usually used in a scroll pane
- * ATK_ROLE_WINDOW: A top level window with no title or border
+ * ATK_ROLE_WINDOW: A top level window with no title or border.
+ *
+ * NEW IN ATK 1.1
+ *
+ * ATK_ROLE_HEADER: An object that serves as a document header.
+ * ATK_ROLE_FOOTER: An object that serves as a document footer.
+ * ATK_ROLE_PARAGRAPH: An object which is contains a paragraph of text content.
+ * ATK_ROLE_RULER: An object which describes margins and tab stops, etc. for
+ * text objects which it controls (should have CONTROLLER_FOR relation to such).
  * ATK_ROLE_LAST_DEFINED: not a valid role, used for finding end of enumeration
  * 
  *Describes the role of an object
@@ -456,6 +464,16 @@
                                     
 G_CONST_RETURN gchar* atk_role_get_name      (AtkRole         role);
 AtkRole               atk_role_for_name      (const gchar     *name);
+
+
+/* NEW in 1.1: convenience API */
+void                  atk_object_add_relationhip               (AtkObject      *object,
+								AtkRelationType relationship,
+								AtkObject      *target);
+gboolean              atk_object_remove_relationhip            (AtkObject      *object,
+								AtkRelationType relationship,
+								AtkObject      *target);
+G_CONST_RETURN gchar* atk_role_get_localized_name              (AtkRole     role);
 
 
 /*
Index: atk/atkrelation.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkrelation.h,v
retrieving revision 1.7
diff -u -r1.7 atkrelation.h
--- atk/atkrelation.h	22 Nov 2001 15:58:56 -0000	1.7
+++ atk/atkrelation.h	24 Oct 2002 15:12:50 -0000
@@ -41,6 +41,11 @@
  * ATK_RELATION_LABELLED_BY: Indicates an object is labelled by one or more target objects.
  * ATK_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or more target objects.
  * ATK_RELATION_NODE_CHILD_OF: Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell.
+ * ATK_RELATION_FLOWS_TO: Indicates that the object has content that flows logically to another
+ *  AtkObject in a sequential way, (for instance text-flow).
+ * ATK_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
+ *  another AtkObject in a sequential way, (for instance text-flow).
+ * ATK_RELATION_SUBWINDOW_OF: [not sure about this one, ask peter]
  * ATK_RELATION_LAST_DEFINED:
  * 
  *Describes the type of the relation
@@ -54,6 +59,9 @@
   ATK_RELATION_LABELLED_BY,
   ATK_RELATION_MEMBER_OF,
   ATK_RELATION_NODE_CHILD_OF,
+  ATK_RELATION_FLOWS_TO,
+  ATK_RELATION_FLOWS_FROM,
+  ATK_RELATION_SUBWINDOW_OF, /* not sure about this one, ask Peter */
   ATK_RELATION_LAST_DEFINED
 } AtkRelationType;
 
Index: atk/atkstate.h
===================================================================
RCS file: /cvs/gnome/atk/atk/atkstate.h,v
retrieving revision 1.6
diff -u -r1.6 atkstate.h
--- atk/atkstate.h	20 Nov 2001 11:38:38 -0000	1.6
+++ atk/atkstate.h	24 Oct 2002 15:12:50 -0000
@@ -57,6 +57,9 @@
  * ATK_STATE_TRANSIENT: Indicates this object is transient
  * ATK_STATE_VERTICAL: Indicates the orientation of this object is vertical
  * ATK_STATE_VISIBLE: Indicates this object is visible
+ * ATK_STATE_MANAGES_DESCENDANTS: Indicates that "active-descendant-changed" event
+ * is sent when children become 'active' (i.e. are selected or navigated to onscreen).
+ * Used to prevent need to enumerate all children in very large containers, like tables.
  * ATK_STATE_LAST_DEFINED: Not a valid role, used for finding end of enumeration
  *
  *The possible types of states of an object
@@ -92,6 +95,7 @@
   ATK_STATE_TRANSIENT,
   ATK_STATE_VERTICAL,
   ATK_STATE_VISIBLE,
+  ATK_STATE_MANAGES_DESCENDANTS,
   ATK_STATE_LAST_DEFINED
 } AtkStateType;
 
Index: atk/atktext.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atktext.c,v
retrieving revision 1.52
diff -u -r1.52 atktext.c
--- atk/atktext.c	5 Mar 2002 12:25:15 -0000	1.52
+++ atk/atktext.c	24 Oct 2002 15:12:51 -0000
@@ -29,6 +29,7 @@
   TEXT_CHANGED,
   TEXT_CARET_MOVED,
   TEXT_SELECTION_CHANGED,
+  TEXT_ATTRIBUTES_CHANGED,
   LAST_SIGNAL
 };
 
@@ -126,6 +127,14 @@
                       ATK_TYPE_TEXT,
                       G_SIGNAL_RUN_LAST,
                       G_STRUCT_OFFSET (AtkTextIface, text_selection_changed),
+                      (GSignalAccumulator) NULL, NULL,
+                      g_cclosure_marshal_VOID__VOID,
+                      G_TYPE_NONE, 0);
+      atk_text_signals[TEXT_SELECTION_CHANGED] =
+        g_signal_new ("text_attributes_changed",
+                      ATK_TYPE_TEXT,
+                      G_SIGNAL_RUN_LAST,
+                      G_STRUCT_OFFSET (AtkTextIface, text_attributes_changed),
                       (GSignalAccumulator) NULL, NULL,
                       g_cclosure_marshal_VOID__VOID,
                       G_TYPE_NONE, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]