diff options
author | Padraig O'Briain <padraig.obriain@sun.com> | 2003-01-21 17:05:33 +0000 |
---|---|---|
committer | Padraig O'Briain <padraigo@src.gnome.org> | 2003-01-21 17:05:33 +0000 |
commit | 9f83aceeb8ae3ec9074082d8158cbeb8e0ab3fed (patch) | |
tree | 3356dc856f52785dba865869a712b392f5b2671f | |
parent | 28df5ba9b64a2a2210a4d4acfbb1bcb22b0f30a2 (diff) | |
download | atk-9f83aceeb8ae3ec9074082d8158cbeb8e0ab3fed.tar.gz |
Set vtable entry for default implementations (atk_text_get_range_extents):
2003-01-21 Padraig O'Briain <padraig.obriain@sun.com>
* atk/atktext.c
(atk_text_base_init): Set vtable entry for default implementations
(atk_text_get_range_extents): Omit calling default implementation
(atk_text_get_bounded_ranges): Omit calling default implementation
* atk/atkcomponent.c
(atk_component_base_init): New function to set vtable entry for
default implementations
(atk_component_ref_accessible_at_point): Omit calling default
implementation
(atk_component_contains): Omit calling default implementation
(atk_component_get_position): Omit calling default implementation
(atk_component_get_size): Omit calling default implementation
-rw-r--r-- | ChangeLog | 16 | ||||
-rwxr-xr-x | atk/atkcomponent.c | 47 | ||||
-rwxr-xr-x | atk/atktext.c | 13 |
3 files changed, 43 insertions, 33 deletions
@@ -1,5 +1,21 @@ 2003-01-21 Padraig O'Briain <padraig.obriain@sun.com> + * atk/atktext.c + (atk_text_base_init): Set vtable entry for default implementations + (atk_text_get_range_extents): Omit calling default implementation + (atk_text_get_bounded_ranges): Omit calling default implementation + + * atk/atkcomponent.c + (atk_component_base_init): New function to set vtable entry for + default implementations + (atk_component_ref_accessible_at_point): Omit calling default + implementation + (atk_component_contains): Omit calling default implementation + (atk_component_get_position): Omit calling default implementation + (atk_component_get_size): Omit calling default implementation + +2003-01-21 Padraig O'Briain <padraig.obriain@sun.com> + * atk/atkobject.c (atk_object_real_set_property): Add support for PROP_TABLE_SUMMARY and PROP_TABLE_CAPTION_OBJECT. diff --git a/atk/atkcomponent.c b/atk/atkcomponent.c index 67190e6..3b44f68 100755 --- a/atk/atkcomponent.c +++ b/atk/atkcomponent.c @@ -20,6 +20,8 @@ #include "atkcomponent.h" +static void atk_component_base_init (AtkComponentIface *class); + static gboolean atk_component_real_contains (AtkComponent *component, gint x, gint y, @@ -48,7 +50,7 @@ atk_component_get_type (void) static const GTypeInfo tinfo = { sizeof (AtkComponentIface), - (GBaseInitFunc) NULL, + (GBaseInitFunc) atk_component_base_init, (GBaseFinalizeFunc) NULL, }; @@ -59,6 +61,21 @@ atk_component_get_type (void) return type; } +static void +atk_component_base_init (AtkComponentIface *class) +{ + static gboolean initialized = FALSE; + + if (! initialized) + { + class->ref_accessible_at_point = atk_component_real_ref_accessible_at_point; + class->contains = atk_component_real_contains; + class->get_position = atk_component_real_get_position; + class->get_size = atk_component_real_get_size; + } +} + + /** * atk_component_add_focus_handler: * @component: The #AtkComponent to attach the @handler to @@ -136,12 +153,7 @@ atk_component_contains (AtkComponent *component, if (iface->contains) return (iface->contains) (component, x, y, coord_type); else - { - /* - * if this method is not overridden use the default implementation. - */ - return atk_component_real_contains (component, x, y, coord_type); - } + return FALSE; } /** @@ -171,12 +183,7 @@ atk_component_ref_accessible_at_point (AtkComponent *component, if (iface->ref_accessible_at_point) return (iface->ref_accessible_at_point) (component, x, y, coord_type); else - { - /* - * if this method is not overridden use the default implementation. - */ - return atk_component_real_ref_accessible_at_point (component, x, y, coord_type); - } + return NULL; } /** @@ -265,13 +272,6 @@ atk_component_get_position (AtkComponent *component, if (iface->get_position) (iface->get_position) (component, real_x, real_y, coord_type); - else - { - /* - * if this method is not overridden use the default implementation. - */ - atk_component_real_get_position (component, real_x, real_y, coord_type); - } } /** @@ -308,13 +308,6 @@ atk_component_get_size (AtkComponent *component, if (iface->get_size) (iface->get_size) (component, real_width, real_height); - else - { - /* - * if this method is not overridden use the default implementation. - */ - atk_component_real_get_size (component, real_width, real_height); - } } /** diff --git a/atk/atktext.c b/atk/atktext.c index bf2a814..85f376d 100755 --- a/atk/atktext.c +++ b/atk/atktext.c @@ -64,7 +64,7 @@ static const gchar *underline[] = {"none", "double", "low"}; -static void atk_text_base_init (gpointer *g_class); +static void atk_text_base_init (AtkTextIface *class); static void atk_text_real_get_range_extents (AtkText *text, gint start_offset, @@ -104,7 +104,7 @@ atk_text_get_type () } static void -atk_text_base_init (gpointer *g_class) +atk_text_base_init (AtkTextIface *class) { static gboolean initialized = FALSE; @@ -114,7 +114,10 @@ atk_text_base_init (gpointer *g_class) * Note that text_changed signal supports details "insert", "delete", * possibly "replace". */ - + + class->get_range_extents = atk_text_real_get_range_extents; + class->get_bounded_ranges = atk_text_real_get_bounded_ranges; + atk_text_signals[TEXT_CHANGED] = g_signal_new ("text_changed", ATK_TYPE_TEXT, @@ -913,8 +916,6 @@ atk_text_get_range_extents (AtkText *text, if (iface->get_range_extents) (*(iface->get_range_extents)) (text, start_offset, end_offset, coord_type, rect); - else - atk_text_real_get_range_extents (text, start_offset, end_offset, coord_type, rect); } /** @@ -947,7 +948,7 @@ atk_text_get_bounded_ranges (AtkText *text, if (iface->get_bounded_ranges) return (*(iface->get_bounded_ranges)) (text, rect, coord_type, x_clip_type, y_clip_type); else - return atk_text_real_get_bounded_ranges (text, rect, coord_type, x_clip_type, y_clip_type); + return NULL; } /** |