diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-04-05 00:31:59 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-04-05 00:31:59 +0000 |
commit | 613302136667231bcefd772b419369516eb3bf45 (patch) | |
tree | 919ed907f3ca69f79210d0778c65df8bec97d4d0 /examples | |
parent | 52f2e805bf993f711d09ba6fe4972c7f7ee33eae (diff) | |
download | pango-613302136667231bcefd772b419369516eb3bf45.tar.gz |
Add user data to PangoContext
Tue Apr 4 20:13:06 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-context.h: Add user data to PangoContext
* pango/pangox.[ch] examples/viewer.c: Rework system for create GC's
so that the necessary information is stored on the PangoContext
instead of being passed to layout_render()
* pango/utils.[ch] pango/pango-context.c: fribidi-0.1.9
wants UCS-4 not UCS2; switch accordingly.
* pango/fonts.c pango/pango-font.h pango/pangox.c: Add functions
to get overall font metrics, possibly per-language. (Right now,
just font ascent, descent.) The implementation of this for
X is horribly complex.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/viewer.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/examples/viewer.c b/examples/viewer.c index c966865f..ccff0b77 100644 --- a/examples/viewer.c +++ b/examples/viewer.c @@ -289,17 +289,6 @@ size_allocate (GtkWidget *layout, GtkAllocation *allocation) gtk_adjustment_set_value (GTK_LAYOUT (layout)->vadjustment, height - allocation->height); } -GC -get_gc_func (PangoAttrColor *fg_color, void *data) -{ - return GDK_GC_XGC (data); -} - -void -free_gc_func (GC gc, void *data) -{ -} - /* Handle a draw/expose by finding the paragraphs that intersect * the region and reexposing them. */ @@ -326,8 +315,8 @@ draw (GtkWidget *layout, GdkRectangle *area) if (height + para->height >= GTK_LAYOUT (layout)->yoffset + area->y) pango_x_render_layout (GDK_DISPLAY(), GDK_WINDOW_XWINDOW (GTK_LAYOUT (layout)->bin_window), - para->layout, 0, height - GTK_LAYOUT (layout)->yoffset, - get_gc_func, free_gc_func, layout->style->text_gc[GTK_STATE_NORMAL]); + GDK_GC_XGC (layout->style->text_gc[GTK_STATE_NORMAL]), + para->layout, 0, height - GTK_LAYOUT (layout)->yoffset); height += para->height; } |