diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-06-24 20:22:55 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-07-05 16:08:07 -0400 |
commit | 1f2b8a654509ad4a2e92d09b738c9408f38e6768 (patch) | |
tree | edf75516fdb68f51ca6ea8f56f1d8162319b0d9e /gtk/gtkpango.h | |
parent | 53535f03cf4f5caaa38ed963c4f5e03939e78333 (diff) | |
download | gtk+-1f2b8a654509ad4a2e92d09b738c9408f38e6768.tar.gz |
Add some aux. pango api to help AtkText implementations
These functions are implementations of the AtkText api on top
of a PangoLayout, and are intended to replace GailTextUtil.
Since gtkpango.h is a private header, also remove the individual
inclusion prohibition.
Diffstat (limited to 'gtk/gtkpango.h')
-rw-r--r-- | gtk/gtkpango.h | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/gtk/gtkpango.h b/gtk/gtkpango.h index d02c7a655c..523d663529 100644 --- a/gtk/gtkpango.h +++ b/gtk/gtkpango.h @@ -24,23 +24,62 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ -#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) -#error "Only <gtk/gtk.h> can be included directly." -#endif - #ifndef __GTK_PANGO_H__ #define __GTK_PANGO_H__ #include <pango/pangocairo.h> - +#include <atk/atk.h> G_BEGIN_DECLS -void -_gtk_pango_fill_layout (cairo_t *cr, - PangoLayout *layout); +void _gtk_pango_fill_layout (cairo_t *cr, + PangoLayout *layout); + + +AtkAttributeSet *_gtk_pango_get_default_attributes (AtkAttributeSet *attributes, + PangoLayout *layout); + +AtkAttributeSet *_gtk_pango_get_run_attributes (AtkAttributeSet *attributes, + PangoLayout *layout, + gint offset, + gint *start_offset, + gint *end_offset); + +gint _gtk_pango_move_chars (PangoLayout *layout, + gint offset, + gint count); +gint _gtk_pango_move_words (PangoLayout *layout, + gint offset, + gint count); +gint _gtk_pango_move_sentences (PangoLayout *layout, + gint offset, + gint count); +gint _gtk_pango_move_lines (PangoLayout *layout, + gint offset, + gint count); + +gboolean _gtk_pango_is_inside_word (PangoLayout *layout, + gint offset); +gboolean _gtk_pango_is_inside_sentence (PangoLayout *layout, + gint offset); + +gchar *_gtk_pango_get_text_before (PangoLayout *layout, + AtkTextBoundary boundary_type, + gint offset, + gint *start_offset, + gint *end_offset); +gchar *_gtk_pango_get_text_at (PangoLayout *layout, + AtkTextBoundary boundary_type, + gint offset, + gint *start_offset, + gint *end_offset); +gchar *_gtk_pango_get_text_after (PangoLayout *layout, + AtkTextBoundary boundary_type, + gint offset, + gint *start_offset, + gint *end_offset); G_END_DECLS |