summaryrefslogtreecommitdiff
path: root/atk
diff options
context:
space:
mode:
authorPadraig O'Briain <padraigo@src.gnome.org>2003-02-26 14:40:50 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2003-02-26 14:40:50 +0000
commitcd96f06d1ec770abd8c11abeafd115e8bd8ebafc (patch)
tree875f08dfb0fdc31de04b2b11ebe8c95ff785c3f8 /atk
parent7667bbd34aa6278f7a8f83e7acf798b15adc0fd3 (diff)
downloadatk-cd96f06d1ec770abd8c11abeafd115e8bd8ebafc.tar.gz
*** empty log message ***
Diffstat (limited to 'atk')
-rw-r--r--atk/atkgobjectaccessible.c7
-rwxr-xr-xatk/atkobject.c11
-rwxr-xr-xatk/atkvalue.c30
3 files changed, 40 insertions, 8 deletions
diff --git a/atk/atkgobjectaccessible.c b/atk/atkgobjectaccessible.c
index 4267c50..a6c7270 100644
--- a/atk/atkgobjectaccessible.c
+++ b/atk/atkgobjectaccessible.c
@@ -1,5 +1,5 @@
/* ATK - Accessibility Toolkit
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -85,15 +85,16 @@ atk_gobject_accessible_for_object (GObject *obj)
G_OBJECT_TYPE (obj));
accessible = atk_object_factory_create_accessible (factory,
obj);
- if (!quark_accessible_object)
+ if (!ATK_IS_GOBJECT_ACCESSIBLE (accessible))
{
/*
* The AtkObject which was created was not a AtkGObjectAccessible
*/
- quark_accessible_object = g_quark_from_static_string ("accessible-object");
g_object_weak_ref (obj,
(GWeakNotify) g_object_unref,
accessible);
+ if (!quark_accessible_object)
+ quark_accessible_object = g_quark_from_static_string ("accessible-object");
}
g_object_set_qdata (obj, quark_accessible_object, accessible);
}
diff --git a/atk/atkobject.c b/atk/atkobject.c
index 1cf28fe..c63c7ef 100755
--- a/atk/atkobject.c
+++ b/atk/atkobject.c
@@ -73,7 +73,8 @@ static void atk_object_init (AtkObject *accessible
AtkObjectClass *klass);
static AtkRelationSet* atk_object_real_ref_relation_set
(AtkObject *accessible);
-
+static void atk_object_real_initialize (AtkObject *accessible,
+ gpointer data);
static void atk_object_real_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -178,6 +179,7 @@ atk_object_class_init (AtkObjectClass *klass)
klass->get_role = atk_object_real_get_role;
klass->get_layer = atk_object_real_get_layer;
klass->get_mdi_zorder = NULL;
+ klass->initialize = atk_object_real_initialize;
klass->ref_state_set = atk_object_real_ref_state_set;
klass->set_name = atk_object_real_set_name;
klass->set_description = atk_object_real_set_description;
@@ -1583,3 +1585,10 @@ atk_object_remove_relationship (AtkObject *object,
return ret;
}
+
+static void
+atk_object_real_initialize (AtkObject *accessible,
+ gpointer data)
+{
+ return;
+}
diff --git a/atk/atkvalue.c b/atk/atkvalue.c
index 6065346..22d1b6d 100755
--- a/atk/atkvalue.c
+++ b/atk/atkvalue.c
@@ -1,5 +1,5 @@
/* ATK - Accessibility Toolkit
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,6 +17,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include <string.h>
#include "atkvalue.h"
GType
@@ -58,7 +59,14 @@ atk_value_get_current_value (AtkValue *obj,
iface = ATK_VALUE_GET_IFACE (obj);
if (iface->get_current_value)
- (iface->get_current_value) (obj, value);
+ {
+ if (G_IS_VALUE (value))
+ g_value_unset (value);
+ else
+ memset (value, 0, sizeof (*value));
+
+ (iface->get_current_value) (obj, value);
+ }
}
/**
@@ -80,7 +88,14 @@ atk_value_get_maximum_value (AtkValue *obj,
iface = ATK_VALUE_GET_IFACE (obj);
if (iface->get_maximum_value)
- (iface->get_maximum_value) (obj, value);
+ {
+ if (G_IS_VALUE (value))
+ g_value_unset (value);
+ else
+ memset (value, 0, sizeof (*value));
+
+ (iface->get_maximum_value) (obj, value);
+ }
}
/**
@@ -102,7 +117,14 @@ atk_value_get_minimum_value (AtkValue *obj,
iface = ATK_VALUE_GET_IFACE (obj);
if (iface->get_minimum_value)
- (iface->get_minimum_value) (obj, value);
+ {
+ if (G_IS_VALUE (value))
+ g_value_unset (value);
+ else
+ memset (value, 0, sizeof (*value));
+
+ (iface->get_minimum_value) (obj, value);
+ }
}
/**