atk/atkeditabletext.c atk/atktext.c atk/atktext.h atk/atkutil.h
authorBrian Cameron <bcameron@src.gnome.org>
Mon, 16 Jul 2001 16:55:23 +0000 (16:55 +0000)
committerBrian Cameron <bcameron@src.gnome.org>
Mon, 16 Jul 2001 16:55:23 +0000 (16:55 +0000)
* atk/atkeditabletext.c atk/atktext.c atk/atktext.h atk/atkutil.h
docs/atk-sections.txt docs/tmpl/atktext.sgml docs/tmpl/atkutil.sgml
gail_textattributes_update.pat is for gail/gail and integrates the
ATK_ATTRIBUTE_* macros in the gail implementations.
atk_docs_textattributes_update.pat is for atk/docs and patches
atk-sections.txt etc. for improved docs
atk_atk_textattributes_update.pat is for atk/atk and included the
new ATK_ATTRIBUTE_* macros and updated gtk-doc comments.

ChangeLog
atk/atkeditabletext.c
atk/atktext.c
atk/atktext.h
atk/atkutil.h
docs/atk-sections.txt
docs/tmpl/atktext.sgml
docs/tmpl/atkutil.sgml

index 9c29a7f..e9c5d54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-07-16  Brian Cameron <brian.cameron@sun.com>
+       * atk/atkeditabletext.c atk/atktext.c atk/atktext.h atk/atkutil.h
+       docs/atk-sections.txt docs/tmpl/atktext.sgml docs/tmpl/atkutil.sgml
+       gail_textattributes_update.pat is for gail/gail and integrates the 
+       ATK_ATTRIBUTE_* macros in the gail implementations.
+       atk_docs_textattributes_update.pat is for atk/docs and patches
+       atk-sections.txt etc. for improved docs
+       atk_atk_textattributes_update.pat is for atk/atk and included the
+       new ATK_ATTRIBUTE_* macros and updated gtk-doc comments.
+
 2001-07-13  Darin Adler  <darin@bentspoon.com>
 
        * atk/atkstate.c: Add missing <string.h> include.
index e6316e6..45e0351 100755 (executable)
@@ -54,7 +54,10 @@ atk_editable_text_get_type ()
  *@start_offset: start of range in which to set attributes
  *@end_offset: end of range in which to set attributes
  *
- *Sets the attributes for a specified range.
+ *Sets the attributes for a specified range. See the ATK_ATTRIBUTE
+ *macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes 
+ *that can be set. Note that other attributes that do not have corresponding
+ *ATK_ATTRIBUTE macros may also be set for certain text widgets.
  *
  *Returns: %TRUE if attributes successfully set for the specified
  *range, otherwise %FALSE
index ee4cc0b..20072a7 100755 (executable)
@@ -340,7 +340,9 @@ atk_text_get_character_extents (AtkText *text,
  *Creates an #AtkAttributeSet which consists of the attributes explicitly
  *set at the position @offset in the text. @start_offset and @end_offset are
  *set to the start and end of the range around @offset where the attributes are
- *invariant.
+ *invariant. See the ATK_ATTRIBUTE macros, such as #ATK_ATTRIBUTE_LEFT_MARGIN
+ *for types of text attributes that can be returned. Note that other 
+ *attributes that do not have corresponding macros may also be returned.
  *
  *Returns: an #AtkAttributeSet which contains the attributes explicitly set
  *at @offset
index 89f3737..33ef452 100755 (executable)
 extern "C" {
 #endif /* __cplusplus */
 
+/**
+ * AtkAttributeSet:
+ *
+ * This is a singly-linked list (a #GSList) of #AtkAttribute. It is
+ * used by atk_text_ref_run_attributes() and atk_editable_text_set_run_attributes()
+ **/
 typedef GSList AtkAttributeSet;
 
-typedef struct _AtkAttribute {
+/**
+ * AtkAttribute:
+ * @name: The attribute name. See the ATK_ATTRIBUTE macros, eg #ATK_ATTRIBUTE_LEFT_MARGIN for examples.
+ * @value: the value of the attribute, represented as a string. See the ATK_ATTRIBUTE macros, eg #ATK_ATTRIBUTE_LEFT_MARGIN for example.
+ *
+ * A string name/value pair representing a text attribute. 
+ **/
+typedef struct _AtkAttribute AtkAttribute;
+
+struct _AtkAttribute {
   gchar* name;
   gchar* value;
-}AtkAttribute;
+};
+
+/**
+ * ATK_ATTRIBUTE_LEFT_MARGIN:
+ *
+ * An #AtkAttribute name/value pair. The pixel width of the left margin
+ **/
+#define ATK_ATTRIBUTE_LEFT_MARGIN        "left_margin"
+
+/**
+ * ATK_ATTRIBUTE_RIGHT_MARGIN:
+ *
+ * An #AtkAttribute name/value pair. The pixel width of the right margin
+ **/
+#define ATK_ATTRIBUTE_RIGHT_MARGIN        "right_margin"
+
+/**
+ * ATK_ATTRIBUTE_INDENT:
+ *
+ * An #AtkAttribute name/value pair. The number of pixels that the text is indented
+ **/
+#define ATK_ATTRIBUTE_INDENT              "indent"
+
+/**
+ * ATK_ATTRIBUTE_INVISIBLE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * Either "true" or "false" indicating whether text is visible or not
+ **/
+#define ATK_ATTRIBUTE_INVISIBLE          "invisible"
+
+/**
+ * ATK_ATTRIBUTE_EDITABLE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * Either "true" or "false" indicating whether text is editable or not
+ **/
+#define ATK_ATTRIBUTE_EDITABLE           "editable"
+
+/**
+ * ATK_ATTRIBUTE_PIXELS_ABOVE_LINES:
+ *
+ * An #AtkAttribute name/value pair.
+ * Pixels of blank space to leave above each newline-terminated line. 
+ **/
+#define ATK_ATTRIBUTE_PIXELS_ABOVE_LINES "pixels_above_lines"
+
+/**
+ * ATK_ATTRIBUTE_PIXELS_BELOW_LINES:
+ *
+ * An #AtkAttribute name/value pair. 
+ * Pixels of blank space to leave below each newline-terminated line.
+ **/
+#define ATK_ATTRIBUTE_PIXELS_BELOW_LINES "pixels_below_lines"
+
+/**
+ * ATK_ATTRIBUTE_PIXELS_INSIDE_WRAP:
+ *
+ * An #AtkAttribute name/value pair.
+ * Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph).
+ **/
+#define ATK_ATTRIBUTE_PIXELS_INSIDE_WRAP "pixels_inside_wrap"
+
+/**
+ * ATK_ATTRIBUTE_BG_FULL_HEIGHT:
+ *
+ * An #AtkAttribute name/value pair. 
+ * "true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character.
+ **/
+#define ATK_ATTRIBUTE_BG_FULL_HEIGHT     "bg_full_height"
+
+/**
+ * ATK_ATTRIBUTE_RISE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * Number of pixels that the characters are risen above the baseline
+ * The value is a string representation of an integer 
+ **/
+#define ATK_ATTRIBUTE_RISE               "rise"
+
+/**
+ * ATK_ATTRIBUTE_UNDERLINE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * "true" or "false" whether the text is underlined
+ **/
+#define ATK_ATTRIBUTE_UNDERLINE          "underline"
+
+/**
+ * ATK_ATTRIBUTE_STRIKETHROUGH:
+ *
+ * An #AtkAttribute name/value pair. 
+ * "true" or "false" whether the text is strikethrough 
+ **/
+#define ATK_ATTRIBUTE_STRIKETHROUGH      "strikethrough"
+
+/**
+ * ATK_ATTRIBUTE_SIZE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The size of the characters. 
+ * The value is a string representation of an integer 
+ **/
+#define ATK_ATTRIBUTE_SIZE              "size"
+
+/**
+ * ATK_ATTRIBUTE_SCALE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The scale of the characters. The value is a string representation of a double 
+ **/
+#define ATK_ATTRIBUTE_SCALE             "scale"
+
+/**
+ * ATK_ATTRIBUTE_WEIGHT:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The weight of the characters. The value is a string representation of an integer 
+ **/
+#define ATK_ATTRIBUTE_WEIGHT            "weight"
+
+/**
+ * ATK_ATTRIBUTE_LANGUAGE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The language used
+ **/
+#define ATK_ATTRIBUTE_LANGUAGE          "language"
+
+/**
+ * ATK_ATTRIBUTE_FAMILY_NAME:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The font family name
+ **/
+#define ATK_ATTRIBUTE_FAMILY_NAME       "family_name"
+
+/**
+ * ATK_ATTRIBUTE_BG_COLOR:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The background color. The value is an RGB value of the format "%u,%u,%u"
+ **/
+#define ATK_ATTRIBUTE_BG_COLOR          "bg_color"
+
+/**
+ * ATK_ATTRIBUTE_FG_COLOR:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The foreground color. The value is an RGB value of the format "%u,%u,%u"
+ **/
+#define ATK_ATTRIBUTE_FG_COLOR          "fg_color"
+
+/**
+ * ATK_ATTRIBUTE_BG_STIPPLE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * "true" if a #GdkBitmap is set for stippling the background color.
+ **/
+#define ATK_ATTRIBUTE_BG_STIPPLE        "bg_stipple"
+
+/**
+ * ATK_ATTRIBUTE_FG_STIPPLE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * "true" if a #GdkBitmap is set for stippling the foreground color.
+ **/
+#define ATK_ATTRIBUTE_FG_STIPPLE        "fg_stipple"
+
+/**
+ * ATK_ATTRIBUTE_WRAP_MODE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The wrap mode of the text, if any. Values are "none", "char" or "word" 
+ **/
+#define ATK_ATTRIBUTE_WRAP_MODE         "wrap_mode"
+
+/**
+ * ATK_ATTRIBUTE_DIRECTION:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The direction of the text, if set. Values are "none", "ltr" or "rtl" 
+ **/
+#define ATK_ATTRIBUTE_DIRECTION         "direction"
+
+/**
+ * ATK_ATTRIBUTE_JUSTIFICATION:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The justification of the text, if set. Values are "left", "right", "center" or "fill" 
+ **/
+#define ATK_ATTRIBUTE_JUSTIFICATION     "justification"
+
+/**
+ * ATK_ATTRIBUTE_STRETCH:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed",
+ * or "ultra_expanded"
+ **/
+#define ATK_ATTRIBUTE_STRETCH           "stretch"
+
+/**
+ * ATK_ATTRIBUTE_VARIANT:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The capitalization variant of the text, if set. Values are "normal" or "small_caps"
+ **/
+#define ATK_ATTRIBUTE_VARIANT           "variant"
+
+/**
+ * ATK_ATTRIBUTE_STYLE:
+ *
+ * An #AtkAttribute name/value pair. 
+ * The slant style of the text, if set. Values are "normal", "oblique" or "italic"
+ **/
+#define ATK_ATTRIBUTE_STYLE             "slant_style"
 
 #define ATK_TYPE_TEXT                    (atk_text_get_type ())
 #define ATK_IS_TEXT(obj)                 G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TEXT)
index bf5a580..4ddf99f 100755 (executable)
@@ -70,7 +70,8 @@ GType atk_util_get_type (void);
  *@ATK_XY_WINDOW: specifies xy coordinates relative to the widgets 
  * top-level window
  *
- *Specifies how xy coordinates are to be interpreted 
+ *Specifies how xy coordinates are to be interpreted. Used by functions such
+ *as atk_component_get_position() and atk_text_get_character_extents() 
  **/
 typedef enum {
   ATK_XY_SCREEN,
index 5570bdc..890c81c 100644 (file)
@@ -340,6 +340,8 @@ atk_table_get_type
 AtkText
 AtkTextIface
 AtkTextBoundary
+AtkAttribute
+AtkAttributeSet
 atk_text_get_text
 atk_text_get_character_at_offset
 atk_text_get_text_after_offset
@@ -356,6 +358,33 @@ atk_text_add_selection
 atk_text_remove_selection
 atk_text_set_selection
 atk_text_set_caret_offset
+ATK_ATTRIBUTE_LEFT_MARGIN
+ATK_ATTRIBUTE_RIGHT_MARGIN
+ATK_ATTRIBUTE_INDENT
+ATK_ATTRIBUTE_INVISIBLE
+ATK_ATTRIBUTE_EDITABLE
+ATK_ATTRIBUTE_PIXELS_ABOVE_LINES
+ATK_ATTRIBUTE_PIXELS_BELOW_LINES
+ATK_ATTRIBUTE_PIXELS_INSIDE_WRAP
+ATK_ATTRIBUTE_BG_FULL_HEIGHT
+ATK_ATTRIBUTE_RISE
+ATK_ATTRIBUTE_UNDERLINE
+ATK_ATTRIBUTE_STRIKETHROUGH
+ATK_ATTRIBUTE_SIZE
+ATK_ATTRIBUTE_SCALE
+ATK_ATTRIBUTE_WEIGHT
+ATK_ATTRIBUTE_LANGUAGE
+ATK_ATTRIBUTE_FAMILY_NAME
+ATK_ATTRIBUTE_BG_COLOR
+ATK_ATTRIBUTE_FG_COLOR
+ATK_ATTRIBUTE_BG_STIPPLE
+ATK_ATTRIBUTE_FG_STIPPLE
+ATK_ATTRIBUTE_WRAP_MODE
+ATK_ATTRIBUTE_DIRECTION
+ATK_ATTRIBUTE_JUSTIFICATION
+ATK_ATTRIBUTE_STRETCH
+ATK_ATTRIBUTE_VARIANT
+ATK_ATTRIBUTE_STYLE
 <SUBSECTION Standard>
 ATK_TEXT
 ATK_IS_TEXT
@@ -423,6 +452,7 @@ atk_streamable_content_get_type
 <SECTION>
 <FILE>atkutil</FILE>
 <TITLE>AtkUtil</TITLE>
+AtkCoordType
 atk_add_focus_tracker
 atk_remove_focus_tracker
 atk_focus_tracker_init
index 705f801..0ef270f 100644 (file)
@@ -58,6 +58,20 @@ AtkText provides an accessibility interface for text widgets
 @ATK_TEXT_BOUNDARY_LINE_START: 
 @ATK_TEXT_BOUNDARY_LINE_END: 
 
+<!-- ##### STRUCT AtkAttribute ##### -->
+<para>
+
+</para>
+
+@name: 
+@value: 
+
+<!-- ##### TYPEDEF AtkAttributeSet ##### -->
+<para>
+
+</para>
+
+
 <!-- ##### FUNCTION atk_text_get_text ##### -->
 <para>
 
@@ -238,3 +252,192 @@ AtkText provides an accessibility interface for text widgets
 @Returns: 
 
 
+<!-- ##### MACRO ATK_ATTRIBUTE_LEFT_MARGIN ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_RIGHT_MARGIN ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_INDENT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_INVISIBLE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_EDITABLE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_PIXELS_ABOVE_LINES ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_PIXELS_BELOW_LINES ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_PIXELS_INSIDE_WRAP ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_BG_FULL_HEIGHT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_RISE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_UNDERLINE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_STRIKETHROUGH ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_SIZE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_SCALE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_WEIGHT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_LANGUAGE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_FAMILY_NAME ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_BG_COLOR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_FG_COLOR ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_BG_STIPPLE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_FG_STIPPLE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_WRAP_MODE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_DIRECTION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_JUSTIFICATION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_STRETCH ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_VARIANT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ATK_ATTRIBUTE_STYLE ##### -->
+<para>
+
+</para>
+
+
+
index fd269d4..027f90e 100644 (file)
@@ -14,6 +14,14 @@ The AtkUtility interface provides general purpose utility functions.
 
 </para>
 
+<!-- ##### ENUM AtkCoordType ##### -->
+<para>
+
+</para>
+
+@ATK_XY_SCREEN: 
+@ATK_XY_WINDOW: 
+
 <!-- ##### FUNCTION atk_add_focus_tracker ##### -->
 <para>