[g-a-devel]Window stacking order patch (bug 84097)



Hi:

Mark McLoughlin has generously passed us a patch that allows us to fix
bug 84097 ("need a way to provide toplevel stacking order") without
incurring a libwnck dependency, and with minimal API impact.  This is
really excellent, it will allow implementation of "line-mode" screen
review by screenreaders, an important feature which we had assumed would
be unfortunately missing in our next major at-spi release.

This patch has already been applied, but there are some minor known
issues with the patch which Padraig will be looking at; however we think
the patch is safe as applied.

Mark's (multi-module) patch includes a small change to at-spi.  Padraig
has ok'd the patches for atk and gail.  I attach the at-spi portion of
the patch; if there are concerns about this patch please mention them
soon so that we can address them and revert/revise as necessary.

The at-spi portion of the patch does basically only one thing: it
exposes a new value of the LAYER enumeration, SPI_LAYER_WINDOW, and it
overloads the getMDIZOrder method to return either the stacking order of
an "MDI" object within an MDI-style pane, or the stacking order of a
toplevel window.  e.g. previously getMDIZOrder returned zero for all
objects not in the "MDI" layer, but it now returns stacking information
for toplevel windows as well, and introduces a new "layer" for them.

Alternatively, we could expose toplevel windows in the
"SPI_LAYER_CANVAS" layer, but this would introduce some ambiguity
between true toplevel windows and backing "canvas" widgets, so I believe
the new layer value is justified.

regards,

-Bill


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/at-spi/ChangeLog,v
retrieving revision 1.238
diff -u -p -r1.238 ChangeLog
--- ChangeLog	28 Aug 2002 14:40:19 -0000	1.238
+++ ChangeLog	6 Sep 2002 05:44:26 -0000
@@ -1,3 +1,15 @@
+2002-09-06  Mark McLoughlin  <mark skynet ie>
+
+	* cspi/spi.h: add SPI_LAYER_WINDOW.
+
+	* cspi/spi_component.c: (AccessibleComponent_getLayer):
+	add Accessibility_LAYER_WINDOW case.
+
+	* idl/Accessibility_Component.idl: add LAYER_WINDOW.
+
+	* libspi/component.c: (impl_accessibility_component_get_layer):
+	add ATK_LAYER_WINDOW case.
+
 2002-08-28  Bill Haneman <bill haneman sun com>

 	* configure.in: incremented micro version.
Index: cspi/spi.h
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi.h,v
retrieving revision 1.47
diff -u -p -r1.47 spi.h
--- cspi/spi.h	19 Apr 2002 09:09:50 -0000	1.47
+++ cspi/spi.h	6 Sep 2002 05:44:30 -0000
@@ -112,6 +112,8 @@ typedef unsigned long AccessibleKeyEvent
  *                          MDI components.
  * @SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
  *                          for future use.
+ * @SPI_LAYER_WINDOW: Component is in the window layer and have valid Z-information
+ *                    relative to other window-layer components.
  * @SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
  *                          should not be encountered.
  **/
@@ -123,6 +125,7 @@ typedef enum {
     SPI_LAYER_MDI,
     SPI_LAYER_POPUP,
     SPI_LAYER_OVERLAY,
+    SPI_LAYER_WINDOW,
     SPI_LAYER_LAST_DEFINED
 } AccessibleComponentLayer;

Index: cspi/spi_component.c
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi_component.c,v
retrieving revision 1.19
diff -u -p -r1.19 spi_component.c
--- cspi/spi_component.c	13 May 2002 07:48:57 -0000	1.19
+++ cspi/spi_component.c	6 Sep 2002 05:44:31 -0000
@@ -267,6 +267,9 @@ AccessibleComponent_getLayer (Accessible
     case Accessibility_LAYER_OVERLAY:
       retval = SPI_LAYER_OVERLAY;
       break;
+    case Accessibility_LAYER_WINDOW:
+      retval = SPI_LAYER_WINDOW;
+      break;
     default:
       retval = SPI_LAYER_INVALID;
       break;
@@ -279,8 +282,8 @@ AccessibleComponent_getLayer (Accessible
  * AccessibleComponent_getMDIZOrder:
  * @obj: a pointer to the #AccessibleComponent to query.
  *
- * Query the z stacking order of a component which is in the MDI layer.
- *       (Bigger z-order numbers mean nearer the top)
+ * Query the z stacking order of a component which is in the MDI or window
+ *       layer. (Bigger z-order numbers mean nearer the top)
  *
  * Returns: a short integer indicating the stacking order of the component
  *       in the MDI layer, or -1 if the component is not in the MDI layer.
Index: idl/Accessibility_Component.idl
===================================================================
RCS file: /cvs/gnome/at-spi/idl/Accessibility_Component.idl,v
retrieving revision 1.8
diff -u -p -r1.8 Accessibility_Component.idl
--- idl/Accessibility_Component.idl	15 Apr 2002 16:03:21 -0000	1.8
+++ idl/Accessibility_Component.idl	6 Sep 2002 05:44:31 -0000
@@ -32,6 +32,7 @@ module Accessibility {
     LAYER_MDI,
     LAYER_POPUP,
     LAYER_OVERLAY,
+    LAYER_WINDOW,
     LAYER_LAST_DEFINED
   };

Index: libspi/component.c
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/component.c,v
retrieving revision 1.19
diff -u -p -r1.19 component.c
--- libspi/component.c	3 May 2002 22:55:34 -0000	1.19
+++ libspi/component.c	6 Sep 2002 05:44:32 -0000
@@ -170,6 +170,8 @@ impl_accessibility_component_get_layer (
         return Accessibility_LAYER_POPUP;
       case ATK_LAYER_OVERLAY:
         return Accessibility_LAYER_OVERLAY;
+      case ATK_LAYER_WINDOW:
+        return Accessibility_LAYER_WINDOW;
       default:
         break;
     }



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