[java-atk-wrapper/wip] JNI: Create jaw_impl_get_object_hash_table



commit 3c73d3a72376f2c75aa967b2f1e1cd7645b328ee
Author: Magdalen Berns <m berns thismagpie com>
Date:   Wed Jun 24 16:17:12 2015 +0100

    JNI: Create jaw_impl_get_object_hash_table
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=751441

 jni/src/jawimpl.c   |    6 ++++++
 jni/src/jawimpl.h   |    2 ++
 jni/src/jawobject.c |    2 +-
 3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/jni/src/jawimpl.c b/jni/src/jawimpl.c
index e09d3b1..6eede1d 100644
--- a/jni/src/jawimpl.c
+++ b/jni/src/jawimpl.c
@@ -141,6 +141,12 @@ object_table_remove(JNIEnv *jniEnv, jobject ac)
   g_hash_table_remove(objectTable, GINT_TO_POINTER(hash_key));
 }
 
+GHashTable*
+jaw_impl_get_object_hash_table(void)
+{
+  return objectTable;
+}
+
 static void
 aggregate_interface(JNIEnv *jniEnv, JawObject *jaw_obj, guint tflag)
 {
diff --git a/jni/src/jawimpl.h b/jni/src/jawimpl.h
index be88935..fdd4900 100644
--- a/jni/src/jawimpl.h
+++ b/jni/src/jawimpl.h
@@ -51,6 +51,8 @@ struct _JawImpl
 
 JawImpl* jaw_impl_get_instance(JNIEnv*, jobject);
 JawImpl* jaw_impl_find_instance(JNIEnv*, jobject);
+GHashTable* jaw_impl_get_object_hash_table(void);
+
 GType jaw_impl_get_type (guint);
 
 struct _JawImplClass
diff --git a/jni/src/jawobject.c b/jni/src/jawobject.c
index 4e07107..4be733e 100644
--- a/jni/src/jawobject.c
+++ b/jni/src/jawobject.c
@@ -55,7 +55,6 @@ static const gchar *jaw_object_get_object_locale (AtkObject *atk_obj);
 
 static gpointer parent_class = NULL;
 static GHashTable *object_table = NULL;
-
 static JawObject* jaw_object_table_lookup (JNIEnv *jniEnv, jobject ac);
 
 enum {
@@ -535,6 +534,7 @@ static const gchar *jaw_object_get_object_locale (AtkObject *atk_obj)
 static JawObject*
 jaw_object_table_lookup (JNIEnv *jniEnv, jobject ac)
 {
+  object_table = jaw_impl_get_object_hash_table();
   jclass classAccessibleContext = (*jniEnv)->FindClass( jniEnv,
                                                        "javax/accessibility/AccessibleContext" );
   jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv,


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