summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-07-18 06:06:41 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-07-18 06:06:41 +0000
commit5232745f652495ec1ab73fcb7368fe858cc0099c (patch)
tree0ef350a68f35220a40eb6dd61a8c1bd991df7ece /examples
parentca5b24d14066ce35f5b92d117beee0e3605b2f4b (diff)
downloadpango-5232745f652495ec1ab73fcb7368fe858cc0099c.tar.gz
Add the pangowin32 sources.
2000-07-18 Tor Lillqvist <tml@iki.fi> * pango/Makefile.am (EXTRA_DIST): Add the pangowin32 sources. * pango/pangox.c (lang_texts): Add some Latin-1 to the Finnish and Swedish strings. * modules/module.def: New file. * modules/Makefile.am (EXTRA_DIST): Add it. * modules/basic/Makefile.am (EXTRA_DIST): Add basic-win32.c. * */makefile.mingw: Small updates. * pango/pangowin32.c * pango/pangowin32-fontmap.c * modules/basic/basic-win32.c * examples/viewer-win32.c: Bug fixes. Remove dead code. Now the Win32 implementation seems to work, except for a few glitches.
Diffstat (limited to 'examples')
-rw-r--r--examples/makefile.mingw2
-rw-r--r--examples/viewer-win32.c5
2 files changed, 2 insertions, 5 deletions
diff --git a/examples/makefile.mingw b/examples/makefile.mingw
index 259e02af..b20101d0 100644
--- a/examples/makefile.mingw
+++ b/examples/makefile.mingw
@@ -18,5 +18,5 @@ all : \
cp $< $@
viewer-win32.exe : viewer-win32.o
- $(CC) -o $@ $< -L ../pango -lpango-$(PANGO_VER) -lpangowin32-$(PANGO_VER) $(GTK_LIBS) $(GLIB_LIBS) -gdi32
+ $(CC) -o $@ $< $(OPTIMIZE) -L ../pango -lpango-$(PANGO_VER) -lpangowin32-$(PANGO_VER) $(GTK_LIBS) $(GLIB_LIBS) -gdi32
diff --git a/examples/viewer-win32.c b/examples/viewer-win32.c
index f5007a7d..969b6e9b 100644
--- a/examples/viewer-win32.c
+++ b/examples/viewer-win32.c
@@ -126,9 +126,6 @@ split_paragraphs (char *text)
Paragraph *para = g_new (Paragraph, 1);
para->text = last_para;
para->length = p - last_para;
- /* Don't include the newline */
- if (wc == '\n')
- para->length--;
para->layout = pango_layout_new (context);
pango_layout_set_text (para->layout, para->text, para->length);
para->height = 0;
@@ -302,7 +299,7 @@ draw (GtkWidget *layout, GdkRectangle *area)
if (height + para->height >= GTK_LAYOUT (layout)->yoffset + area->y)
{
- GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_BACKGROUND;
+ GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_BACKGROUND|GDK_GC_FONT;
HDC hdc;
hdc = gdk_win32_hdc_get (GTK_LAYOUT (layout)->bin_window,