Details
struct AtkTextIface
struct AtkTextIface
{
GTypeInterface parent;
gchar* (* get_text) (AtkText *text,
gint start_offset,
gint end_offset);
gchar* (* get_text_after_offset) (AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
gint *start_offset,
gint *end_offset);
gchar* (* get_text_at_offset) (AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
gint *start_offset,
gint *end_offset);
gunichar (* get_character_at_offset) (AtkText *text,
gint offset);
gchar* (* get_text_before_offset) (AtkText *text,
gint offset,
AtkTextBoundary boundary_type,
gint *start_offset,
gint *end_offset);
gint (* get_caret_offset) (AtkText *text);
AtkAttributeSet* (* ref_run_attributes) (AtkText *text,
gint offset,
gint *start_offset,
gint *end_offset);
void (* get_character_extents) (AtkText *text,
gint offset,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coords);
gint (* get_character_count) (AtkText *text);
gint (* get_offset_at_point) (AtkText *text,
gint x,
gint y,
AtkCoordType coords);
gint (* get_n_selections) (AtkText *text);
gchar* (* get_selection) (AtkText *text,
gint selection_num,
gint *start_offset,
gint *end_offset);
gboolean (* add_selection) (AtkText *text,
gint start_offset,
gint end_offset);
gboolean (* remove_selection) (AtkText *text,
gint selection_num);
gboolean (* set_selection) (AtkText *text,
gint selection_num,
gint start_offset,
gint end_offset);
gboolean (* set_caret_offset) (AtkText *text,
gint offset);
/*
* signal handlers
*/
void (* text_changed) (AtkText *text);
void (* caret_changed) (AtkText *text,
gint location);
}; |
enum AtkTextBoundary
typedef enum {
ATK_TEXT_BOUNDARY_CHAR,
ATK_TEXT_BOUNDARY_WORD_START,
ATK_TEXT_BOUNDARY_WORD_END,
ATK_TEXT_BOUNDARY_SENTENCE_START,
ATK_TEXT_BOUNDARY_SENTENCE_END,
ATK_TEXT_BOUNDARY_LINE_START,
ATK_TEXT_BOUNDARY_LINE_END
} AtkTextBoundary; |
Text boundary types used for specifying boundaries for regions of text
struct AtkAttribute
struct AtkAttribute {
gchar* name;
gchar* value;
}; |
A string name/value pair representing a text attribute.
atk_text_get_text ()
Gets the specified text.
atk_text_get_character_at_offset ()
Gets the specified text.
atk_text_get_text_after_offset ()
Gets the specified text.
If the boundary type is ATK_TEXT_BOUNDARY_WORD_START or
ATK_TEXT_BOUNDARY_WORD_END part of a word may be returned.
If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the start point
will be the offset and will continue to the start of the next sentence.
The first word may not be a complete word. Similarly for
ATK_TEXT_BOUNDARY_SENTENCE_END, ATK_TEXT_BOUNDARY_LINE_START and
ATK_TEXT_BOUNDARY_LINE_END
atk_text_get_text_at_offset ()
Gets the specified text.
If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START or
ATK_TEXT_BOUNDARY_WORD_END a complete word is returned;
if the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START or
ATK_TEXT_BOUNDARY_SENTENCE_END a complete sentence
is returned; if the boundary type is ATK_TEXT_BOUNDARY_LINE_START or
ATK_TEXT_BOUNDARY_LINE_END a complete line is returned.
atk_text_get_text_before_offset ()
Gets the specified text.
If the boundary type is ATK_TEXT_BOUNDARY_WORD_START or
ATK_TEXT_BOUNDARY_WORD_END part of a word may be returned.
If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the start point
will be at the start of the sentence, and will continue to the offset.
The last word may not be a complete word. Similarly for
ATK_TEXT_BOUNDARY_SENTENCE_END, ATK_TEXT_BOUNDARY_LINE_START and
ATK_TEXT_BOUNDARY_LINE_END
atk_text_get_caret_offset ()
Gets the offset position of the caret (cursor).
atk_text_get_character_extents ()
Given an offset, the x, y, width, and height values are filled
appropriately.
atk_text_ref_run_attributes ()
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. 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.
atk_text_get_character_count ()
Gets the character count.
atk_text_get_offset_at_point ()
Gets the offset of the character located at coordinates x and y. x and y
are interpreted as being relative to the screen or this widget's window
depending on coords.
atk_text_get_n_selections ()
Gets the number of selected regions.
atk_text_get_selection ()
Gets the text from the specified selection.
atk_text_add_selection ()
Adds a selection bounded by the specified offsets.
atk_text_remove_selection ()
Removes the specified selection.
atk_text_set_selection ()
Changes the start and end offset of the specified selection.
atk_text_set_caret_offset ()
Sets the caret (cursor) position to the specified offset.
atk_attribute_set_free ()
Frees the memory used by an AtkAttributeSet, including all its
AtkAttributes.
ATK_ATTRIBUTE_LEFT_MARGIN
#define ATK_ATTRIBUTE_LEFT_MARGIN "left_margin" |
An AtkAttribute name/value pair. The pixel width of the left margin
ATK_ATTRIBUTE_RIGHT_MARGIN
#define ATK_ATTRIBUTE_RIGHT_MARGIN "right_margin" |
An AtkAttribute name/value pair. The pixel width of the right margin
ATK_ATTRIBUTE_INDENT
#define ATK_ATTRIBUTE_INDENT "indent" |
An AtkAttribute name/value pair. The number of pixels that the text is indented
ATK_ATTRIBUTE_INVISIBLE
#define ATK_ATTRIBUTE_INVISIBLE "invisible" |
An AtkAttribute name/value pair.
Either "true" or "false" indicating whether text is visible or not
ATK_ATTRIBUTE_EDITABLE
#define ATK_ATTRIBUTE_EDITABLE "editable" |
An AtkAttribute name/value pair.
Either "true" or "false" indicating whether text is editable or not
ATK_ATTRIBUTE_PIXELS_ABOVE_LINES
#define ATK_ATTRIBUTE_PIXELS_ABOVE_LINES "pixels_above_lines" |
An AtkAttribute name/value pair.
Pixels of blank space to leave above each newline-terminated line.
ATK_ATTRIBUTE_PIXELS_BELOW_LINES
#define ATK_ATTRIBUTE_PIXELS_BELOW_LINES "pixels_below_lines" |
An AtkAttribute name/value pair.
Pixels of blank space to leave below each newline-terminated line.
ATK_ATTRIBUTE_PIXELS_INSIDE_WRAP
#define ATK_ATTRIBUTE_PIXELS_INSIDE_WRAP "pixels_inside_wrap" |
An AtkAttribute name/value pair.
Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph).
ATK_ATTRIBUTE_BG_FULL_HEIGHT
#define ATK_ATTRIBUTE_BG_FULL_HEIGHT "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.
ATK_ATTRIBUTE_RISE
#define ATK_ATTRIBUTE_RISE "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
ATK_ATTRIBUTE_UNDERLINE
#define ATK_ATTRIBUTE_UNDERLINE "underline" |
An AtkAttribute name/value pair.
"true" or "false" whether the text is underlined
ATK_ATTRIBUTE_STRIKETHROUGH
#define ATK_ATTRIBUTE_STRIKETHROUGH "strikethrough" |
An AtkAttribute name/value pair.
"true" or "false" whether the text is strikethrough
ATK_ATTRIBUTE_SIZE
#define ATK_ATTRIBUTE_SIZE "size" |
An AtkAttribute name/value pair.
The size of the characters.
The value is a string representation of an integer
ATK_ATTRIBUTE_SCALE
#define ATK_ATTRIBUTE_SCALE "scale" |
An AtkAttribute name/value pair.
The scale of the characters. The value is a string representation of a double
ATK_ATTRIBUTE_WEIGHT
#define ATK_ATTRIBUTE_WEIGHT "weight" |
An AtkAttribute name/value pair.
The weight of the characters. The value is a string representation of an integer
ATK_ATTRIBUTE_LANGUAGE
#define ATK_ATTRIBUTE_LANGUAGE "language" |
An AtkAttribute name/value pair.
The language used
ATK_ATTRIBUTE_FAMILY_NAME
#define ATK_ATTRIBUTE_FAMILY_NAME "family_name" |
An AtkAttribute name/value pair.
The font family name
ATK_ATTRIBUTE_BG_COLOR
#define ATK_ATTRIBUTE_BG_COLOR "bg_color" |
An AtkAttribute name/value pair.
The background color. The value is an RGB value of the format "u,u,u"
ATK_ATTRIBUTE_FG_COLOR
#define ATK_ATTRIBUTE_FG_COLOR "fg_color" |
An AtkAttribute name/value pair.
The foreground color. The value is an RGB value of the format "u,u,u"
ATK_ATTRIBUTE_BG_STIPPLE
#define ATK_ATTRIBUTE_BG_STIPPLE "bg_stipple" |
An AtkAttribute name/value pair.
"true" if a GdkBitmap is set for stippling the background color.
ATK_ATTRIBUTE_FG_STIPPLE
#define ATK_ATTRIBUTE_FG_STIPPLE "fg_stipple" |
An AtkAttribute name/value pair.
"true" if a GdkBitmap is set for stippling the foreground color.
ATK_ATTRIBUTE_WRAP_MODE
#define ATK_ATTRIBUTE_WRAP_MODE "wrap_mode" |
An AtkAttribute name/value pair.
The wrap mode of the text, if any. Values are "none", "char" or "word"
ATK_ATTRIBUTE_DIRECTION
#define ATK_ATTRIBUTE_DIRECTION "direction" |
An AtkAttribute name/value pair.
The direction of the text, if set. Values are "none", "ltr" or "rtl"
ATK_ATTRIBUTE_JUSTIFICATION
#define ATK_ATTRIBUTE_JUSTIFICATION "justification" |
An AtkAttribute name/value pair.
The justification of the text, if set. Values are "left", "right", "center" or "fill"
ATK_ATTRIBUTE_STRETCH
#define ATK_ATTRIBUTE_STRETCH "stretch" |
An AtkAttribute name/value pair.
The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed",
or "ultra_expanded"
ATK_ATTRIBUTE_VARIANT
#define ATK_ATTRIBUTE_VARIANT "variant" |
An AtkAttribute name/value pair.
The capitalization variant of the text, if set. Values are "normal" or "small_caps"
ATK_ATTRIBUTE_STYLE
#define ATK_ATTRIBUTE_STYLE "slant_style" |
An AtkAttribute name/value pair.
The slant style of the text, if set. Values are "normal", "oblique" or "italic"