Commit df89b7a1 authored by Mike Wey's avatar Mike Wey

Update Atk to 2.32.

parent e14091fb
......@@ -101,7 +101,7 @@ Glib | 2.60
GObject | 2.60
Gio | 2.60
Pango | 1.42
Atk | 2.28
Atk | 2.32
Gdk-pixbuf | 2.36
Cairo | 1.12.2
GtksourceView | 3.24
......
......@@ -196,6 +196,38 @@ public interface ComponentIF{
*/
public void removeFocusHandler(uint handlerId);
/**
* Makes @component visible on the screen by scrolling all necessary parents.
*
* Contrary to atk_component_set_position, this does not actually move
* @component in its parent, this only makes the parents scroll so that the
* object shows up on the screen, given its current position within the parents.
*
* Params:
* type = specify where the object should be made visible.
*
* Returns: whether scrolling was successful.
*
* Since: 2.30
*/
public bool scrollTo(AtkScrollType type);
/**
* Makes an object visible on the screen at a given position by scrolling all
* necessary parents.
*
* Params:
* coords = specify whether coordinates are relative to the screen or to the
* parent object.
* x = x-position where to scroll to
* y = y-position where to scroll to
*
* Returns: whether scrolling was successful.
*
* Since: 2.30
*/
public bool scrollToPoint(AtkCoordType coords, int x, int y);
/**
* Sets the extents of @component.
*
......@@ -212,13 +244,16 @@ public interface ComponentIF{
public bool setExtents(int x, int y, int width, int height, AtkCoordType coordType);
/**
* Sets the postition of @component.
* Sets the position of @component.
*
* Contrary to atk_component_scroll_to, this does not trigger any scrolling,
* this just moves @component in its parent.
*
* Params:
* x = x coordinate
* y = y coordinate
* coordType = specifies whether the coordinates are relative to the screen
* or to the components top level window
* or to the component's top level window
*
* Returns: %TRUE or %FALSE whether or not the position was set or not
*/
......
......@@ -233,6 +233,44 @@ public template ComponentT(TStruct)
atk_component_remove_focus_handler(getComponentStruct(), handlerId);
}
/**
* Makes @component visible on the screen by scrolling all necessary parents.
*
* Contrary to atk_component_set_position, this does not actually move
* @component in its parent, this only makes the parents scroll so that the
* object shows up on the screen, given its current position within the parents.
*
* Params:
* type = specify where the object should be made visible.
*
* Returns: whether scrolling was successful.
*
* Since: 2.30
*/
public bool scrollTo(AtkScrollType type)
{
return atk_component_scroll_to(getComponentStruct(), type) != 0;
}
/**
* Makes an object visible on the screen at a given position by scrolling all
* necessary parents.
*
* Params:
* coords = specify whether coordinates are relative to the screen or to the
* parent object.
* x = x-position where to scroll to
* y = y-position where to scroll to
*
* Returns: whether scrolling was successful.
*
* Since: 2.30
*/
public bool scrollToPoint(AtkCoordType coords, int x, int y)
{
return atk_component_scroll_to_point(getComponentStruct(), coords, x, y) != 0;
}
/**
* Sets the extents of @component.
*
......@@ -252,13 +290,16 @@ public template ComponentT(TStruct)
}
/**
* Sets the postition of @component.
* Sets the position of @component.
*
* Contrary to atk_component_scroll_to, this does not trigger any scrolling,
* this just moves @component in its parent.
*
* Params:
* x = x coordinate
* y = y coordinate
* coordType = specifies whether the coordinates are relative to the screen
* or to the components top level window
* or to the component's top level window
*
* Returns: %TRUE or %FALSE whether or not the position was set or not
*/
......
......@@ -462,7 +462,7 @@ public class ObjectAtk : ObjectG
* Params:
* arg1 = the newly focused object.
*/
gulong addOnActiveDescendantChanged(void delegate(void*, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
gulong addOnActiveDescendantChanged(void delegate(ObjectAtk, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "active-descendant-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
......@@ -481,7 +481,7 @@ public class ObjectAtk : ObjectG
* available for the implementor. In that case this pointer can be
* NULL.
*/
gulong addOnChildrenChanged(void delegate(uint, void*, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
gulong addOnChildrenChanged(void delegate(uint, ObjectAtk, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "children-changed", dlg, connectFlags ^ ConnectFlags.SWAPPED);
}
......@@ -517,8 +517,8 @@ public class ObjectAtk : ObjectG
* notify doesn't support emission hooks.
*
* Params:
* arg1 = an #AtkPropertyValues containing the new value of the
* property which changed.
* arg1 = an #AtkPropertyValues containing the new
* value of the property which changed.
*/
gulong addOnPropertyChange(void delegate(void*, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
......
......@@ -95,10 +95,10 @@ public interface TextIF{
* Adds a selection bounded by the specified offsets.
*
* Params:
* startOffset = the start position of the selected region
* startOffset = the starting character offset of the selected region
* endOffset = the offset of the first character after the selected region.
*
* Returns: %TRUE if success, %FALSE otherwise
* Returns: %TRUE if successful, %FALSE otherwise
*/
public bool addSelection(int startOffset, int endOffset);
......@@ -119,9 +119,11 @@ public interface TextIF{
public TextRange[] getBoundedRanges(AtkTextRectangle* rect, AtkCoordType coordType, AtkTextClipType xClipType, AtkTextClipType yClipType);
/**
* Gets the offset position of the caret (cursor).
* Gets the offset of the position of the caret (cursor).
*
* Returns: the offset position of the caret (cursor).
* Returns: the character offset of the position of the caret or 0 if
* the caret is not located inside the element or in the case of
* any other failure.
*/
public int getCaretOffset();
......@@ -129,16 +131,16 @@ public interface TextIF{
* Gets the specified text.
*
* Params:
* offset = position
* offset = a character offset within @text
*
* Returns: the character at @offset.
* Returns: the character at @offset or 0 in the case of failure.
*/
public dchar getCharacterAtOffset(int offset);
/**
* Gets the character count.
*
* Returns: the number of characters.
* Returns: the number of characters or -1 in case of failure.
*/
public int getCharacterCount();
......@@ -148,8 +150,8 @@ public interface TextIF{
*
* Params:
* offset = The offset of the text character for which bounding information is required.
* x = Pointer for the x cordinate of the bounding box
* y = Pointer for the y cordinate of the bounding box
* x = Pointer for the x coordinate of the bounding box
* y = Pointer for the y coordinate of the bounding box
* width = Pointer for the width of the bounding box
* height = Pointer for the height of the bounding box
* coords = specify whether coordinates are relative to the screen or widget window
......@@ -162,8 +164,8 @@ public interface TextIF{
* attributes that can be returned. Note that other attributes may also be
* returned.
*
* Returns: an #AtkAttributeSet which contains the default
* values of attributes. at @offset. this #atkattributeset should be freed by
* Returns: an #AtkAttributeSet which contains the default values
* of attributes. at @offset. this #atkattributeset should be freed by
* a call to atk_attribute_set_free().
*/
public AtkAttributeSet* getDefaultAttributes();
......@@ -171,8 +173,7 @@ public interface TextIF{
/**
* Gets the number of selected regions.
*
* Returns: The number of selected regions, or -1 if a failure
* occurred.
* Returns: The number of selected regions, or -1 in the case of failure.
*/
public int getNSelections();
......@@ -187,8 +188,8 @@ public interface TextIF{
* coords = specify whether coordinates are relative to the screen or
* widget window
*
* Returns: the offset to the character which is located at
* the specified @x and @y coordinates.
* Returns: the offset to the character which is located at the specified
* @x and @y coordinates of -1 in case of failure.
*/
public int getOffsetAtPoint(int x, int y, AtkCoordType coords);
......@@ -217,14 +218,14 @@ public interface TextIF{
* returned.
*
* Params:
* offset = the offset at which to get the attributes, -1 means the offset of
* offset = the character offset at which to get the attributes, -1 means the offset of
* the character to be inserted at the caret location.
* startOffset = the address to put the start offset of the range
* endOffset = the address to put the end offset of the range
*
* Returns: an #AtkAttributeSet which contains the attributes
* explicitly set at @offset. This #AtkAttributeSet should be freed by a call
* to atk_attribute_set_free().
* explicitly set at @offset. This #AtkAttributeSet should be freed by
* a call to atk_attribute_set_free().
*/
public AtkAttributeSet* getRunAttributes(int offset, out int startOffset, out int endOffset);
......@@ -237,9 +238,9 @@ public interface TextIF{
* start of the text. The selected region closest to the beginning
* of the text region is assigned the number 0, etc. Note that adding,
* moving or deleting a selected region can change the numbering.
* startOffset = passes back the start position of the selected region
* endOffset = passes back the end position of (e.g. offset immediately past)
* the selected region
* startOffset = passes back the starting character offset of the selected region
* endOffset = passes back the ending character offset (offset immediately past)
* of the selected region
*
* Returns: a newly allocated string containing the selected text. Use g_free()
* to free the returned string.
......@@ -281,15 +282,15 @@ public interface TextIF{
* Params:
* offset = position
* granularity = An #AtkTextGranularity
* startOffset = the start offset of the returned string, or -1
* if an error has occurred (e.g. invalid offset, not implemented)
* startOffset = the starting character offset of the returned string, or -1
* in the case of error (e.g. invalid offset, not implemented)
* endOffset = the offset of the first character after the returned string,
* or -1 if an error has occurred (e.g. invalid offset, not implemented)
* or -1 in the case of error (e.g. invalid offset, not implemented)
*
* Returns: a newly allocated string containing the text
* at the @offset bounded by the specified @granularity. Use
* g_free() to free the returned string. Returns %NULL if the
* offset is invalid or no implementation is available.
* Returns: a newly allocated string containing the text at
* the @offset bounded by the specified @granularity. Use g_free()
* to free the returned string. Returns %NULL if the offset is invalid
* or no implementation is available.
*
* Since: 2.10
*/
......@@ -299,11 +300,12 @@ public interface TextIF{
* Gets the specified text.
*
* Params:
* startOffset = start position
* endOffset = end position, or -1 for the end of the string.
* startOffset = a starting character offset within @text
* endOffset = an ending character offset within @text, or -1 for the end of the string.
*
* Returns: a newly allocated string containing the text from @start_offset up
* to, but not including @end_offset. Use g_free() to free the returned string.
* to, but not including @end_offset. Use g_free() to free the returned
* string.
*/
public string getText(int startOffset, int endOffset);
......@@ -315,12 +317,13 @@ public interface TextIF{
* Params:
* offset = position
* boundaryType = An #AtkTextBoundary
* startOffset = the start offset of the returned string
* startOffset = the starting character offset of the returned string
* endOffset = the offset of the first character after the
* returned substring
*
* Returns: a newly allocated string containing the text after @offset bounded
* by the specified @boundary_type. Use g_free() to free the returned string.
* by the specified @boundary_type. Use g_free() to free the returned
* string.
*/
public string getTextAfterOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset);
......@@ -356,12 +359,13 @@ public interface TextIF{
* Params:
* offset = position
* boundaryType = An #AtkTextBoundary
* startOffset = the start offset of the returned string
* startOffset = the starting character offset of the returned string
* endOffset = the offset of the first character after the
* returned substring
*
* Returns: a newly allocated string containing the text at @offset bounded by
* the specified @boundary_type. Use g_free() to free the returned string.
* Returns: a newly allocated string containing the text at @offset bounded
* by the specified @boundary_type. Use g_free() to free the returned
* string.
*/
public string getTextAtOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset);
......@@ -373,12 +377,13 @@ public interface TextIF{
* Params:
* offset = position
* boundaryType = An #AtkTextBoundary
* startOffset = the start offset of the returned string
* startOffset = the starting character offset of the returned string
* endOffset = the offset of the first character after the
* returned substring
*
* Returns: a newly allocated string containing the text before @offset bounded
* by the specified @boundary_type. Use g_free() to free the returned string.
* by the specified @boundary_type. Use g_free() to free the returned
* string.
*/
public string getTextBeforeOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset);
......@@ -392,17 +397,53 @@ public interface TextIF{
* of the text region is assigned the number 0, etc. Note that adding,
* moving or deleting a selected region can change the numbering.
*
* Returns: %TRUE if success, %FALSE otherwise
* Returns: %TRUE if successful, %FALSE otherwise
*/
public bool removeSelection(int selectionNum);
/**
* Makes @text visible on the screen by scrolling all necessary parents.
*
* Contrary to atk_text_set_position, this does not actually move
* @text in its parent, this only makes the parents scroll so that the
* object shows up on the screen, given its current position within the parents.
*
* Params:
* startOffset = start position
* endOffset = end position, or -1 for the end of the string.
* type = specify where the object should be made visible.
*
* Returns: whether scrolling was successful.
*
* Since: 2.32
*/
public bool scrollSubstringTo(int startOffset, int endOffset, AtkScrollType type);
/**
* Makes an object visible on the screen at a given position by scrolling all
* necessary parents.
*
* Params:
* startOffset = start position
* endOffset = end position, or -1 for the end of the string.
* coords = specify whether coordinates are relative to the screen or to the
* parent object.
* x = x-position where to scroll to
* y = y-position where to scroll to
*
* Returns: whether scrolling was successful.
*
* Since: 2.32
*/
public bool scrollSubstringToPoint(int startOffset, int endOffset, AtkCoordType coords, int x, int y);
/**
* Sets the caret (cursor) position to the specified @offset.
*
* Params:
* offset = position
* offset = the character offset of the new caret position
*
* Returns: %TRUE if success, %FALSE otherwise.
* Returns: %TRUE if successful, %FALSE otherwise.
*/
public bool setCaretOffset(int offset);
......@@ -415,11 +456,11 @@ public interface TextIF{
* start of the text. The selected region closest to the beginning
* of the text region is assigned the number 0, etc. Note that adding,
* moving or deleting a selected region can change the numbering.
* startOffset = the new start position of the selection
* startOffset = the new starting character offset of the selection
* endOffset = the new end position of (e.g. offset immediately past)
* the selection
*
* Returns: %TRUE if success, %FALSE otherwise
* Returns: %TRUE if successful, %FALSE otherwise
*/
public bool setSelection(int selectionNum, int startOffset, int endOffset);
......@@ -507,8 +548,8 @@ public interface TextIF{
* name = a string which is the (non-localized) name of an ATK text attribute.
*
* Returns: the #AtkTextAttribute enumerated type corresponding to the specified
* name,
* or #ATK_TEXT_ATTRIBUTE_INVALID if no matching text attribute is found.
* name, or #ATK_TEXT_ATTRIBUTE_INVALID if no matching text attribute
* is found.
*/
public static AtkTextAttribute attributeForName(string name)
{
......
......@@ -70,10 +70,10 @@ public template TextT(TStruct)
* Adds a selection bounded by the specified offsets.
*
* Params:
* startOffset = the start position of the selected region
* startOffset = the starting character offset of the selected region
* endOffset = the offset of the first character after the selected region.
*
* Returns: %TRUE if success, %FALSE otherwise
* Returns: %TRUE if successful, %FALSE otherwise
*/
public bool addSelection(int startOffset, int endOffset)
{
......@@ -113,9 +113,11 @@ public template TextT(TStruct)
}
/**
* Gets the offset position of the caret (cursor).
* Gets the offset of the position of the caret (cursor).
*
* Returns: the offset position of the caret (cursor).
* Returns: the character offset of the position of the caret or 0 if
* the caret is not located inside the element or in the case of
* any other failure.
*/
public int getCaretOffset()
{
......@@ -126,9 +128,9 @@ public template TextT(TStruct)
* Gets the specified text.
*
* Params:
* offset = position
* offset = a character offset within @text
*
* Returns: the character at @offset.
* Returns: the character at @offset or 0 in the case of failure.
*/
public dchar getCharacterAtOffset(int offset)
{
......@@ -138,7 +140,7 @@ public template TextT(TStruct)
/**
* Gets the character count.
*
* Returns: the number of characters.
* Returns: the number of characters or -1 in case of failure.
*/
public int getCharacterCount()
{
......@@ -151,8 +153,8 @@ public template TextT(TStruct)
*
* Params:
* offset = The offset of the text character for which bounding information is required.
* x = Pointer for the x cordinate of the bounding box
* y = Pointer for the y cordinate of the bounding box
* x = Pointer for the x coordinate of the bounding box
* y = Pointer for the y coordinate of the bounding box
* width = Pointer for the width of the bounding box
* height = Pointer for the height of the bounding box
* coords = specify whether coordinates are relative to the screen or widget window
......@@ -168,8 +170,8 @@ public template TextT(TStruct)
* attributes that can be returned. Note that other attributes may also be
* returned.
*
* Returns: an #AtkAttributeSet which contains the default
* values of attributes. at @offset. this #atkattributeset should be freed by
* Returns: an #AtkAttributeSet which contains the default values
* of attributes. at @offset. this #atkattributeset should be freed by
* a call to atk_attribute_set_free().
*/
public AtkAttributeSet* getDefaultAttributes()
......@@ -180,8 +182,7 @@ public template TextT(TStruct)
/**
* Gets the number of selected regions.
*
* Returns: The number of selected regions, or -1 if a failure
* occurred.
* Returns: The number of selected regions, or -1 in the case of failure.
*/
public int getNSelections()
{
......@@ -199,8 +200,8 @@ public template TextT(TStruct)
* coords = specify whether coordinates are relative to the screen or
* widget window
*
* Returns: the offset to the character which is located at
* the specified @x and @y coordinates.
* Returns: the offset to the character which is located at the specified
* @x and @y coordinates of -1 in case of failure.
*/
public int getOffsetAtPoint(int x, int y, AtkCoordType coords)
{
......@@ -235,14 +236,14 @@ public template TextT(TStruct)
* returned.
*
* Params:
* offset = the offset at which to get the attributes, -1 means the offset of
* offset = the character offset at which to get the attributes, -1 means the offset of
* the character to be inserted at the caret location.
* startOffset = the address to put the start offset of the range
* endOffset = the address to put the end offset of the range
*
* Returns: an #AtkAttributeSet which contains the attributes
* explicitly set at @offset. This #AtkAttributeSet should be freed by a call
* to atk_attribute_set_free().
* explicitly set at @offset. This #AtkAttributeSet should be freed by
* a call to atk_attribute_set_free().
*/
public AtkAttributeSet* getRunAttributes(int offset, out int startOffset, out int endOffset)
{
......@@ -258,9 +259,9 @@ public template TextT(TStruct)
* start of the text. The selected region closest to the beginning
* of the text region is assigned the number 0, etc. Note that adding,
* moving or deleting a selected region can change the numbering.
* startOffset = passes back the start position of the selected region
* endOffset = passes back the end position of (e.g. offset immediately past)
* the selected region
* startOffset = passes back the starting character offset of the selected region
* endOffset = passes back the ending character offset (offset immediately past)
* of the selected region
*
* Returns: a newly allocated string containing the selected text. Use g_free()
* to free the returned string.
......@@ -308,15 +309,15 @@ public template TextT(TStruct)
* Params:
* offset = position
* granularity = An #AtkTextGranularity
* startOffset = the start offset of the returned string, or -1
* if an error has occurred (e.g. invalid offset, not implemented)
* startOffset = the starting character offset of the returned string, or -1
* in the case of error (e.g. invalid offset, not implemented)
* endOffset = the offset of the first character after the returned string,
* or -1 if an error has occurred (e.g. invalid offset, not implemented)
* or -1 in the case of error (e.g. invalid offset, not implemented)
*
* Returns: a newly allocated string containing the text
* at the @offset bounded by the specified @granularity. Use
* g_free() to free the returned string. Returns %NULL if the
* offset is invalid or no implementation is available.
* Returns: a newly allocated string containing the text at
* the @offset bounded by the specified @granularity. Use g_free()
* to free the returned string. Returns %NULL if the offset is invalid
* or no implementation is available.
*
* Since: 2.10
*/
......@@ -332,11 +333,12 @@ public template TextT(TStruct)
* Gets the specified text.
*
* Params:
* startOffset = start position
* endOffset = end position, or -1 for the end of the string.
* startOffset = a starting character offset within @text
* endOffset = an ending character offset within @text, or -1 for the end of the string.
*
* Returns: a newly allocated string containing the text from @start_offset up
* to, but not including @end_offset. Use g_free() to free the returned string.
* to, but not including @end_offset. Use g_free() to free the returned
* string.
*/
public string getText(int startOffset, int endOffset)
{
......@@ -354,12 +356,13 @@ public template TextT(TStruct)
* Params:
* offset = position
* boundaryType = An #AtkTextBoundary
* startOffset = the start offset of the returned string
* startOffset = the starting character offset of the returned string
* endOffset = the offset of the first character after the
* returned substring
*
* Returns: a newly allocated string containing the text after @offset bounded
* by the specified @boundary_type. Use g_free() to free the returned string.
* by the specified @boundary_type. Use g_free() to free the returned
* string.
*/
public string getTextAfterOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset)
{
......@@ -401,12 +404,13 @@ public template TextT(TStruct)
* Params:
* offset = position
* boundaryType = An #AtkTextBoundary
* startOffset = the start offset of the returned string
* startOffset = the starting character offset of the returned string
* endOffset = the offset of the first character after the
* returned substring
*
* Returns: a newly allocated string containing the text at @offset bounded by
* the specified @boundary_type. Use g_free() to free the returned string.
* Returns: a newly allocated string containing the text at @offset bounded
* by the specified @boundary_type. Use g_free() to free the returned
* string.
*/
public string getTextAtOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset)
{
......@@ -424,12 +428,13 @@ public template TextT(TStruct)
* Params:
* offset = position
* boundaryType = An #AtkTextBoundary
* startOffset = the start offset of the returned string
* startOffset = the starting character offset of the returned string
* endOffset = the offset of the first character after the
* returned substring
*
* Returns: a newly allocated string containing the text before @offset bounded
* by the specified @boundary_type. Use g_free() to free the returned string.
* by the specified @boundary_type. Use g_free() to free the returned
* string.
*/