From 9c1abdcebebc2a553e7c296c56dff33b16bb372d Mon Sep 17 00:00:00 2001 From: marcm Date: Tue, 4 Sep 2001 21:07:20 +0000 Subject: [PATCH] Committed the rest of the files from the last batch of changes. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@55 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- cspi/spi-util.c | 17 ++++ cspi/spi-util.h | 8 ++ cspi/spi_editabletext.c | 95 +++++++++++++++++++ cspi/spi_hyperlink.c | 72 +++++++++++++++ cspi/spi_hypertext.c | 47 ++++++++++ cspi/spi_image.c | 54 +++++++++++ cspi/spi_selection.c | 85 +++++++++++++++++ cspi/spi_table.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++ cspi/spi_text.c | 224 +++++++++++++++++++++++++++++++++++++++++++++ cspi/spi_value.c | 55 +++++++++++ 10 files changed, 893 insertions(+) create mode 100644 cspi/spi-util.c create mode 100644 cspi/spi-util.h create mode 100644 cspi/spi_editabletext.c create mode 100644 cspi/spi_hyperlink.c create mode 100644 cspi/spi_hypertext.c create mode 100644 cspi/spi_image.c create mode 100644 cspi/spi_selection.c create mode 100644 cspi/spi_table.c create mode 100644 cspi/spi_text.c create mode 100644 cspi/spi_value.c diff --git a/cspi/spi-util.c b/cspi/spi-util.c new file mode 100644 index 0000000..a37c7c2 --- /dev/null +++ b/cspi/spi-util.c @@ -0,0 +1,17 @@ +#include +#include "spi-util.h" + + +char * +string_from_corba_string (CORBA_char *string) +{ + char *newstring; + int length; + + length = strlen (string); + newstring = (char *) malloc (length+1); + strcpy (newstring, string); + corba_free (string); + return newstring; +} + diff --git a/cspi/spi-util.h b/cspi/spi-util.h new file mode 100644 index 0000000..933225f --- /dev/null +++ b/cspi/spi-util.h @@ -0,0 +1,8 @@ +#ifndef __SPI_UTIL_H +#define __SPI_UTIL_H + +char * +string_from_corba_string (CORBA_char *string); + + +#endif /* __SPI_UTIL_H */ diff --git a/cspi/spi_editabletext.c b/cspi/spi_editabletext.c new file mode 100644 index 0000000..8411481 --- /dev/null +++ b/cspi/spi_editabletext.c @@ -0,0 +1,95 @@ +int +AccessibleEditableText_ref (AccessibleEditableText *obj) +{ + Accessibility_EditableText_ref (*obj, &ev); + return 0; +} + + + +int +AccessibleEditableText_unref (AccessibleEditableText *obj) +{ + Accessibility_EditableText_unref (*obj, &ev); + return 0; +} + + + +boolean +AccessibleEditableText_setRunAttributes (AccessibleEditableText *obj, + const char *attributes, + long startPos, long endPos) +{ + return (boolean) + Accessibility_EditableText_setRunAttributes (*obj, + (CORBA_char *) attributes, + (CORBA_long) startPos, (CORBA_long) endPos, &ev); +} + + + +void +AccessibleEditableText_setTextContents (AccessibleEditableText *obj, + const char *newContents); +{ + Accessibility_EditableText_setTextContents (*obj, + (CORBA_char *) newContents, &ev); +} + + + +void +AccessibleEditableText_insertText (AccessibleEditableText *obj, + long position, + char *text, + long length) +{ + Accessibility_EditableText_insertText (*obj, + (CORBA_long) position, (CORBA_char *) text, + (CORBA_long) length, &ev); +} + + + +void +AccessibleEditableText_copyText (AccessibleText *obj, + long startPos, + long endPos) +{ + Accessibility_EditableText_copyText (*obj, + (CORBA_long) startPos, (CORBA_long) endPos, &ev); +} + + + +void +AccessibleEditableText_cutText (AccessibleEditableText *obj, + long startPos, + long endPos) +{ + Accessibility_EditableText_cutText (*obj, + (CORBA_long) startPos, (CORBA_long) endPos, &ev); +} + + + +void +AccessibleEditableText_deleteText (AccessibleEditableText *obj, + long startPos, + long endPos) +{ + Accessibility_EditableText_deleteText (*obj, + (CORBA_long) startPos, (CORBA_long) endPos, &ev); +} + + + +void +AccessibleEditableText_pasteText (AccessibleEditableText *obj, + long position) +{ + Accessibility_EditableText_pasteText (*obj, + (CORBA_long) startPos, (CORBA_long) endPos, &ev); +} + diff --git a/cspi/spi_hyperlink.c b/cspi/spi_hyperlink.c new file mode 100644 index 0000000..0e8303b --- /dev/null +++ b/cspi/spi_hyperlink.c @@ -0,0 +1,72 @@ +#include "spi-util.h" + +int +AccessibleHyperlink_ref (AccessibleHyperlink *obj) +{ + Accessibility_Hyperlink_ref (*obj); + return 0: +} + + + +int +AccessibleHyperlink_unref (AccessibleHyperlink *obj) +{ + Accessibility_Hyperlink_unref (*obj); + return 0; +} + + + +long +AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj) +{ + RETURN (LONG) + aCCESSIBILITY_hYPERLINK_GETnaNCHORS (*OBJ); +} + + + +char * +AccessibleHyperlink_getURI (AccessibleHyperlink *obj, + long i) +{ + RETURN STRING_FROM_CORBA_STRING ( + aCCESSIBIITY_hYPERLINK_GETuri (*OBJ, + (corba_LONG) I, &EV)); +} + + + +Accessible +AccessibleHyperlink_getObject (AccessibleHyperlink *obj, + long i) +{ + return (Accessible) + Accessibility_Hyperlink_getObject (*obj, + (CORBA_long) i); +} + + + +void +AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj, + long *startIndex, + long *endIndex) +{ + *startIndex = (long) + Accessibility_Hyperlink__get_startIndex (*obj); + *endIndex = (long) + Acccessibility_Hyperlink__get_endIndex (*obj); +} + + + +boolean +AccessibleHyperlink_isValid (AccessibleHyperlink *obj) +{ + return (boolean) + Accessibility_Hyperlink_isValid (*obj); +} + + diff --git a/cspi/spi_hypertext.c b/cspi/spi_hypertext.c new file mode 100644 index 0000000..c9e47a7 --- /dev/null +++ b/cspi/spi_hypertext.c @@ -0,0 +1,47 @@ +int +AccessibleHypertext_ref (AccessibleHypertext *obj) +{ + Accessibility_Hypertext_ref (*obj, &ev); + return 0; +} + + + +int +AccessibleHypertext_unref (AccessibleHypertext *obj) +{ + Accessibility_Hypertext_unref (*obj, &ev); + return 0; +} + + + +long +AccessibleHypertext_getNLinks (AccessibleHypertext *obj) +{ + return (long) + Accessibility_Hypertext_getNLinks (*obj, &ev); +} + + +AccessibleHyperlink * +AccessibleHyperText_getLink (AccessibleHypertext *obj, + long linkIndex) +{ + return (Accessible) + Accessibility_Hypertext_getLink (*obj, + (CORBA_long) linkIndex, &ev); +} + + + +long +AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj, + long characterIndex) +{ + return (long) + Accessibility_Hypertext_getLinkIndex (*obj, + (CORBA_long) characterIndex, &ev); +} + + diff --git a/cspi/spi_image.c b/cspi/spi_image.c new file mode 100644 index 0000000..9e5e086 --- /dev/null +++ b/cspi/spi_image.c @@ -0,0 +1,54 @@ +#include "spi-util.h" + + +int +AccessibleImage_ref (AccessibleImage *obj) +{ + Accessibility_Image_ref (*obj, &ev); + return 0; +} + + + +int +AccessibleImage_unref (AccessibleImage *obj) +{ + Accessibility_Image_unref (*obj, &ev); + return 0; +} + + + +char * +AccessibleImage_getImageDescription (AccessibleImage *obj) +{ + return string_from_corba_string ( + Accessibility_Image_getImageDescription (*obj, &ev)); +} + + + +void +AccessibleImage_getImageSize (AccessibleImage *obj, + long *width, + long *height) +{ + Accessibility_Image_getImageSize (*obj, + (CORBA_long *) width, (CORBA_long *) height, &ev); +} + + + +void +AccessibleImage_getImagePosition (AccessibleImage *obj, + long *x, + long *y, + AccessibleCoordType ctype) +{ + Accessibility_Image_getImagePosition (*obj, + (CORBA_long *) x, (CORBA_long *) y, (CORBA_short) ctype, + &ev); +} + + + diff --git a/cspi/spi_selection.c b/cspi/spi_selection.c new file mode 100644 index 0000000..edfa202 --- /dev/null +++ b/cspi/spi_selection.c @@ -0,0 +1,85 @@ +int +AccessibleSelection_ref (AccessibleSelection *obj) +{ + Accessibility_Selection_ref (*obj, &ev); + return 0; +} + + + +int +AccessibleSelection_unref (AccessibleSelection *obj) +{ + Accessibility_Selection_unref (*obj, &ev); + return 0; +} + + + +long +AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj) +{ + return (long) + Accessibility_Selection_getNSelectedChildren (*obj, &ev); +} + + + +Accessible * +AccessibleSelection_refSelectedChild (AccessibleSelection *obj, + long selectedChildIndex) +{ + return (Accessible *) + Accessibility_Selection_refSelectedChild (*obj, + (CORBA_long) selectedChildIndex, &ev); +} + + + +boolean +AccessibleSelection_selectChild (AccessibleSelection *obj, + long childIndex) +{ + return (boolean) + Accessibility_Selection_selectChild (*obj, + (CORBA_long) childIndex, &ev); +} + + + +boolean +AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj, + long selectedChildIndex) +{ + Accessibility_Selection_deselectSelectedChild (*obj, + (CORBA_long) selectedChildIndex, &ev); +} + + + +boolean +AccessibleSelection_isChildSelected (AccessibleSelection *obj, + long childIndex) +{ + return (boolean) + Accessibility_Selection_isChildSelected (*obj, + (CORBA_long) childIndex, &ev); +} + + + +void +AccessibleSelection_selectAll (AccessibleSelection *obj) +{ + Accessibility_Selection_selectAll (*obj, &ev); +} + + + +void +AccessibleSelection_clearSelection (AccessibleSelection *obj) +{ + Accessibility_Selection_clearSelection (*obj, &ev); +} + + diff --git a/cspi/spi_table.c b/cspi/spi_table.c new file mode 100644 index 0000000..37e7f53 --- /dev/null +++ b/cspi/spi_table.c @@ -0,0 +1,236 @@ +#include "spi-util.h" + +int +AccessibleTable_ref (AccessibleTable *obj) +{ + Accessibility_Table_ref (*obj, &ev); + return 0; +} + + + +int +AccessibleTable_unref (AccessibleTable *obj) +{ + Accessibility_Table_unref (*obj, &ev); + return 0; +} + + + +char * +AccessibleTable_getCaption (AccessibleTable *obj) +{ + return string_from_corba_string ( + Accessibility_Table_getCaption (*obj, &ev)); +} + + + +Accessible * +AccessibleTable_getSummary (AccessibleTable *obj) +{ + return (Accessible *) + Accessibility_Table_getSummary (*obj, &ev); +} + + + +long +AccessibleTable_getNRows (AccessibleTable *obj) +{ + return (long) + Accessibility_Table_getNRows (*obj, &ev); +} + + + +long +AccessibleTable_getNColumns (AccessibleTable *obj) +{ + return (long) + Accessibility_Table_getNColumns (*obj, &ev); +} + + +Accessible * +AccessibleTable_refAt (AccessibleTable *obj, + long row, + long column) +{ + return (Accessible *) + Accessibility_Table_refAt (*obj, + (CORBA_long) row, (CORBA_long) column, &ev); +} + + +long +AccessibleTable_getIndexAt (AccessibleTable *obj, + long row, + long column) +{ + return (long) + Accessibility_Table_getIndexAt (*obj, + (CORBA_long) row, (CORBA_long) column, &ev); +} + + + +long +AccessibleTable_getRowAtIndex (AccessibleTable *obj, + long index) +{ + return (long) + Accessibility_Table_getRowAtIndex (*obj, + (CORBA_long) index, &ev); +} + + + +long +AccessibleTable_getColumnAtIndex (AccessibleTable *obj, + long index) +{ + return (long) + Accessibility_Table_getColumnAtIndex (*obj, + (CORBA_long) index, &ev); +} + + + +char * +AccessibleTable_getRowDescription (AccessibleTable *obj, + long row) +{ + return string_from_corba_string ( + Accessibility_Table_getRowDescription (*obj, + (CORBA_long) row, &ev)); +} + + + +char * +AccessibleTable_getColumnDescription (AccessibleTable *obj, + long column) +{ + return string_from_corba_string ( + Accessibility_Table_getColumnDescription (*obj, + (CORBA_long) column, &ev)); +} + + + +long +AccessibleTable_getRowExtentAt (AccessibleTable *obj, + long row, + long column) +{ + return (long) + Accessibility_Table_getRowExtentAt (*obj, + (CORBA_long) row, (CORBA_long) column, &ev); +} + + + +long +AccessibleTable_getColumnExtentAt (AccessibleTable *obj, + long row, + long column) +{ + return (long) + Accessibility_Table_getColumnExtentAt (*obj, + (CORBA_long) row, (CORBA_long) column, &ev); +} + + + +Accessible * +AccessibleTable_getRowHeader (AccessibleTable *obj, + long row) +{ + return (Accessible *) + Accessibility_Table_getRowHeader (*obj, + (CORBA_long) row, &ev); +} + + + +Accessible * +AccessibleTable_getColumnHeader (AccessibleTable *obj, + long column); +{ + return (Accessible *) + Accessibility_Table_getColumnHeader (*obj, + (CORBA_long) column, &ev); +} + + + +long +AccessibleTable_getNSelectedRows (AccessibleTable *obj) +{ + return (long) + Accessibility_Table_getNSelectedRows (*obj, &ev); +} + + + +void +AccessibleTable_getSelectedRows (AccessibleTable *obj, + long **selectedRows) +{ + Accessibility_Table_getSelectedRows (*obj, + (CORBA_long **) selectedRows, &ev); +} + + + +long +AccessibleTable_getNSelectedColumns (AccessibleTable *obj) +{ + return (long) + Accessibility_Table_getNSelectedColumns (*obj, &ev); +} + + +void +AccessibleTable_getSelectedColumns (AccessibleTable *obj, + long **selectedColumns) +{ + Accessibility_Table_getSelectedColumns (*obj, + (CORBA_long **) selectedColumns, &ev); +} + + +boolean +AccessibleTable_isRowSelected (AccessibleTable *obj, + long row) +{ + return (boolean) + Accessibility_Table_isRowSelected (*obj, + (CORBA_long) row, &ev); +} + + + +boolean +AccessibleTable_isColumnSelected (AccessibleTable *obj, + long column) +{ + return (boolean) + Accessibility_Table_isColumnSelected (*obj, + (CORBA_long) column, &ev); +} + + + +boolean +AccessibleTable_isSelected (AccessibleTable *obj, + long row, + long column) +{ +return (boolean) + Accessibility_Table_isSelected (*obj, + (CORBA_long) row, (CORBA_long) column, &ev); +} + diff --git a/cspi/spi_text.c b/cspi/spi_text.c new file mode 100644 index 0000000..379c122 --- /dev/null +++ b/cspi/spi_text.c @@ -0,0 +1,224 @@ +#include "spi-util.h" + + +int +AccessibleText_ref (AccessibleText *obj) +{ + Accessibility_Text_ref (*obj, &ev); + return 0; +} + + + +int +AccessibleText_unref (AccessibleText *obj) +{ + Accessibility_Text_unref (*obj, &ev); + return 0; +} + + + +long +AccessibleText_getCharacterCount (AccessibleText *obj) +{ + return (long) + Accessibility_Text__get_characterCount (*obj, &ev); +} + + + +char * +AccessibleText_getText (AccessibleText *obj, + long startOffset, + long endOffset) +{ + return string_from_corba_string ( + Accessibility_Text_getText (*obj, + (CORBA_long) startOffset, (CORBA_long) endOffset, &ev)); +} + + + +long +AccessibleText_getCaretOffset (AccessibleText *obj) +{ + return (long) + Accessibility_Text_getCaretOffset (*obj, &ev); +} + + + +char * +AccessibleText_refRunAttributes (AccessibleText *obj, + long offset, + long *startOffset, + long *endOfset) +{ +return string_from_corba_string ( + Accessibility_Text_refRunAttributes (*obj, + (CORBA_long) offset, + (CORBA_long *) startOffset, + (CORBA_long *) endOffset, &ev)); +} + + + +boolean +AccessibleText_setCaretOffset (AccessibleText *obj, + long newOffset) +{ + return (boolean) + Accessibility_Text_setCaretOffset (*obj, + (CORBA_long) newOffset, &ev); +} + + + +char * +AccessibleText_getTextBeforeOffset (AccessibleText *obj, + long offset, + TEXT_BOUNDARY_TYPE type, + long *startOffset, long *endOffset) +{ + return string_from_corba_string ( + Accessibility_Text_getTextBeforeOffset (*obj, + (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type, + (CORBA_long *) startOffset, (CORBA_long *) endOffset, + &ev)); +} + + + +char * +AccessibleText_getTextAtOffset (AccessibleText *obj, + long offset, + TEXT_BOUNDARY_TYPE type, + long *startOffset, long *endOffset) +{ + return string_from_corba_string ( + Accessibility_Text_getTextAtOffset (*obj, + (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type, + (CORBA_long *) startOffset, (CORBA_long *) endOffset, + &ev)); +} + + + +char * +AccessibleText_getTextAfterOffset (AccessibleText *obj, + long offset, + TEXT_BOUNDARY_TYPE type, + long *startOffset, long *endOffset) +{ + return string_from_corba_string ( + Accessibility_Text_getTextAfterOffset (*obj, + (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type, + (CORBA_long *) startOffset, (CORBA_long *) endOffset, + &ev)); +} + + + +char +AccessibleText_getCharacterAtOffset (AccessibleText *obj, + long offset) +{ + return (char) + Accessibility_Text_getCharacterAtOffset (*obj, + (CORBA_long) offset, &ev); +} + + + +boolean +AccessibleText_getCharacterExtents (AccessibleText *obj, + long offset, + long *x, + long *y, + long *width, + long *height) +{ + return (boolean) + Accessibility_Text_getTextExtents (*obj, + (CORBA_long) offset, + (CORBA_long *) x, + (CORBA_long *) y, + (CORBA_long *) width, + (CORBA_long *) height, &ev); +} + + + +long +AccessibleText_getOffsetAtPoint (AccessibleText *obj, + long x, + long y) +{ + return (long) + Accessibility_Text_getOffsetAtPoint (*obj, + (CORBA_long) x, (CORBA_long) y, &ev); +} + + + +long +AccessibleText_getNSelections (AccessibleText *obj) +{ + return (long) + Accessibility_Text_getNSelections (*obj, &ev); +} + + + +void +AccessibleText_getSelection (AccessibleText *obj, + long selectionNum, long *startOffset, + long *endOffset) +{ + Accessibility_Text_getSelection (*obj, + (CORBA_long) selectionNum, + (CORBA_long *) startOffset, + (CORBA_long *) endOffset, &ev); +} + + + +boolean +AccessibleText_addSelection (AccessibleText *obj, + long startOffset, long endOffset) +{ + return (boolean) + Accessibility_Text_addSelection (*obj, + (CORBA_long) startOffset, (CORBA_long) endOffset, + &ev); +} + + + +boolean +AccessibleText_removeSelection (AccessibleText *obj, + long selectionNum) +{ + return (boolean) + Accessibility_Text_removeSelection (*obj, + (CORBA_long) selectionNum, &ev); +} + + + +boolean +AccessibleText_setSelection (AccessibleText *obj, + long selectionNum, + long startOffset, + long endOffset) +{ + return (boolean) + Accessibility_Text_setSelection (*obj, + (CORBA_long) selectionNum, + (CORBA_long) startPos, + (CORBA_long) endOffset, &ev); +} + + + diff --git a/cspi/spi_value.c b/cspi/spi_value.c new file mode 100644 index 0000000..708623b --- /dev/null +++ b/cspi/spi_value.c @@ -0,0 +1,55 @@ +int +AccessibleValue_ref (AccessibleValue *obj) + { + Accessibility_Value_ref (*obj, &ev); + return 0; + } + + + +int +AccessibleValue_unref (AccessibleValue *obj) + { + Accessibility_Value_unref (*obj, &ev); + return 0; + } + + + +float +AccessibleValue_getMinimumValue (AccessibleValue *value) +{ + return (float) + Accessibility_Value__get_minimumValue (*obj, &ev); +} + + + +float +AccessibleValue_getCurrentValue (AccessibleValue *value) +{ + return (float) + Accessibility_Value__get_currentValue (*obj, &ev); +} + + + +float +AccessibleValue_getMaximumValue (AccessibleValue *value) +{ + return (float) + Accessibility_Value__get_maximumValue (*obj, &ev); +} + + + +boolean +AccessibleValue_setCurrentValue (AccessibleValue *value, + float newValue) +{ + Accessibility_Value__set_currentValue (*obj, + (CORBA_float) newValue, &ev); + return TRUE; +} + + -- 2.7.4