| GAIL Reference Manual | ||||
|---|---|---|---|---|
GailMiscGailMisc — GailMisc is a set of utility functions which may be useful to implementors of Atk interfaces for custom widgets. |
AtkAttributeSet * gail_misc_add_attribute (AtkAttributeSet *attrib_set,AtkTextAttribute attr,gchar *value);AtkAttributeSet * gail_misc_layout_get_run_attributes (AtkAttributeSet *attrib_set,PangoLayout *layout,gchar *text,gint offset,gint *start_offset,gint *end_offset);AtkAttributeSet * gail_misc_get_default_attributes (AtkAttributeSet *attrib_set,PangoLayout *layout,GtkWidget *widget);void gail_misc_get_extents_from_pango_rectangle (GtkWidget *widget,PangoRectangle *char_rect,gint x_layout,gint y_layout,gint *x,gint *y,gint *width,gint *height,AtkCoordType coords);gint gail_misc_get_index_at_point_in_layout (GtkWidget *widget,PangoLayout *layout,gint x_layout,gint y_layout,gint x,gint y,AtkCoordType coords);void gail_misc_get_origins (GtkWidget *widget,gint *x_window,gint *y_window,gint *x_toplevel,gint *y_toplevel);AtkAttributeSet * gail_misc_add_to_attr_set (AtkAttributeSet *attrib_set,GtkTextAttributes *attrs,AtkTextAttribute attr);AtkAttributeSet * gail_misc_buffer_get_run_attributes (GtkTextBuffer *buffer,gint offset,gint *start_offset,gint *end_offset);
GailMisc is a set of utility function which are used in the implemementation of Atk interfaces for Gtk widgets. They may be useful to implementors of Atk interfaces for custom widgets.
AtkAttributeSet * gail_misc_add_attribute (AtkAttributeSet *attrib_set,AtkTextAttribute attr,gchar *value);
Creates an attr and value, and adds it
to attrib_set.
attrib_set : |
The |
attr : |
The AtkTextAttrribute which identifies the attribute to be added |
value : |
The attribute value |
| Returns : | A pointer to the new |
AtkAttributeSet * gail_misc_layout_get_run_attributes (AtkAttributeSet *attrib_set,PangoLayout *layout,gchar *text,gint offset,gint *start_offset,gint *end_offset);
Adds the attributes for the run starting at offset to the specified attribute set.
attrib_set : |
The |
layout : |
The PangoLayout from which the attributes will be obtained |
text : |
The text |
offset : |
The offset at which the attributes are required |
start_offset : |
The start offset of the current run |
end_offset : |
The end offset of the current run |
| Returns : | A pointer to the |
AtkAttributeSet * gail_misc_get_default_attributes (AtkAttributeSet *attrib_set,PangoLayout *layout,GtkWidget *widget);
Adds the default attributes to the specified attribute set.
attrib_set : |
The |
layout : |
The PangoLayout from which the attributes will be obtained |
widget : |
The GtkWidget for which the default attributes are required. |
| Returns : | A pointer to the |
void gail_misc_get_extents_from_pango_rectangle (GtkWidget *widget,PangoRectangle *char_rect,gint x_layout,gint y_layout,gint *x,gint *y,gint *width,gint *height,AtkCoordType coords);
Gets the extents of char_rect in device coordinates,
relative to either top-level window or screen coordinates as
specified by coords.
widget : |
The widget that contains the PangoLayout, that contains the PangoRectangle |
char_rect : |
The |
x_layout : |
The x-offset at which the widget displays the
PangoLayout that contains the PangoRectangle, relative to widget
|
y_layout : |
The y-offset at which the widget displays the
PangoLayout that contains the PangoRectangle, relative to widget
|
x : |
The x-position of the coords
|
y : |
The y-position of the coords
|
width : |
The width of the |
height : |
The height of the |
coords : |
An |
gint gail_misc_get_index_at_point_in_layout (GtkWidget *widget,PangoLayout *layout,gint x_layout,gint y_layout,gint x,gint y,AtkCoordType coords);
Gets the byte offset at the specified x and y in a
widget : |
A |
layout : |
The |
x_layout : |
The x-offset at which the widget displays the
widget
|
y_layout : |
The y-offset at which the widget displays the
widget
|
x : |
The x-coordinate relative to coords at which to
calculate the index
|
y : |
The y-coordinate relative to coords at which to
calculate the index
|
coords : |
An |
| Returns : | the byte offset at the specified x and y in a
|
void gail_misc_get_origins (GtkWidget *widget,gint *x_window,gint *y_window,gint *x_toplevel,gint *y_toplevel);
Gets the origin of the widget window, and the origin of the widgets top-level window.
widget : |
a |
x_window : |
the x-origin of the widget->window |
y_window : |
the y-origin of the widget->window |
x_toplevel : |
the x-origin of the toplevel window for widget->window |
y_toplevel : |
the y-origin of the toplevel window for widget->window |
AtkAttributeSet * gail_misc_add_to_attr_set (AtkAttributeSet *attrib_set,GtkTextAttributes *attrs,AtkTextAttribute attr);
Gets the value for the AtkTextAttribute from the GtkTextAttributes and adds it to the AttributeSet.
attrib_set : |
An |
attrs : |
The |
attr : |
The |
| Returns : | A pointer to the updated |
AtkAttributeSet * gail_misc_buffer_get_run_attributes (GtkTextBuffer *buffer,gint offset,gint *start_offset,gint *end_offset);
Creates an AtkAttributeSet which contains the attributes for the run starting at offset.
buffer : |
The |
offset : |
The offset at which the attributes are required |
start_offset : |
The start offset of the current run |
end_offset : |
The end offset of the current run |
| Returns : | A pointer to the |