summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>2006-06-09 13:16:03 +0000
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>2006-06-09 13:16:03 +0000
commit53036cbbccb8fc9ce65b356a3909a2676ebbe289 (patch)
tree1a994dd7887880ed626e8f40e2961e4f505bf93a
parentf64087e7de6e2b0c488ca0153bd479011bcaad21 (diff)
downloadat-spi2-atk-53036cbbccb8fc9ce65b356a3909a2676ebbe289.tar.gz
Docs tweaks.
Fix marshalling of new states to/from ATK, and in cspi/libspi. Added STATE_VISITED. Added some table selection API test to event-listener-test. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@810 e2bd861d-eb25-0410-b326-f6ed22b6b98c
-rw-r--r--ChangeLog12
-rw-r--r--cspi/spi-statetypes.h14
-rw-r--r--cspi/spi_accessible.c7
-rw-r--r--docs/reference/cspi/at-spi-cspi-sections.txt2
-rw-r--r--docs/reference/cspi/tmpl/spi_accessible.sgml12
-rw-r--r--docs/reference/cspi/tmpl/spi_action.sgml12
-rw-r--r--docs/reference/cspi/tmpl/spi_application.sgml8
-rw-r--r--docs/reference/cspi/tmpl/spi_component.sgml7
-rw-r--r--docs/reference/cspi/tmpl/spi_editabletext.sgml6
-rw-r--r--docs/reference/cspi/tmpl/spi_value.sgml11
-rw-r--r--idl/Accessibility_State.idl8
-rw-r--r--libspi/stateset.c19
-rw-r--r--test/event-listener-test.c15
13 files changed, 120 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 06cac17..577598e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-06-09 Bill Haneman <bill.haneman@sun.com>
+
+ * idl/Accessibility_State.idl:
+ Added STATE_VISITED (bug #338369).
+
+ * cspi/spi_accessible.c:
+ (spi_state_to_corba) Fixed marshalling of new statetypes.
+
+ * libspi/stateset.c:
+ (spi_init_state_tables, impl_getStates): Fixed conversion of new statetypes
+ to/from ATK.
+
2006-04-17 Matthias Clasen <mclasen@redhat.com>
* revert my previous change
diff --git a/cspi/spi-statetypes.h b/cspi/spi-statetypes.h
index 025469a..eee9d70 100644
--- a/cspi/spi-statetypes.h
+++ b/cspi/spi-statetypes.h
@@ -65,6 +65,13 @@ extern "C" {
* to onscreen). Used to prevent need to enumerate all children in very large
* containers, like tables.
*@SPI_STATE_INDETERMINATE: Indicates that a check box is in a state other than checked or not checked.
+ *@SPI_STATE_TRUNCATED: Indicates that an object is truncated, e.g. a text value in a speradsheet cell.
+ *@SPI_STATE_REQUIRED: Indicates that explicit user interaction with an object is required by the user interface, e.g. a required field in a "web-form" interface.
+ *@SPI_STATE_INVALID_ENTRY: Indicates that the object has encountered an error condition due to failure of input validation. For instance, a form control may acquire this state in response to invalid or malformed user input.
+ *@SPI_STATE_SUPPORTS_AUTOCOMPLETION: Indicates that the object may exhibit "typeahead" behavior in response to user keystrokes, e.g. one keystroke may result in the insertion of several characters into an entry, or result in the auto-selection of an item in a list. This state supplants @SPI_ROLE_AUTOCOMPLETE.
+ *@SPI_STATE_SELECTABLE_TEXT:Indicates that the object in question supports text selection. It should only be exposed on objects which implement the Text interface, in order to distinguish this state from @SPI_STATE_SELECTABLE, which infers that the object in question is a selectable child of an object which implements Selection. While similar, text selection and subelement selection are distinct operations.
+ *@SPI_STATE_IS_DEFAULT: Indicates that the object is the "default" active component, i.e. the object which is activated by an end-user press of the "Enter" or "Return" key. Typically a "close" or "submit" button.
+ *@SPI_STATE_VISITED: Indicates that the object (typically a hyperlink) has already been 'activated', and/or its backing data has already been downloaded, rendered, or otherwise "visited".
*@SPI_STATE_LAST_DEFINED: Not a valid state, used for finding end of enumeration
*
*The possibles states of an object.
@@ -103,6 +110,13 @@ typedef enum
SPI_STATE_VISIBLE,
SPI_STATE_MANAGES_DESCENDANTS,
SPI_STATE_INDETERMINATE,
+ SPI_STATE_TRUNCATED,
+ SPI_STATE_REQUIRED,
+ SPI_STATE_INVALID_ENTRY,
+ SPI_STATE_SUPPORTS_AUTOCOMPLETE,
+ SPI_STATE_SELECTABLE_TEXT,
+ SPI_STATE_IS_DEFAULT,
+ SPI_STATE_VISITED,
SPI_STATE_LAST_DEFINED
} AccessibleState;
diff --git a/cspi/spi_accessible.c b/cspi/spi_accessible.c
index f42f954..5f72f05 100644
--- a/cspi/spi_accessible.c
+++ b/cspi/spi_accessible.c
@@ -1250,6 +1250,13 @@ spi_state_to_corba (AccessibleState state)
MAP_STATE (VISIBLE);
MAP_STATE (MANAGES_DESCENDANTS);
MAP_STATE (INDETERMINATE);
+ MAP_STATE (TRUNCATED);
+ MAP_STATE (REQUIRED);
+ MAP_STATE (INVALID_ENTRY);
+ MAP_STATE (SUPPORTS_AUTOCOMPLETE);
+ MAP_STATE (SELECTABLE_TEXT);
+ MAP_STATE (IS_DEFAULT);
+ MAP_STATE (VISITED);
default:
return Accessibility_STATE_INVALID;
}
diff --git a/docs/reference/cspi/at-spi-cspi-sections.txt b/docs/reference/cspi/at-spi-cspi-sections.txt
index 69bbd55..6e59950 100644
--- a/docs/reference/cspi/at-spi-cspi-sections.txt
+++ b/docs/reference/cspi/at-spi-cspi-sections.txt
@@ -306,7 +306,7 @@ AccessibleStreamableContent_open
AccessibleStreamableContent_seek
AccessibleStreamableContent_read
AccessibleStreamableContent_close
-AccessibleStreamableContent_freeContentTypeList
+AccessibleStreamableContent_freeContentTypesList
</SECTION>
<SECTION>
diff --git a/docs/reference/cspi/tmpl/spi_accessible.sgml b/docs/reference/cspi/tmpl/spi_accessible.sgml
index 4fdfaf6..5b3f137 100644
--- a/docs/reference/cspi/tmpl/spi_accessible.sgml
+++ b/docs/reference/cspi/tmpl/spi_accessible.sgml
@@ -2,11 +2,19 @@
Accessible Objects
<!-- ##### SECTION Short_Description ##### -->
-
+The base accessibility interface which all accessible objects implement.
<!-- ##### SECTION Long_Description ##### -->
<para>
-
+The Accessible interface provides for a hierarchical tree of accessible
+objects corresponding to user interface components and content in an
+accessible application. Accessible objects provide name, descriptive
+information, state information, and information on the "role" of the object in
+the user interface. The capabilities of these objects may be queried via
+interface queries, as they are implemented via interface aggregation. These
+objects are located in a containment hierarchy with parent/child
+relationships, and may have other functional relationships to objects within
+the tree.
</para>
<!-- ##### SECTION See_Also ##### -->
diff --git a/docs/reference/cspi/tmpl/spi_action.sgml b/docs/reference/cspi/tmpl/spi_action.sgml
index 28ee6d4..a212ee8 100644
--- a/docs/reference/cspi/tmpl/spi_action.sgml
+++ b/docs/reference/cspi/tmpl/spi_action.sgml
@@ -2,11 +2,19 @@
AccessibleAction Interface
<!-- ##### SECTION Short_Description ##### -->
-
+The interface implemented by interface elements which are 'actionable' by the
+user.
<!-- ##### SECTION Long_Description ##### -->
<para>
-
+The Action interface is implemented by objects with which the user may
+interact using common graphical-user-interface metaphors such as "click",
+"toggle", "activate", and other gestures which are usually invoked via
+interaction with the system pointer or keyboard. The Action interface allows
+clients and/or assistive technologies to expose these actions to the end user
+for invocation via alternative mechanisms, and to inform the end user or
+assistive technology client that the implementing Accessible object is
+reactive to user input.
</para>
<!-- ##### SECTION See_Also ##### -->
diff --git a/docs/reference/cspi/tmpl/spi_application.sgml b/docs/reference/cspi/tmpl/spi_application.sgml
index 8e00617..3c74bd8 100644
--- a/docs/reference/cspi/tmpl/spi_application.sgml
+++ b/docs/reference/cspi/tmpl/spi_application.sgml
@@ -2,11 +2,15 @@
AccessibleApplication API
<!-- ##### SECTION Short_Description ##### -->
-
+The interface implemented by the topmost Accessible in an application's
+hierarchy of Accessible objects.
<!-- ##### SECTION Long_Description ##### -->
<para>
-
+This interface is implemented on the topmost object in an application's
+hierarchy. It is primarily a marker interface, though certain properties
+associated with an application, such as the application's current default
+locale, are also exposed.
</para>
<!-- ##### SECTION See_Also ##### -->
diff --git a/docs/reference/cspi/tmpl/spi_component.sgml b/docs/reference/cspi/tmpl/spi_component.sgml
index 2cf0f89..27aa486 100644
--- a/docs/reference/cspi/tmpl/spi_component.sgml
+++ b/docs/reference/cspi/tmpl/spi_component.sgml
@@ -2,11 +2,14 @@
AccessibleComponent Interface
<!-- ##### SECTION Short_Description ##### -->
-
+An interface implemented by objects which occupy area on screen.
<!-- ##### SECTION Long_Description ##### -->
<para>
-
+The Component interface is implemented by objects which are visible, or are
+potentially visible, onscreen. The interface exposes onscreen bounds, the
+approximate "layer" in which the object resides, sometimes including z-order
+information, and allows objects to explicitly be told to request focus.
</para>
<!-- ##### SECTION See_Also ##### -->
diff --git a/docs/reference/cspi/tmpl/spi_editabletext.sgml b/docs/reference/cspi/tmpl/spi_editabletext.sgml
index 8b7703e..5083a28 100644
--- a/docs/reference/cspi/tmpl/spi_editabletext.sgml
+++ b/docs/reference/cspi/tmpl/spi_editabletext.sgml
@@ -2,11 +2,13 @@
AccessibleEditableText Interface
<!-- ##### SECTION Short_Description ##### -->
-
+An interface which allows editable text fields to be programmatically manipulated.
<!-- ##### SECTION Long_Description ##### -->
<para>
-
+An interface implemented by objects whose text content may be (potentially or
+actually) directly modified by user activity. Text entry fields and text
+editor compose panes are examples of EditableText implementors.
</para>
<!-- ##### SECTION See_Also ##### -->
diff --git a/docs/reference/cspi/tmpl/spi_value.sgml b/docs/reference/cspi/tmpl/spi_value.sgml
index e7c970a..6be0fb6 100644
--- a/docs/reference/cspi/tmpl/spi_value.sgml
+++ b/docs/reference/cspi/tmpl/spi_value.sgml
@@ -2,11 +2,18 @@
AccessibleValue Interface
<!-- ##### SECTION Short_Description ##### -->
-
+An interface implemented by valuators, sliders, and other onscren components
+which allow discrete or continuous values to be manipulated.
<!-- ##### SECTION Long_Description ##### -->
<para>
-
+The Value interface is exposed by sliders, scrollbars, dials, and other
+components which are used to change scalar values in an application. The
+interface may be used to change a value in an "approximately continuous"
+fashion, or in integer increments - the interface allows the client to
+determine the incremental granularity of the adjustments possible, the
+possible range of values, and the current value. It also allows the value to
+be programmatically set, if the implementor's state does not include READONLY.
</para>
<!-- ##### SECTION See_Also ##### -->
diff --git a/idl/Accessibility_State.idl b/idl/Accessibility_State.idl
index effbda3..4461b0c 100644
--- a/idl/Accessibility_State.idl
+++ b/idl/Accessibility_State.idl
@@ -222,6 +222,14 @@ module Accessibility {
* @since AT-SPI 1.7.0
*/
STATE_IS_DEFAULT,
+ /**
+ * This state indicates that the object (typically a hyperlink)
+ * has already been activated or invoked, with the result that some backing data
+ * has been downloaded or rendered.
+ *
+ * @since AT-SPI 1.7.1
+ */
+ STATE_VISITED,
/** This value of the enumeration should not be used as a parameter, it indicates the number of
* items in the StateType enumeration.
diff --git a/libspi/stateset.c b/libspi/stateset.c
index d022d05..7ebeeaf 100644
--- a/libspi/stateset.c
+++ b/libspi/stateset.c
@@ -126,6 +126,11 @@ spi_init_state_type_tables (void)
atk_state_types[Accessibility_STATE_SUPPORTS_AUTOCOMPLETION] = ATK_STATE_SUPPORTS_AUTOCOMPLETION;
accessible_state_types[ATK_STATE_SELECTABLE_TEXT] = Accessibility_STATE_SELECTABLE_TEXT;
atk_state_types[Accessibility_STATE_SELECTABLE_TEXT] = ATK_STATE_SELECTABLE_TEXT;
+ accessible_state_types[ATK_STATE_DEFAULT] = Accessibility_STATE_IS_DEFAULT;
+ atk_state_types[Accessibility_STATE_IS_DEFAULT] = ATK_STATE_DEFAULT;
+ accessible_state_types[ATK_STATE_VISITED] = Accessibility_STATE_VISITED;
+ atk_state_types[Accessibility_STATE_VISITED] = ATK_STATE_VISITED;
+
return TRUE;
}
@@ -367,6 +372,20 @@ impl_getStates (PortableServer_Servant servant,
states = g_slist_append (states, (gpointer) Accessibility_STATE_MANAGES_DESCENDANTS);
if (atk_state_set_contains_state (set, ATK_STATE_INDETERMINATE))
states = g_slist_append (states, (gpointer) Accessibility_STATE_INDETERMINATE);
+ if (atk_state_set_contains_state (set, ATK_STATE_REQUIRED))
+ states = g_slist_append (states, (gpointer) Accessibility_STATE_REQUIRED);
+ if (atk_state_set_contains_state (set, ATK_STATE_TRUNCATED))
+ states = g_slist_append (states, (gpointer) Accessibility_STATE_TRUNCATED);
+ if (atk_state_set_contains_state (set, ATK_STATE_ANIMATED))
+ states = g_slist_append (states, (gpointer) Accessibility_STATE_ANIMATED);
+ if (atk_state_set_contains_state (set, ATK_STATE_INVALID_ENTRY))
+ states = g_slist_append (states, (gpointer) Accessibility_STATE_INVALID_ENTRY);
+ if (atk_state_set_contains_state (set, ATK_STATE_SUPPORTS_AUTOCOMPLETION))
+ states = g_slist_append (states, (gpointer) Accessibility_STATE_SUPPORTS_AUTOCOMPLETION);
+ if (atk_state_set_contains_state (set, ATK_STATE_DEFAULT))
+ states = g_slist_append (states, (gpointer) Accessibility_STATE_IS_DEFAULT);
+ if (atk_state_set_contains_state (set, ATK_STATE_VISITED))
+ states = g_slist_append (states, (gpointer) Accessibility_STATE_VISITED);
rv = Accessibility_StateSeq__alloc ();
rv->_length = rv->_maximum = g_slist_length (states);
diff --git a/test/event-listener-test.c b/test/event-listener-test.c
index 165b9e3..1571d40 100644
--- a/test/event-listener-test.c
+++ b/test/event-listener-test.c
@@ -334,6 +334,21 @@ report_event (const AccessibleEvent *event, void *user_data)
count,
count/g_timer_elapsed(timer, NULL));
}
+
+ /* check for Table interface - if present, query selections */
+ if (Accessible_isTable (event->source))
+ {
+ gint n_selected_rows = 0;
+ gint n_selected_cols = 0;
+ long int *rows, *cols;
+ AccessibleTable *table = Accessible_getTable (event->source);
+
+ n_selected_rows = AccessibleTable_getSelectedRows (table, &rows);
+ n_selected_cols = AccessibleTable_getSelectedColumns (table, &cols);
+
+ g_print ("TABLE interface: selectedRows=%d, selectedCols = %d\n",
+ n_selected_rows, n_selected_cols);
+ }
}
void