AtkCoordType coord_type)
{
AtkComponentIface *iface = NULL;
+ gint local_x, local_y, local_width, local_height;
+ gint *real_x, *real_y, *real_width, *real_height;
+
g_return_if_fail (ATK_IS_COMPONENT (component));
+ if (x)
+ real_x = x;
+ else
+ real_x = &local_x;
+ if (y)
+ real_y = y;
+ else
+ real_y = &local_y;
+ if (width)
+ real_width = width;
+ else
+ real_width = &local_width;
+ if (height)
+ real_height = height;
+ else
+ real_height = &local_height;
+
iface = ATK_COMPONENT_GET_IFACE (component);
if (iface->get_extents)
- (iface->get_extents) (component, x, y, width, height, coord_type);
+ (iface->get_extents) (component, real_x, real_y, real_width, real_height, coord_type);
}
/**
AtkCoordType coord_type)
{
AtkComponentIface *iface = NULL;
+ gint local_x, local_y;
+ gint *real_x, *real_y;
+
g_return_if_fail (ATK_IS_COMPONENT (component));
+ if (x)
+ real_x = x;
+ else
+ real_x = &local_x;
+ if (y)
+ real_y = y;
+ else
+ real_y = &local_y;
+
iface = ATK_COMPONENT_GET_IFACE (component);
if (iface->get_position)
- (iface->get_position) (component, x, y, coord_type);
+ (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, x, y, coord_type);
+ atk_component_real_get_position (component, real_x, real_y, coord_type);
}
}
gint *height)
{
AtkComponentIface *iface = NULL;
+ gint local_width, local_height;
+ gint *real_width, *real_height;
+
+ g_return_if_fail (ATK_IS_COMPONENT (component));
+
+ if (width)
+ real_width = width;
+ else
+ real_width = &local_width;
+ if (height)
+ real_height = height;
+ 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);
if (iface->get_size)
- (iface->get_size) (component, width, height);
+ (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, width, height);
+ atk_component_real_get_size (component, real_width, real_height);
}
}
gint end_offset)
{
AtkTextIface *iface;
-
+
g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
iface = ATK_TEXT_GET_IFACE (text);
* @text: an #AtkText
* @offset: position
* @boundary_type: An #AtkTextBoundary
- * @startOffset: the start offset of the returned string.
- * @endOffset: the end offset of the returned string.
+ * @start_offset: the start offset of the returned string.
+ * @end_offset: the end offset of the returned string.
*
* Gets the specified text.
* If the boundary type is ATK_TEXT_BOUNDARY_WORD_START or
atk_text_get_text_after_offset (AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
- gint *startOffset,
- gint *endOffset)
+ gint *start_offset,
+ gint *end_offset)
{
AtkTextIface *iface;
+ gint local_start_offset, local_end_offset;
+ gint *real_start_offset, *real_end_offset;
g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+ if (start_offset)
+ real_start_offset = start_offset;
+ else
+ real_start_offset = &local_start_offset;
+ if (end_offset)
+ real_end_offset = end_offset;
+ else
+ real_end_offset = &local_end_offset;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_text_after_offset)
- return (*(iface->get_text_after_offset)) (text, offset, boundary_type, startOffset, endOffset);
+ return (*(iface->get_text_after_offset)) (text, offset, boundary_type, real_start_offset, real_end_offset);
else
return NULL;
}
* @text: an #AtkText
* @offset: position
* @boundary_type: An #AtkTextBoundary
- * @startOffset: the start offset of the returned string.
- * @endOffset: the end offset of the returned string.
+ * @start_offset: the start offset of the returned string.
+ * @end_offset: the end offset of the returned string.
*
* Gets the specified text.
* If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START or
atk_text_get_text_at_offset (AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
- gint *startOffset,
- gint *endOffset)
+ gint *start_offset,
+ gint *end_offset)
{
AtkTextIface *iface;
+ gint local_start_offset, local_end_offset;
+ gint *real_start_offset, *real_end_offset;
g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+ if (start_offset)
+ real_start_offset = start_offset;
+ else
+ real_start_offset = &local_start_offset;
+ if (end_offset)
+ real_end_offset = end_offset;
+ else
+ real_end_offset = &local_end_offset;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_text_at_offset)
- return (*(iface->get_text_at_offset)) (text, offset, boundary_type, startOffset, endOffset);
+ return (*(iface->get_text_at_offset)) (text, offset, boundary_type, real_start_offset, real_end_offset);
else
return NULL;
}
* @text: an #AtkText
* @offset: position
* @boundary_type: An #AtkTextBoundary
- * @startOffset: the start offset of the returned string.
- * @endOffset: the end offset of the returned string.
+ * @start_offset: the start offset of the returned string.
+ * @end_offset: the end offset of the returned string.
*
* Gets the specified text.
* If the boundary type is ATK_TEXT_BOUNDARY_WORD_START or
atk_text_get_text_before_offset (AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
- gint *startOffset,
- gint *endOffset)
+ gint *start_offset,
+ gint *end_offset)
{
AtkTextIface *iface;
+ gint local_start_offset, local_end_offset;
+ gint *real_start_offset, *real_end_offset;
g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+ if (start_offset)
+ real_start_offset = start_offset;
+ else
+ real_start_offset = &local_start_offset;
+ if (end_offset)
+ real_end_offset = end_offset;
+ else
+ real_end_offset = &local_end_offset;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_text_before_offset)
- return (*(iface->get_text_before_offset)) (text, offset, boundary_type, startOffset, endOffset);
+ return (*(iface->get_text_before_offset)) (text, offset, boundary_type, real_start_offset, real_end_offset);
else
return NULL;
}
AtkCoordType coords)
{
AtkTextIface *iface;
+ gint local_x, local_y, local_width, local_height;
+ gint *real_x, *real_y, *real_width, *real_height;
g_return_if_fail (ATK_IS_TEXT (text));
+ if (x)
+ real_x = x;
+ else
+ real_x = &local_x;
+ if (y)
+ real_y = y;
+ else
+ real_y = &local_y;
+ if (width)
+ real_width = width;
+ else
+ real_width = &local_width;
+ if (height)
+ real_height = height;
+ else
+ real_height = local_height;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_character_extents)
- (*(iface->get_character_extents)) (text, offset, x, y, width, height, coords);
+ (*(iface->get_character_extents)) (text, offset, real_x, real_y, real_width, real_height, coords);
else
{
- *x = 0;
- *x = 0;
- *width = 0;
- *height = 0;
+ *real_x = 0;
+ *real_y = 0;
+ *real_width = 0;
+ *real_height = 0;
}
}
gint *end_offset)
{
AtkTextIface *iface;
+ gint local_start_offset, local_end_offset;
+ gint *real_start_offset, *real_end_offset;
g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+ if (start_offset)
+ real_start_offset = start_offset;
+ else
+ real_start_offset = &local_start_offset;
+ if (end_offset)
+ real_end_offset = end_offset;
+ else
+ real_start_offset = &local_end_offset;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->ref_run_attributes)
- return (*(iface->ref_run_attributes)) (text, offset, start_offset, end_offset);
+ return (*(iface->ref_run_attributes)) (text, offset, real_start_offset, real_end_offset);
else
return NULL;
}
* Returns: the selected text.
**/
gchar*
-atk_text_get_selection (AtkText *text, gint selection_num,
- gint *start_offset, gint *end_offset)
+atk_text_get_selection (AtkText *text,
+ gint selection_num,
+ gint *start_offset,
+ gint *end_offset)
{
AtkTextIface *iface;
+ gint local_start_offset, local_end_offset;
+ gint *real_start_offset, *real_end_offset;
g_return_val_if_fail (ATK_IS_TEXT (text), NULL);
+ if (start_offset)
+ real_start_offset = start_offset;
+ else
+ real_start_offset = &local_start_offset;
+ if (end_offset)
+ real_end_offset = end_offset;
+ else
+ real_start_offset = &local_end_offset;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_selection)
{
return (*(iface->get_selection)) (text, selection_num,
- start_offset, end_offset);
+ real_start_offset, real_end_offset);
}
else
return NULL;
* Returns: %TRUE if success, %FALSE otherwise
**/
gboolean
-atk_text_add_selection (AtkText *text, gint start_offset,
- gint end_offset)
+atk_text_add_selection (AtkText *text,
+ gint start_offset,
+ gint end_offset)
{
AtkTextIface *iface;
* Returns: %TRUE if success, %FALSE otherwise
**/
gboolean
-atk_text_remove_selection (AtkText *text, gint selection_num)
+atk_text_remove_selection (AtkText *text,
+ gint selection_num)
{
AtkTextIface *iface;
* Returns: %TRUE if success, %FALSE otherwise
**/
gboolean
-atk_text_set_selection (AtkText *text, gint selection_num,
- gint start_offset, gint end_offset)
+atk_text_set_selection (AtkText *text,
+ gint selection_num,
+ gint start_offset,
+ gint end_offset)
{
AtkTextIface *iface;