and placed Layer and MDI-ZOrder API there where it belongs.
* 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>
* 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]
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);
}
/**
+ * 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
*
atk_component_get_extents (component, &x, &y, width, height, coord_type);
}
+
+
+
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);
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);
* @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
**/
*
* 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
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));
* 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);
/*