[java-atk-wrapper] TODO atk interfaces



commit 0a38949a35f1a088da7f588ca4f35527f09056c7
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Sun Jul 28 11:25:09 2019 +0200

    TODO atk interfaces

 jni/src/jawaction.c       |  1 +
 jni/src/jawcomponent.c    | 13 +++++++++++--
 jni/src/jaweditabletext.c |  2 +-
 jni/src/jawhyperlink.c    |  2 ++
 jni/src/jawimage.c        |  3 ++-
 jni/src/jawobject.c       | 18 ++++++++++--------
 jni/src/jawtable.c        | 15 ++++++++-------
 jni/src/jawtablecell.c    |  8 +++++---
 jni/src/jawtext.c         | 16 +++++++++++++---
 jni/src/jawvalue.c        | 10 ++++++++--
 10 files changed, 61 insertions(+), 27 deletions(-)
---
diff --git a/jni/src/jawaction.c b/jni/src/jawaction.c
index bbe8dec..2f1824a 100644
--- a/jni/src/jawaction.c
+++ b/jni/src/jawaction.c
@@ -46,6 +46,7 @@ jaw_action_interface_init (AtkActionIface *iface, gpointer data)
   iface->do_action = jaw_action_do_action;
   iface->get_n_actions = jaw_action_get_n_actions;
   iface->get_description = jaw_action_get_description;
+  // TODO: iface->get_name: use description
   iface->get_keybinding = jaw_action_get_keybinding;
   iface->set_description = jaw_action_set_description;
   iface->get_localized_name = jaw_action_get_localized_name;
diff --git a/jni/src/jawcomponent.c b/jni/src/jawcomponent.c
index 90d0622..9a9fc05 100644
--- a/jni/src/jawcomponent.c
+++ b/jni/src/jawcomponent.c
@@ -60,13 +60,22 @@ void
 jaw_component_interface_init (AtkComponentIface *iface, gpointer data)
 {
   JAW_DEBUG_ALL("%p,%p", iface, data);
+  // deprecated: iface->add_focus_handler
   iface->contains = jaw_component_contains;
   iface->ref_accessible_at_point = jaw_component_ref_accessible_at_point;
   iface->get_extents = jaw_component_get_extents;
+  // done by atk: iface->get_position
+  // done by atk: iface->get_size
   iface->grab_focus = jaw_component_grab_focus;
-  iface->get_layer = jaw_component_get_layer;
-  iface->get_mdi_zorder = NULL; /*jaw_component_get_mdi_zorder;*/
+  // deprecated: iface->remove_focus_handler
   iface->set_extents = jaw_component_set_extents;
+  // TODO: iface->set_position similar to set_extents
+  // TODO: iface->set_size similar to set_extents
+  iface->get_layer = jaw_component_get_layer;
+  iface->get_mdi_zorder = NULL; /* TODO: jaw_component_get_mdi_zorder;*/
+  // TODO: missing java support for iface->get_alpha
+  // TODO: missing java support for iface->scroll_to
+  // TODO: missing java support for iface->scroll_to_point
 }
 
 gpointer
diff --git a/jni/src/jaweditabletext.c b/jni/src/jaweditabletext.c
index 4415d17..61954e6 100644
--- a/jni/src/jaweditabletext.c
+++ b/jni/src/jaweditabletext.c
@@ -54,13 +54,13 @@ void
 jaw_editable_text_interface_init (AtkEditableTextIface *iface, gpointer data)
 {
   JAW_DEBUG_ALL("%p,%p", iface, data);
+  iface->set_run_attributes = jaw_editable_text_set_run_attributes;
   iface->set_text_contents = jaw_editable_text_set_text_contents;
   iface->insert_text = jaw_editable_text_insert_text;
   iface->copy_text = jaw_editable_text_copy_text;
   iface->cut_text = jaw_editable_text_cut_text;
   iface->delete_text = jaw_editable_text_delete_text;
   iface->paste_text = jaw_editable_text_paste_text;
-  iface->set_run_attributes = jaw_editable_text_set_run_attributes;
 }
 
 gpointer
diff --git a/jni/src/jawhyperlink.c b/jni/src/jawhyperlink.c
index 68cfb02..69cdc74 100644
--- a/jni/src/jawhyperlink.c
+++ b/jni/src/jawhyperlink.c
@@ -63,6 +63,8 @@ jaw_hyperlink_class_init (JawHyperlinkClass *klass)
        atk_hyperlink_class->get_start_index = jaw_hyperlink_get_start_index;
        atk_hyperlink_class->is_valid = jaw_hyperlink_is_valid;
        atk_hyperlink_class->get_n_anchors = jaw_hyperlink_get_n_anchors;
+       // TODO: missing java support for atk_hyperlink_class->link_state
+       // TODO: missing java support for atk_hyperlink_class->is_selected_link
 }
 
 static void
diff --git a/jni/src/jawimage.c b/jni/src/jawimage.c
index f6c7237..9faf9b8 100644
--- a/jni/src/jawimage.c
+++ b/jni/src/jawimage.c
@@ -43,8 +43,9 @@ jaw_image_interface_init (AtkImageIface *iface, gpointer data)
        JAW_DEBUG_ALL("%p, %p", iface, data);
        iface->get_image_position = jaw_image_get_image_position;
        iface->get_image_description = jaw_image_get_image_description;
-       iface->set_image_description = NULL;
        iface->get_image_size = jaw_image_get_image_size;
+       iface->set_image_description = NULL; /* TODO */
+       // TODO: iface->get_image_locale from AccessibleContext.getLocale()
 }
 
 gpointer
diff --git a/jni/src/jawobject.c b/jni/src/jawobject.c
index f05091f..425305e 100644
--- a/jni/src/jawobject.c
+++ b/jni/src/jawobject.c
@@ -99,21 +99,23 @@ jaw_object_class_init (JawObjectClass *klass)
   parent_class = g_type_class_peek_parent (klass);
 
   atk_class->get_name = jaw_object_get_name;
-  atk_class->set_name = jaw_object_set_name;
   atk_class->get_description = jaw_object_get_description;
-  atk_class->set_description = jaw_object_set_description;
+  atk_class->get_parent = jaw_object_get_parent;
   atk_class->get_n_children = jaw_object_get_n_children;
+  atk_class->ref_child = jaw_object_ref_child;
   atk_class->get_index_in_parent = jaw_object_get_index_in_parent;
+  atk_class->ref_relation_set = jaw_object_ref_relation_set;
   atk_class->get_role = jaw_object_get_role;
-  atk_class->get_parent = jaw_object_get_parent;
+  // Done by atk: atk_class->get_layer
+  // TODO: missing java support for atk_class->get_mdi_zorder
+  atk_class->ref_state_set = jaw_object_ref_state_set;
+  atk_class->set_name = jaw_object_set_name;
+  atk_class->set_description = jaw_object_set_description;
   atk_class->set_parent = jaw_object_set_parent;
   atk_class->set_role = jaw_object_set_role;
-  atk_class->get_object_locale = jaw_object_get_object_locale;
-  atk_class->ref_relation_set = jaw_object_ref_relation_set;
-  atk_class->ref_child = jaw_object_ref_child;
-
-  atk_class->ref_state_set = jaw_object_ref_state_set;
   atk_class->initialize = jaw_object_initialize;
+  // TODO: atk_class->get_attributes
+  atk_class->get_object_locale = jaw_object_get_object_locale;
 
   jaw_window_signals[ACTIVATE]    = jaw_window_add_signal ("activate", klass);
   jaw_window_signals[CREATE]      = jaw_window_add_signal ("create", klass);
diff --git a/jni/src/jawtable.c b/jni/src/jawtable.c
index 9c2cabf..0383d3b 100644
--- a/jni/src/jawtable.c
+++ b/jni/src/jawtable.c
@@ -67,6 +67,7 @@ jaw_table_interface_init (AtkTableIface *iface, gpointer data)
 {
   JAW_DEBUG_ALL("%p, %p", iface, data);
   iface->ref_at = jaw_table_ref_at;
+  // TODO: iface->get_index_at
   iface->get_column_at_index = jaw_table_get_column_at_index;
   iface->get_row_at_index = jaw_table_get_row_at_index;
   iface->get_n_columns = jaw_table_get_n_columns;
@@ -75,10 +76,16 @@ jaw_table_interface_init (AtkTableIface *iface, gpointer data)
   iface->get_row_extent_at = jaw_table_get_row_extent_at;
   iface->get_caption = jaw_table_get_caption;
   iface->get_column_description = jaw_table_get_column_description;
-  iface->get_row_description = jaw_table_get_row_description;
   iface->get_column_header = jaw_table_get_column_header;
+  iface->get_row_description = jaw_table_get_row_description;
   iface->get_row_header = jaw_table_get_row_header;
   iface->get_summary = jaw_table_get_summary;
+  iface->set_caption = jaw_table_set_caption;
+  iface->set_column_description = jaw_table_set_column_description;
+  iface->set_column_header = jaw_table_set_column_header;
+  iface->set_row_description = jaw_table_set_row_description;
+  iface->set_row_header = jaw_table_set_row_header;
+  iface->set_summary = jaw_table_set_summary;
   iface->get_selected_columns = jaw_table_get_selected_columns;
   iface->get_selected_rows = jaw_table_get_selected_rows;
   iface->is_column_selected = jaw_table_is_column_selected;
@@ -88,12 +95,6 @@ jaw_table_interface_init (AtkTableIface *iface, gpointer data)
   iface->remove_row_selection = jaw_table_remove_row_selection;
   iface->add_column_selection = jaw_table_add_column_selection;
   iface->remove_column_selection = jaw_table_remove_column_selection;
-  iface->set_row_description = jaw_table_set_row_description;
-  iface->set_column_description = jaw_table_set_column_description;
-  iface->set_row_header = jaw_table_set_row_header;
-  iface->set_column_header = jaw_table_set_column_header;
-  iface->set_caption = jaw_table_set_caption;
-  iface->set_summary = jaw_table_set_summary;
 }
 
 gpointer
diff --git a/jni/src/jawtablecell.c b/jni/src/jawtablecell.c
index cce442f..9a40def 100644
--- a/jni/src/jawtablecell.c
+++ b/jni/src/jawtablecell.c
@@ -42,11 +42,13 @@ void
 jaw_table_cell_interface_init (AtkTableCellIface *iface, gpointer data)
 {
   JAW_DEBUG_ALL("%p, %p", iface, data);
-  iface->get_table = jaw_table_cell_get_table;
+  iface->get_column_span = jaw_table_cell_get_column_span;
+  // TODO: iface->get_column_header_cells
   iface->get_position = jaw_table_cell_get_position;
-  iface->get_row_column_span = jaw_table_cell_get_row_column_span;
   iface->get_row_span = jaw_table_cell_get_row_span;
-  iface->get_column_span = jaw_table_cell_get_column_span;
+  // TODO: iface->get_row_header_cells
+  iface->get_row_column_span = jaw_table_cell_get_row_column_span;
+  iface->get_table = jaw_table_cell_get_table;
 }
 
 gpointer
diff --git a/jni/src/jawtext.c b/jni/src/jawtext.c
index 260903f..4fab54e 100644
--- a/jni/src/jawtext.c
+++ b/jni/src/jawtext.c
@@ -82,25 +82,35 @@ typedef struct _TextData {
   jstring jstrText;
 }TextData;
 
-//FIXME we need to include atk_text_get_string_at_offset()
 void
 jaw_text_interface_init (AtkTextIface *iface, gpointer data)
 {
   JAW_DEBUG_ALL("%p, %p", iface, data);
   iface->get_text = jaw_text_get_text;
-  iface->get_character_at_offset = jaw_text_get_character_at_offset;
+  // TODO: iface->get_text_after_offset
   iface->get_text_at_offset = jaw_text_get_text_at_offset;
+  iface->get_character_at_offset = jaw_text_get_character_at_offset;
+  // TODO: iface->get_text_before_offset
   iface->get_caret_offset = jaw_text_get_caret_offset;
+  // TODO: iface->get_run_attributes by iterating getCharacterAttribute or using getTextSequenceAt with 
ATTRIBUTE_RUN
+  // TODO: iface->get_default_attributes
   iface->get_character_extents = jaw_text_get_character_extents;
   iface->get_character_count = jaw_text_get_character_count;
   iface->get_offset_at_point = jaw_text_get_offset_at_point;
-  iface->get_range_extents = jaw_text_get_range_extents;
   iface->get_n_selections = jaw_text_get_n_selections;
   iface->get_selection = jaw_text_get_selection;
   iface->add_selection = jaw_text_add_selection;
   iface->remove_selection = jaw_text_remove_selection;
   iface->set_selection = jaw_text_set_selection;
   iface->set_caret_offset = jaw_text_set_caret_offset;
+
+  iface->get_range_extents = jaw_text_get_range_extents;
+  // TODO: iface->get_bounded_ranges from getTextBounds
+  // TODO: iface->get_string_at_offset
+
+  // TODO: missing java support for:
+  // iface->scroll_substring_to
+  // iface->scroll_substring_to_point
 }
 
 gpointer
diff --git a/jni/src/jawvalue.c b/jni/src/jawvalue.c
index c95a9d2..5be92a9 100644
--- a/jni/src/jawvalue.c
+++ b/jni/src/jawvalue.c
@@ -41,9 +41,15 @@ jaw_value_interface_init (AtkValueIface *iface, gpointer data)
 {
   JAW_DEBUG_ALL("%p, %p", iface, data);
   iface->get_current_value = jaw_value_get_current_value;
-  iface->set_value = jaw_value_set_value;
-  iface->get_increment = jaw_value_get_increment;
+  // deprecated: iface->get_maximum_value
+  // deprecated: iface->get_minimum_value
+  // deprecated: iface->set_current_value
+  // deprecated: iface->get_minimum_increment
+  // TODO: get_value_and_text
   iface->get_range = jaw_value_get_range;
+  iface->get_increment = jaw_value_get_increment;
+  // TODO: missing java support for iface->get_sub_ranges
+  iface->set_value = jaw_value_set_value;
 }
 
 gpointer


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