diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rwxr-xr-x | atk/atkcomponent.c | 51 | ||||
-rwxr-xr-x | atk/atkcomponent.h | 5 | ||||
-rwxr-xr-x | atk/atkobject.c | 8 | ||||
-rwxr-xr-x | atk/atkobject.h | 6 |
6 files changed, 79 insertions, 7 deletions
@@ -3,6 +3,17 @@ * configure.in: Incremented revision and tagged GNOME_D2_BETA. + * atkobject.h: + Marked atk_object_get_layer and atk_object_get_mdi_zorder + as deprecated (should use atk_component API below). + + * atkcomponent.h: + Added atk_component_get_layer and atk_component_get_mdi_zorder + (erroneously defined in atkobject, they belong here). + + * atkcomponent.c: + Fixed some property get/set bugs. + * NEWS: updated for GNOME 2 Desktop Beta. 2002-02-11 jacob berkman <jacob@ximian.com> @@ -2,10 +2,13 @@ Changes in version 0.11 and 0.12 * Ansi-fied function prototypes and definitions; i.e. foo(void) instead of foo() [Jacob Berkman] +* Deprecated the mis-located AtkObject API for getting + layer and mdi-zorder info (should have been in AtkComponent) + and put this API into AtkComponent. Changes in version 0.9 and 0.10 -* Win32 build fixes [Hans Breuer] +* Win32 build fixes [Hans Breuer]x * Fix default signal handler name for text_caret_moved signal [Jeff Franks] * Doc improvements [Padraig O'Briain] * Fix signal prototypes in atkobject.h [Murray Cumming] diff --git a/atk/atkcomponent.c b/atk/atkcomponent.c index b67ec13..7ef5cc3 100755 --- a/atk/atkcomponent.c +++ b/atk/atkcomponent.c @@ -302,7 +302,6 @@ atk_component_get_size (AtkComponent *component, else real_height = &local_height; - iface = ATK_COMPONENT_GET_IFACE (component); g_return_if_fail (ATK_IS_COMPONENT (component)); iface = ATK_COMPONENT_GET_IFACE (component); @@ -319,6 +318,53 @@ atk_component_get_size (AtkComponent *component, } /** + * atk_component_get_layer: + * @accessible: an #AtkComponent + * + * Gets the layer of the accessible. + * + * Returns: an #AtkLayer which is the layer of the accessible + **/ +AtkLayer +atk_component_get_layer (AtkComponent *accessible) +{ + AtkComponentIface *iface; + + g_return_val_if_fail (ATK_IS_COMPONENT (accessible), ATK_LAYER_INVALID); + + iface = ATK_COMPONENT_GET_IFACE (accessible); + if (iface->get_layer) + return (iface->get_layer) (accessible); + else + return ATK_LAYER_WIDGET; +} + +/** + * atk_component_get_mdi_zorder: + * @accessible: an #AtkComponent + * + * Gets the zorder of the accessible. The value G_MININT will be returned + * if the layer of the accessible is not ATK_LAYER_MDI. + * + * Returns: a gint which is the zorder of the accessible, i.e. the depth at + * which the component is shown in relation to other components in the same + * container. + **/ +gint +atk_component_get_mdi_zorder (AtkComponent *accessible) +{ + AtkComponentIface *iface; + + g_return_val_if_fail (ATK_IS_COMPONENT (accessible), G_MININT); + + iface = ATK_COMPONENT_GET_IFACE (accessible); + if (iface->get_mdi_zorder) + return (iface->get_mdi_zorder) (accessible); + else + return G_MININT; +} + +/** * atk_component_grab_focus: * @component: an #AtkComponent * @@ -506,3 +552,6 @@ atk_component_real_get_size (AtkComponent *component, atk_component_get_extents (component, &x, &y, width, height, coord_type); } + + + diff --git a/atk/atkcomponent.h b/atk/atkcomponent.h index 4d86b9d..3428b6e 100755 --- a/atk/atkcomponent.h +++ b/atk/atkcomponent.h @@ -92,6 +92,9 @@ struct _AtkComponentIface gboolean (* set_size) (AtkComponent *component, gint width, gint height); + + AtkLayer (* get_layer) (AtkObject *accessible); + gint (* get_mdi_zorder) (AtkObject *accessible); }; GType atk_component_get_type (void); @@ -121,6 +124,8 @@ void atk_component_get_position (AtkComponent *com void atk_component_get_size (AtkComponent *component, gint *width, gint *height); +AtkLayer atk_component_get_layer (AtkComponent *component); +gint atk_component_get_mdi_zorder (AtkComponent *component); gboolean atk_component_grab_focus (AtkComponent *component); void atk_component_remove_focus_handler (AtkComponent *component, guint handler_id); diff --git a/atk/atkobject.c b/atk/atkobject.c index 96c6232..00bb08a 100755 --- a/atk/atkobject.c +++ b/atk/atkobject.c @@ -557,6 +557,7 @@ atk_object_get_role (AtkObject *accessible) * @accessible: an #AtkObject * * Gets the layer of the accessible. + * DEPRECATED: use atk_component_get_layer instead! * * Returns: an #AtkLayer which is the layer of the accessible **/ @@ -580,6 +581,7 @@ atk_object_get_layer (AtkObject *accessible) * * Gets the zorder of the accessible. The value G_MININT will be returned * if the layer of the accessible is not ATK_LAYER_MDI. + * DEPRECATED: use atk_component_get_mdi_zorder instead! * * Returns: a gint which is the zorder of the accessible, i.e. the depth at * which the component is shown in relation to other components in the same @@ -899,10 +901,12 @@ atk_object_real_get_property (GObject *object, g_value_set_int (value, atk_object_get_role (accessible)); break; case PROP_LAYER: - g_value_set_int (value, atk_object_get_role (accessible)); + if (ATK_IS_COMPONENT (accessible)) + g_value_set_int (value, atk_component_get_layer (ATK_COMPONENT (accessible))); break; case PROP_MDI_ZORDER: - g_value_set_int (value, atk_object_get_mdi_zorder (accessible)); + if (ATK_IS_COMPONENT (accessible)) + g_value_set_int (value, atk_component_get_mdi_zorder (ATK_COMPONENT (accessible))); break; case PROP_PARENT: g_value_set_object (value, atk_object_get_parent (accessible)); diff --git a/atk/atkobject.h b/atk/atkobject.h index 8202097..e69fe14 100755 --- a/atk/atkobject.h +++ b/atk/atkobject.h @@ -363,19 +363,19 @@ void (* initialize) (AtkObject * The signal handler which is executed when there is a focus event * for an object. */ - void (*focus_event) (AtkObject *accessible, + void (* focus_event) (AtkObject *accessible, gboolean focus_in); /* * The signal handler which is executed when there is a property_change * signal for an object. */ - void (*property_change) (AtkObject *accessible, + void (* property_change) (AtkObject *accessible, AtkPropertyValues *values); /* * The signal handler which is executed when there is a state_change * signal for an object. */ - void (*state_change) (AtkObject *accessible, + void (* state_change) (AtkObject *accessible, const gchar *name, gboolean state_set); /* |