]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/gtkfont.h
Compile fix for GTK 3.18: avoid gtk_adjustment_changed().
[PuTTY.git] / unix / gtkfont.h
index b56640c5b7bdefc976729a9e9f9751fc3ca3c2c5..6aa8ce2eb302d662fe4936aafbd77694dd401f82 100644 (file)
 #define DRAW_TEXT_CAIRO
 #endif
 
+#if GTK_CHECK_VERSION(3,0,0) || defined GDK_DISABLE_DEPRECATED
+/*
+ * Where the facility is available, we prefer to render text on to a
+ * persistent server-side pixmap, and redraw windows by simply
+ * blitting rectangles of that pixmap into them as needed. This is
+ * better for performance since we avoid expensive font rendering
+ * calls where possible, and it's particularly good over a non-local X
+ * connection because the response to an expose event can now be a
+ * very simple rectangle-copy operation rather than a lot of fiddly
+ * drawing or bitmap transfer.
+ *
+ * However, GTK is deprecating the use of server-side pixmaps, so we
+ * have to disable this mode under some circumstances.
+ */
+#define NO_BACKING_PIXMAPS
+#endif
+
 /*
  * Exports from gtkfont.c.
  */
@@ -119,6 +136,12 @@ void unifont_destroy(unifont *font);
 void unifont_draw_text(unifont_drawctx *ctx, unifont *font,
                        int x, int y, const wchar_t *string, int len,
                        int wide, int bold, int cellwidth);
+/* Same as unifont_draw_text, but expects 'string' to contain one
+ * normal char plus combining chars, and overdraws them all in the
+ * same character cell. */
+void unifont_draw_combining(unifont_drawctx *ctx, unifont *font,
+                            int x, int y, const wchar_t *string, int len,
+                            int wide, int bold, int cellwidth);
 
 /*
  * This function behaves exactly like the low-level unifont_create,