at-spi bits ...
- From: Michael Meeks <michael trna ximian com>
- To: Bill Haneman <bill haneman sun com>
- Cc: Gnome Accessibility List <gnome-accessibility-list gnome org>
- Subject: at-spi bits ...
- Date: Wed, 21 Nov 2001 01:59:21 -0500 (EST)
Hi Bill,
Some minor bits; a cleanup patch for some cruft it seems I created
in accessx-gui, and the new base.[ch] that I want everything that holds an
AtkObject ref to derive from ( pretty much all of libspi/ ) to save code
duplication, and poking at parent structurs.
Also - strangely it seems after running some of test/ my meta key
has gone very very odd, refusing to work in emacs or somesuch; very
strange; hmm.
May I commit ?
Michael.
? billh
? .README.swp
? docs/tmpl
? libspi/base.h
? libspi/base.c
? registryd/Accessibility_Registry.server
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/at-spi/ChangeLog,v
retrieving revision 1.75
diff -u -p -u -r1.75 ChangeLog
--- ChangeLog 2001/11/21 00:14:53 1.75
+++ ChangeLog 2001/11/21 06:55:42
@@ -1,3 +1,9 @@
+2001-11-21 Michael Meeks <michael ximian com>
+
+ * test/accessx-gui.c: s/spi_value/value/ - doh.
+
+ * libspi/base.[ch]: add.
+
2001-18-11 Bill Haneman <bill haneman sun com>
* idl/Accessible.idl:
Index: libspi/Makefile.am
===================================================================
RCS file: /cvs/gnome/at-spi/libspi/Makefile.am,v
retrieving revision 1.18
diff -u -p -u -r1.18 Makefile.am
--- libspi/Makefile.am 2001/11/20 04:32:31 1.18
+++ libspi/Makefile.am 2001/11/21 06:55:43
@@ -17,6 +17,7 @@ libspiinclude_HEADERS = Accessibility.h
accessibleeventlistener.h \
action.h \
application.h \
+ base.h \
component.h \
desktop.h \
deviceeventcontroller.h \
Index: test/accessx-gui.c
===================================================================
RCS file: /cvs/gnome/at-spi/test/accessx-gui.c,v
retrieving revision 1.1
diff -u -p -u -r1.1 accessx-gui.c
--- test/accessx-gui.c 2001/11/15 00:54:55 1.1
+++ test/accessx-gui.c 2001/11/21 06:55:44
@@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include <string.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
@@ -122,10 +123,11 @@ init_xkb ()
return True;
}
-static AccessXControlStruct *control_struct_new (unsigned int mask,
- short int *val_ptr,
- char *label,
- char *val_label)
+static AccessXControlStruct *
+control_struct_new (unsigned int mask,
+ short int *val_ptr,
+ char *label,
+ char *val_label)
{
AccessXControlStruct *control = g_new0 (AccessXControlStruct, 1);
control->mask = mask;
@@ -242,7 +244,7 @@ basic_toggles_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -317,7 +319,7 @@ basic_toggles_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -351,7 +353,7 @@ basic_toggles_box ()
static GtkWidget*
repeat_keys_box ()
{
- GtkWidget *outer_hbox, *hbox, *vbox, *label, *button, *range, *frame;
+ GtkWidget *outer_hbox, *vbox, *label, *button, *range, *frame;
GtkAdjustment *adjustment;
AccessXControlStruct *control =
control_struct_new (XkbRepeatKeysMask, &xkb->ctrls->repeat_delay, NULL, NULL);
@@ -392,7 +394,7 @@ repeat_keys_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -409,7 +411,7 @@ repeat_keys_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -438,7 +440,7 @@ repeat_keys_box ()
static GtkWidget*
mouse_keys_box ()
{
- GtkWidget *outer_hbox, *hbox, *vbox, *label, *button, *range, *frame;
+ GtkWidget *outer_hbox, *vbox, *label, *button, *range, *frame;
GtkAdjustment *adjustment;
AccessXControlStruct *control =
control_struct_new (XkbMouseKeysMask, &xkb->ctrls->mk_delay, NULL, NULL);
@@ -480,7 +482,7 @@ mouse_keys_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -497,7 +499,7 @@ mouse_keys_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -514,7 +516,7 @@ mouse_keys_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -531,7 +533,7 @@ mouse_keys_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -576,7 +578,7 @@ mouse_keys_box ()
static GtkWidget*
timeout_box ()
{
- GtkWidget *outer_hbox, *hbox, *vbox, *label, *button, *range;
+ GtkWidget *hbox, *label, *button, *range;
GtkAdjustment *adjustment;
AccessXControlStruct *control =
control_struct_new (XkbAccessXTimeoutMask, &xkb->ctrls->ax_timeout, NULL, NULL);
@@ -603,7 +605,7 @@ timeout_box ()
"GtkScale::digits", 0,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, control,
NULL);
@@ -671,7 +673,7 @@ create_gui ()
static void
create_gui_x ()
{
- GtkWidget *window, *button, *container, *hbox, *vbox, *range, *frame, *label;
+ GtkWidget *window, *button, *container, *hbox, *range;
GtkAdjustment *adjustment;
int i;
static AccessXControlStruct* controls[N_CONTROLS];
@@ -691,6 +693,7 @@ create_gui_x ()
"GtkWidget::visible", TRUE,
NULL);
+ i = 0; /* FIXME: this looks bogus */
button = g_object_connect (gtk_widget_new (gtk_check_button_get_type (),
"GtkButton::label", "Access X Timeout",
"GtkWidget::parent", hbox,
@@ -707,7 +710,7 @@ create_gui_x ()
"GtkWidget::visible", TRUE,
"GtkScale::adjustment", adjustment,
NULL),
- "signal::spi_value_changed",
+ "signal::value_changed",
set_accessx_control_value, controls[i],
NULL);
@@ -756,4 +759,6 @@ main(int argc, char **argv)
create_gui ();
gtk_main ();
+
+ return 0;
}
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
#include <libspi/base.h>
/* A pointer to our parent object class */
static GObjectClass *spi_base_parent_class;
static void
spi_base_dispose (GObject *object)
{
SpiBase *base = SPI_BASE (object);
if (base->atko) {
g_object_unref (base->atko);
base->atko = NULL;
}
spi_base_parent_class->dispose (object);
}
static void
spi_base_class_init (GObjectClass *klass)
{
spi_base_parent_class = g_type_klass_peek_parent (klass);
klass->dispose = spi_base_dispose;
}
static void
spi_base_init (SpiBase *base)
{
}
BONOBO_TYPE_FUNC (SpiBase, BONOBO_TYPE_OBJECT, spi_base);
gpointer
spi_base_construct (SpiBase *base,
AtkObject *o)
{
g_return_val_if_fail (ATK_IS_OBJECT (o), NULL);
g_return_val_if_fail (SPI_IS_BASE (base), NULL);
base->atko = g_object_ref (o);
}
AtkObject *
spi_base_get_atk_object (SpiBase *base)
{
g_return_val_if_fail (SPI_IS_BASE (base), NULL);
return base->atko;
}
/* AT-SPI : Assistive Technology Service Provider Interface
* Copyright 2001 Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef SPI_BASE_H_
#define SPI_BASE_H_
#include <glib/gmacros.h>
#include <bonobo/bonobo-object.h>
#include <atk/atkobject.h>
G_BEGIN_DECLS
#define SPI_ACCESSIBLE_TYPE (spi_accessible_get_type ())
#define SPI_ACCESSIBLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_ACCESSIBLE_TYPE, SpiAccessible))
#define SPI_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_ACCESSIBLE_TYPE, SpiAccessibleClass))
#define IS_SPI_ACCESSIBLE(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_ACCESSIBLE_TYPE))
#define IS_SPI_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_ACCESSIBLE_TYPE))
typedef struct {
BonoboObject parent;
AtkObject *atko;
} SpiBase;
typedef struct {
BonoboObjectClass parent_class;
} SpiBaseClass;
GType spi_base_get_type (void);
gpointer spi_base_construct (SpiBase *base,
AtkObject *o);
AtkObject *spi_base_get_atk_object (SpiBase *base);
G_END_DECLS
#endif /* SPI_BASE_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]