| Top |
CailMiscCailMisc — CailMisc is a set of utility functions which may be useful to implementors of Atk interfaces for custom widgets. |
| AtkAttributeSet * | cail_misc_add_attribute () |
| AtkAttributeSet * | cail_misc_layout_get_run_attributes () |
| AtkAttributeSet * | cail_misc_get_default_attributes () |
| void | cail_misc_get_extents_from_pango_rectangle () |
| gint | cail_misc_get_index_at_point_in_layout () |
| void | cail_misc_get_origins () |
| AtkAttributeSet * | cail_misc_buffer_get_run_attributes () |
CailMisc is a set of utility function which are used in the implemementation of Atk interfaces for CTK+ widgets. They may be useful to implementors of Atk interfaces for custom widgets.
AtkAttributeSet * cail_misc_add_attribute (AtkAttributeSet *attrib_set,AtkTextAttribute attr,gchar *value);
Creates an AtkAttribute from attr
and value
, and adds it
to attrib_set
.
AtkAttributeSet * cail_misc_layout_get_run_attributes (AtkAttributeSet *attrib_set,PangoLayout *layout,const gchar *text,gint offset,gint *start_offset,gint *end_offset);
Adds the attributes for the run starting at offset to the specified attribute set.
AtkAttributeSet * cail_misc_get_default_attributes (AtkAttributeSet *attrib_set,PangoLayout *layout,CtkWidget *widget);
Adds the default attributes to the specified attribute set.
void cail_misc_get_extents_from_pango_rectangle (CtkWidget *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 PangoRectangle from which to calculate extents |
|
x_layout |
The x-offset at which the widget displays the
PangoLayout that contains the PangoRectangle, relative to |
|
y_layout |
The y-offset at which the widget displays the
PangoLayout that contains the PangoRectangle, relative to |
|
x |
The x-position of the PangoRectangle relative to |
|
y |
The y-position of the PangoRectangle relative to |
|
width |
The width of the PangoRectangle |
|
height |
The height of the PangoRectangle |
|
coords |
An AtkCoordType enumeration |
gint cail_misc_get_index_at_point_in_layout (CtkWidget *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 PangoLayout.
widget |
A CtkWidget |
|
layout |
The PangoLayout from which to get the index at the specified point. |
|
x_layout |
The x-offset at which the widget displays the
PangoLayout, relative to |
|
y_layout |
The y-offset at which the widget displays the
PangoLayout, relative to |
|
x |
The x-coordinate relative to |
|
y |
The y-coordinate relative to |
|
coords |
An AtkCoordType enumeration |
void cail_misc_get_origins (CtkWidget *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.
AtkAttributeSet * cail_misc_buffer_get_run_attributes (CtkTextBuffer *buffer,gint offset,gint *start_offset,gint *end_offset);
Creates an AtkAttributeSet which contains the attributes for the run starting at offset.