Pango Interaction

Name

Pango Interaction -- 

Synopsis


#include <gdk/gdk.h>


PangoContext* gdk_pango_context_get         (void);
void        gdk_pango_context_set_colormap  (PangoContext *context,
                                             GdkColormap *colormap);
struct      GdkPangoAttrEmbossed;
struct      GdkPangoAttrStipple;
PangoAttribute* gdk_pango_attr_embossed_new (gboolean embossed);
PangoAttribute* gdk_pango_attr_stipple_new  (GdkBitmap *stipple);
GdkRegion*  gdk_pango_layout_get_clip_region
                                            (PangoLayout *layout,
                                             gint x_origin,
                                             gint y_origin,
                                             gint *index_ranges,
                                             gint n_ranges);
GdkRegion*  gdk_pango_layout_line_get_clip_region
                                            (PangoLayoutLine *line,
                                             gint x_origin,
                                             gint y_origin,
                                             gint *index_ranges,
                                             gint n_ranges);

Description

Details

gdk_pango_context_get ()

PangoContext* gdk_pango_context_get         (void);

Creates a PangoContext for the default GDK display.

The context must be freed when you're finished with it.

When using GTK+, normally you should use gtk_widget_get_pango_context() instead of this function, to get the appropriate context for the widget you intend to render text onto.


gdk_pango_context_set_colormap ()

void        gdk_pango_context_set_colormap  (PangoContext *context,
                                             GdkColormap *colormap);

Sets the colormap to be used for drawing with context. If you obtained your context from gtk_widget_get_pango_context() or gtk_widget_create_pango_context(), the colormap will already be set to the colormap for the widget, so you shouldn't need this function.


struct GdkPangoAttrEmbossed

struct GdkPangoAttrEmbossed
{
  PangoAttribute attr;
  gboolean embossed;
};

A Pango text attribute containing a embossed bitmap to be used when rendering the text.


struct GdkPangoAttrStipple

struct GdkPangoAttrStipple
{
  PangoAttribute attr;
  GdkBitmap *stipple;
};

A Pango text attribute containing a stipple bitmap to be used when rendering the text.


gdk_pango_attr_embossed_new ()

PangoAttribute* gdk_pango_attr_embossed_new (gboolean embossed);

Creates a new attribute containing a embossed bitmap to be used when rendering the text.


gdk_pango_attr_stipple_new ()

PangoAttribute* gdk_pango_attr_stipple_new  (GdkBitmap *stipple);

Creates a new attribute containing a stipple bitmap to be used when rendering the text.


gdk_pango_layout_get_clip_region ()

GdkRegion*  gdk_pango_layout_get_clip_region
                                            (PangoLayout *layout,
                                             gint x_origin,
                                             gint y_origin,
                                             gint *index_ranges,
                                             gint n_ranges);

Obtains a clip region which contains the areas where the given ranges of text would be drawn. x_origin and y_origin are the same position you would pass to gdk_draw_layout_line(). index_ranges should contain ranges of bytes in the layout's text.


gdk_pango_layout_line_get_clip_region ()

GdkRegion*  gdk_pango_layout_line_get_clip_region
                                            (PangoLayoutLine *line,
                                             gint x_origin,
                                             gint y_origin,
                                             gint *index_ranges,
                                             gint n_ranges);

Obtains a clip region which contains the areas where the given ranges of text would be drawn. x_origin and y_origin are the same position you would pass to gdk_draw_layout_line(). index_ranges should contain ranges of bytes in the layout's text. The clip region will include space to the left or right of the line (to the layout bounding box) if you have indexes above or below the indexes contained inside the line. This is to draw the selection all the way to the side of the layout. However, the clip region is in line coordinates, not layout coordinates.