+2002-06-03 Bill Haneman <bill.haneman@sun.com>
+
+ * test/test-simple.c:
+ (key_listener_cb):
+ Removed #ifdef KEY_IMPL_WORKS guards.
+ (test_keylisteners):
+ Removed #ifdef KEY_IMPL_WORKS guards.
+ Fixed bug which was causing a hang waiting for a
+ "press" event (which was already overwritten by a "release"
+ event) from SPI_generateKeyboardEvent with synth-type of SPI_KEY_SYM.
+ (key_listener_cb):
+ Added code to set globals 'key_press_received' and
+ 'key_release_received'.
+
+ * TODO:
+ Added section "1.1 API Proposed Additions" which
+ lists API additions desired for at-spi-1.1 (only one so far).
+ Updated TODO list a little.
+
2002-06-02 Bill Haneman <bill.haneman@sun.com>
AT-SPI 1.0 API FINAL: at-spi 1.0 is now
-TODO:
+2.0.0:
-idl:
- + audit IDL for conformance with bonobo/doc/FAQ's [Java]
- naming practice [Michael]
+ + fix bug #82509 which prevents return of boolean FALSE from
+ SPI_registerKeystrokeListener for ALL_WINDOWS events
+ when XGrabKey fails.
-cspi:
- + ensure spi-listener-impl's list notification methods don't
- have a re-enterancy hazard. [Michael]
- + Put LGPL headers everywhere.
+ + fix bug #84100 which means that keygrabs are not released
+ by the registry when a client dies. Test to make sure
+ grabs are released when a client requests deregistration
+ of a key listener.
-registry:
- + move code into here from libspi [Michael]
- + fire an event on dead application & re-factor the listen for
- broken code.
+2.0.1:
+ + fix bug affecting multihead at-spi behavior.
-bridge:
- + move code into here from libspi
-libspi:
- + remove redundant casts throughout
- + determine if there are other headers we don't need to install
- + consider moving the non-impl. parts into registryd/ bridge/ etc.
- + complete implementation of support for RelationSet and
- StateSet, and export to cspi. [Marc]
- + complete conversion of static methods to "spi_" namespace. [Bill]
+1.1 API Proposed Additions:
-test:
- + update test-simple to do complete API tests
- + Expand tests for AtkTable
+ + Need API for getting stacking order of toplevel windows.
+ (bug #84097)
-2.2 API Proposed Additions:
+1.2 API Proposed Additions:
+ SPI_dupString ()
+ Additional relation types: FLOWS_TO, FLOWS_FROM
long height,
SPI_COORD_TYPE type);
+/* *********************************************************** */
+TODO:
+
+idl:
+
+// + audit IDL for conformance with bonobo/doc/FAQ's [Java]
+// naming practice [Michael]
+
+cspi:
+ + ensure spi-listener-impl's list notification methods don't
+ have a re-enterancy hazard. [Michael]
+
+registry:
+ + move code into here from libspi [Michael]
+ + fire an event on dead application & re-factor the listen for
+ broken code.
+
+bridge:
+ + move code into here from libspi
+
+libspi:
+ + remove redundant casts throughout
+ + determine if there are other headers we don't need to install
+ + consider moving the non-impl. parts into registryd/ bridge/ etc.
+ + complete conversion of static methods to "spi_" namespace. [Bill]
+
+test:
+ + update test-simple to do complete API tests
+ + Expand tests for AtkTable
+
Accessibility_ControllerEventMask controller_event_mask;
Accessibility_DeviceEventController device_event_controller;
Accessibility_EventListenerMode listener_mode;
+ SPIBoolean retval = FALSE;
if (!listener)
{
- return FALSE;
+ return retval;
}
device_event_controller =
listener_mode.global =
(CORBA_boolean) ((sync_type & SPI_KEYLISTENER_ALL_WINDOWS)!=0);
- Accessibility_DeviceEventController_registerKeystrokeListener (
+ retval = Accessibility_DeviceEventController_registerKeystrokeListener (
device_event_controller,
cspi_event_listener_get_corba (listener),
&key_set,
cspi_release_unref (device_event_controller);
- return TRUE;
+ return retval;
}
/**
/* A pointer to our parent object class */
static GObjectClass *spi_device_event_controller_parent_class;
+static int spi_error_code = 0;
int (*x_default_error_handler) (Display *display, XErrorEvent *error_event);
CORBA_Environment *ev);
static void spi_device_event_controller_forward_key_event (SpiDEController *controller,
const XEvent *event);
+static gboolean spi_clear_error_state (void);
#define spi_get_display() GDK_DISPLAY()
if (error->error_code == BadAccess)
{
g_message ("Could not complete key grab: grab already in use.\n");
+ spi_error_code = BadAccess;
return 0;
}
else
return is_consumed;
}
+static gboolean
+spi_clear_error_state ()
+{
+ gboolean retval = spi_error_code != 0;
+ spi_error_code = 0;
+ return retval;
+}
+
static Accessibility_DeviceEvent
spi_keystroke_from_x_key_event (XKeyEvent *x_key_event)
{
True,
GrabModeAsync,
GrabModeAsync);
+ /* TODO: set retval to FALSE if an X error occurrs here */
}
grab_mask->pending_add = FALSE;
/* TODO: check calls for errors and return FALSE if error occurs */
}
- return TRUE;
+ return ! spi_clear_error_state ();
}
/*
/* Known bugs */
-#undef KEY_IMPL_WORKS
#define WHOLE_STRING -1
static void validate_accessible (Accessible *accessible,
static int print_tree_depth = 0;
static gboolean print_tree = FALSE;
static gboolean do_poke = FALSE;
+static gboolean key_press_received = FALSE;
+static gboolean key_release_received = FALSE;
typedef struct {
gulong magic;
validate_accessible (event->source, TRUE, TRUE);
}
-#ifdef KEY_IMPL_WORKS
static SPIBoolean
key_listener_cb (const AccessibleKeystroke *stroke,
void *user_data)
{
AccessibleKeystroke *s = user_data;
-
+
*s = *stroke;
-
+
+ if (s->type == SPI_KEY_PRESSED) key_press_received = TRUE;
+ else if (s->type == SPI_KEY_RELEASED) key_release_received = TRUE;
+
return TRUE;
}
-#endif
+
static void
test_keylisteners (void)
{
-#ifdef KEY_IMPL_WORKS
int i;
AccessibleKeystroke stroke;
AccessibleKeystrokeListener *key_listener;
AccessibleKeySet *test_keyset;
-#endif
fprintf (stderr, "Testing keyboard listeners ...\n");
-#ifdef KEY_IMPL_WORKS
key_listener = SPI_createAccessibleKeystrokeListener (
key_listener_cb, &stroke);
for (i = 0; i < 3; i++) {
memset (&stroke, 0, sizeof (AccessibleKeystroke));
g_assert (SPI_generateKeyboardEvent ('=', NULL, SPI_KEY_SYM));
- while (!(stroke.type & SPI_KEY_PRESSED))
+ while (!(key_press_received))
g_main_context_iteration (NULL, TRUE);
fprintf (stderr, "p");
g_assert (!strcmp (stroke.keystring, "="));
- while (!(stroke.type & SPI_KEY_RELEASED))
+ while (!(key_release_received))
g_main_context_iteration (NULL, TRUE);
fprintf (stderr, "r ");
+ key_press_received = FALSE;
+ key_release_received = FALSE;
}
g_assert (SPI_deregisterAccessibleKeystrokeListener (key_listener, 0));
SPI_freeAccessibleKeySet (test_keyset);
fprintf (stderr, "\n");
AccessibleKeystrokeListener_unref (key_listener);
-#else
- fprintf (stderr, " key impl. impossibly broken\n");
-#endif
g_assert (SPI_generateMouseEvent (100, 100, "rel"));
g_assert (SPI_generateMouseEvent (-50, -50, "rel"));