tizen: Add additional unit for "unified" user session
[platform/upstream/at-spi2-core.git] / atspi / atspi-text.h
index ce42e56..8e11eb0 100644 (file)
@@ -4,6 +4,7 @@
  *
  * Copyright 2002 Ximian, Inc.
  *           2002 Sun Microsystems Inc.
+ * Copyright 2010, 2011 Novell, Inc.
  *           
  *
  * This library is free software; you can redistribute it and/or
@@ -31,6 +32,8 @@
 
 #include "atspi-types.h"
 
+G_BEGIN_DECLS
+
 typedef struct _AtspiRange AtspiRange;
 struct _AtspiRange
 {
@@ -50,29 +53,12 @@ GType atspi_range_get_type ();
 AtspiRange *
 atspi_range_copy (AtspiRange *src);
 
-typedef struct _AtspiRangedAttributeSet AtspiRangedAttributeSet;
-struct _AtspiRangedAttributeSet
-{
-  GHashTable *attributes;
-  gint start_offset;
-  gint end_offset;
-};
-
-/**
- * ATSPI_TYPE_RANGED_ATTRIBUTE_SET:
- * 
- * The #GType for a boxed type holding an attribute set within a text block.
- */
-#define        ATSPI_TYPE_RANGED_ATTRIBUTE_SET atspi_ranged_attribute_set_get_type ()
-
-GType atspi_ranged_attribute_set_get_type ();
-
 typedef struct _AtspiTextRange AtspiTextRange;
 struct _AtspiTextRange
 {
   gint start_offset;
   gint end_offset;
-  gchar *text;
+  gchar *content;
 };
 
 /**
@@ -103,21 +89,33 @@ gchar * atspi_text_get_text (AtspiText *obj, gint start_offset, gint end_offset,
 
 gint atspi_text_get_caret_offset (AtspiText *obj, GError **error);
 
-AtspiRangedAttributeSet * atspi_text_get_attributes (AtspiText *obj, gint offset, GError **error);
+#ifndef ATSPI_DISABLE_DEPRECATED
+GHashTable *atspi_text_get_attributes (AtspiText *obj, gint offset, gint *start_offset, gint *end_offset, GError **error);
+#endif
+
+GHashTable *atspi_text_get_text_attributes (AtspiText *obj, gint offset, gint *start_offset, gint *end_offset, GError **error);
 
-AtspiRangedAttributeSet * atspi_text_get_attribute_run (AtspiText *obj, gint offset, gboolean include_defaults, GError **error);
+GHashTable *atspi_text_get_attribute_run (AtspiText *obj, gint offset, gboolean include_defaults, gint *start_offset, gint *end_offset, GError **error);
 
+#ifndef ATSPI_DISABLE_DEPRECATED
 gchar * atspi_text_get_attribute_value (AtspiText *obj, gint offset, gchar *attribute_name, GError **error);
+#endif
+
+gchar * atspi_text_get_text_attribute_value (AtspiText *obj, gint offset, gchar *attribute_name, GError **error);
 
 GHashTable * atspi_text_get_default_attributes (AtspiText *obj, GError **error);
 
 gboolean atspi_text_set_caret_offset (AtspiText *obj, gint new_offset, GError **error);
 
+#ifndef ATSPI_DISABLE_DEPRECATED
 AtspiTextRange * atspi_text_get_text_before_offset (AtspiText *obj, gint offset, AtspiTextBoundaryType type, GError **error);
 
 AtspiTextRange * atspi_text_get_text_at_offset (AtspiText *obj, gint offset, AtspiTextBoundaryType type, GError **error);
 
 AtspiTextRange * atspi_text_get_text_after_offset (AtspiText *obj, gint offset, AtspiTextBoundaryType type, GError **error);
+#endif
+
+AtspiTextRange * atspi_text_get_string_at_offset (AtspiText *obj, gint offset, AtspiTextGranularity granularity, GError **error);
 
 guint atspi_text_get_character_at_offset (AtspiText *obj, gint offset, GError **error);
 
@@ -138,4 +136,7 @@ gboolean atspi_text_add_selection (AtspiText *obj, gint start_offset, gint end_o
 gboolean atspi_text_remove_selection (AtspiText *obj, gint selection_num, GError **error);
 
 gboolean atspi_text_set_selection (AtspiText *obj, gint selection_num, gint start_offset, gint end_offset, GError **error);
+
+G_END_DECLS
+
 #endif /* _ATSPI_TEXT_H_ */