putty/unix
Simon Tatham f750a18587 Refactor the GTK drawing system to do both GDK and Cairo.
We're going to have to use Cairo in the GTK3 port, because that's all
GTK3 supports; but we still need old-style GDK for GTK1 support, and
also for performance reasons in GTK2 (see below). Hence, this change
completely restructures GTK PuTTY's drawing code so that there's a
central 'drawing context' structure which contains a type code
indicating GDK or Cairo, and then either some GDK gubbins or some
Cairo gubbins as appropriate; all actual drawing is abstracted through
a set of routines which test the type code in that structure and do
one thing or another. And because the type code is tested at run time,
both sets of drawing primitives can be compiled in at once, and where
possible, they will be.

X server-side bitmap fonts are still supported in the Cairo world, but
because Cairo drawing is entirely client-side, they have to work by
cheekily downloading each glyph bitmap from the server when it's first
needed, and building up a client-side cache of 'cairo_surface_t's
containing the bitmaps with which we then draw on the window. This
technique works, but it's rather slow; hence, even in GTK2, we keep
the GDK drawing back end compiled in, and switch over to it when the
main selected font is a bitmap one.

One visible effect of the new Cairo routines is in the double-width
and double-height text you can get by sending ESC # 3, ESC # 4 and
ESC # 6 escape sequences. In GDK, that's always been done by a really
horrible process of manually scaling the bitmap, server-side, column
by column and row by row, causing each pixel to be exactly doubled or
quadrupled. But in Cairo, we can just set a transformation matrix, and
then that takes effect _before_ the scalable fonts are rendered - so
the results are visibly nicer, and use all the available resolution.

(Sadly, if you're using a server-side bitmap font as your primary one,
then the GDK backend will be selected for all drawing in the terminal
as a whole - so in that situation, even fallback characters absent
from the primary font and rendered by Pango will get the old GDK
scaling treatment. It's only if your main font is scalable, so that
the Cairo backend is selected, that DW/DH characters will come out
looking nice.)
2015-08-15 21:05:56 +01:00
..
configure Move the Unix configure script up to the top level. 2014-02-22 18:01:32 +00:00
gtkask.c Refactor the GTK drawing system to do both GDK and Cairo. 2015-08-15 21:05:56 +01:00
gtkcfg.c Fix two small memory leaks in config mechanism. 2015-05-08 18:57:18 +01:00
gtkcols.c GTK 3 prep: use the glib names for base object types. 2015-08-08 17:55:10 +01:00
gtkcols.h GTK 3 prep: use the glib names for base object types. 2015-08-08 17:55:10 +01:00
gtkcompat.h Use gtkcompat.h to slim down a few ifdefs. 2015-08-09 09:59:25 +01:00
gtkdlg.c GTK 3 prep: write a replacement for gtk_quit_add(). 2015-08-09 11:39:40 +01:00
gtkfont.c Refactor the GTK drawing system to do both GDK and Cairo. 2015-08-15 21:05:56 +01:00
gtkfont.h Refactor the GTK drawing system to do both GDK and Cairo. 2015-08-15 21:05:56 +01:00
gtkwin.c Refactor the GTK drawing system to do both GDK and Cairo. 2015-08-15 21:05:56 +01:00
unix.h GTK 3 prep: write a replacement for gtk_quit_add(). 2015-08-09 11:39:40 +01:00
ux_x11.c Post-release destabilisation! Completely remove the struct type 2011-07-14 18:52:21 +00:00
uxagentc.c Support synchronous agent requests on Unix. 2015-05-11 17:52:19 +01:00
uxcfg.c Post-release destabilisation! Completely remove the struct type 2011-07-14 18:52:21 +00:00
uxcons.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
uxgen.c Fix another giant batch of resource leaks. (Mostly memory, but there's 2013-07-14 10:46:07 +00:00
uxgss.c Post-release destabilisation! Completely remove the struct type 2011-07-14 18:52:21 +00:00
uxmisc.c Fix a compile warning with -DDEBUG. 2015-05-18 21:17:21 +01:00
uxnet.c Log identifying information for the other end of connections. 2015-05-18 14:03:10 +01:00
uxnoise.c Fix minor file descriptor leaks. Found by cppcheck, reported by Tim Kosse. 2009-09-16 22:28:20 +00:00
uxpeer.c Log identifying information for the other end of connections. 2015-05-18 14:03:10 +01:00
uxpgnt.c Unix Pageant: man page and online help. 2015-05-19 18:24:04 +01:00
uxplink.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
uxprint.c Update to r8614: another -D_FORTIFY_SOURCE=2 fix. 2010-02-20 11:21:25 +00:00
uxproxy.c Log identifying information for the other end of connections. 2015-05-18 14:03:10 +01:00
uxpterm.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
uxpty.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
uxputty.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
uxsel.c Changed my mind about r7164. Instead of checking for zero flags 2007-01-26 20:00:32 +00:00
uxser.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
uxsftp.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
uxshare.c Move make_dir_and_check_ours() out into uxmisc.c. 2015-05-05 20:16:22 +01:00
uxsignal.c Rename some of the more stupidly named files in the Unix back end. 2004-12-31 13:02:46 +00:00
uxstore.c Fix format string vulnerabilities. 2015-08-10 20:03:41 +01:00
uxucs.c Giant const-correctness patch of doom! 2015-05-15 12:47:44 +01:00
xkeysym.c Support for non-ISO-8859-1 X keysyms. So in particular, pterm in a 2003-04-27 11:10:48 +00:00
xpmptcfg.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmpterm.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmpucfg.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmputty.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00