]> Pileus Git - ~andy/gtk/blob - gdk/x11/gdkpango-x11.c
Document expose event->region change and that gtk_widget_event doesn't
[~andy/gtk] / gdk / x11 / gdkpango-x11.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 2000 Red Hat, Inc. 
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #include <config.h>
21 #include <stdlib.h>
22
23 #include "gdkprivate-x11.h"
24 #include "gdkpango.h"
25 #include <pango/pangox.h>
26 #ifdef HAVE_XFT
27 #include <pango/pangoxft.h>
28 #endif
29
30 PangoContext *
31 gdk_pango_context_get (void)
32 {
33 #ifdef HAVE_XFT
34   static gint use_xft = -1;
35   if (use_xft == -1)
36     {
37       char *val = g_getenv ("GDK_USE_XFT");
38
39       use_xft = val && (atoi (val) != 0);
40     }
41   
42   if (use_xft)
43     return pango_xft_get_context (GDK_DISPLAY (), DefaultScreen (GDK_DISPLAY ()));
44   else
45 #endif /* HAVE_XFT */
46     return pango_x_get_context (GDK_DISPLAY ());
47 }