summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2001-01-15 22:12:31 +0000
committerTor Lillqvist <tml@src.gnome.org>2001-01-15 22:12:31 +0000
commit18e95c4e0f2547e91f968229310a00f71e2ca640 (patch)
treec845219ca263e87820ee346bb2d9c403c5db972d /gdk
parent420e4ee2f7de785b6f6a661d08e590e0b4b2a773 (diff)
downloadgdk-pixbuf-18e95c4e0f2547e91f968229310a00f71e2ca640.tar.gz
Include <stdlib.h> for getenv().
2001-01-16 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkvisual-win32.c: Include <stdlib.h> for getenv(). * gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't use GDK_COLORMAP_PRIVATE_DATA on a potentially NULL GdkColormap. * gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Adapt calls to g_{locale,filename}_{to,from}_utf8 to match current API. * gtk/makefile.msc.in (gtk_OBJECTS) * gtk/makefile.mingw.in (gtk_OBJECTS): Add gtkwindow-decorate. * gtk/gtk.def: Update.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/win32/gdkevents-win32.c7
-rw-r--r--gdk/win32/gdkfont-win32.c6
-rw-r--r--gdk/win32/gdkvisual-win32.c2
3 files changed, 10 insertions, 5 deletions
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 60995d410..9b48c9809 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1622,6 +1622,7 @@ gdk_event_translate (GdkEvent *event,
window_impl = (window ? GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl) : NULL))
GdkWindow *orig_window, *new_window;
+ GdkColormap *colormap;
GdkColormapPrivateWin32 *colormap_private;
GdkPixmap *pixmap;
GdkPixmapImplWin32 *pixmap_impl;
@@ -2595,9 +2596,11 @@ gdk_event_translate (GdkEvent *event,
if (GDK_WINDOW_DESTROYED (window))
break;
- colormap_private = GDK_COLORMAP_PRIVATE_DATA (GDK_DRAWABLE_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl)->colormap);
+ colormap = GDK_DRAWABLE_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl)->colormap;
+ if (colormap)
+ colormap_private = GDK_COLORMAP_PRIVATE_DATA (colormap);
hdc = (HDC) msg->wParam;
- if (colormap_private && colormap_private->xcolormap->rc_palette)
+ if (colormap && colormap_private->xcolormap->rc_palette)
{
int k;
diff --git a/gdk/win32/gdkfont-win32.c b/gdk/win32/gdkfont-win32.c
index 3b26d7f73..69c893f02 100644
--- a/gdk/win32/gdkfont-win32.c
+++ b/gdk/win32/gdkfont-win32.c
@@ -224,7 +224,7 @@ logfont_to_xlfd (const LOGFONT *lfp,
/* Convert the facename Windows fives us from the locale-dependent
* codepage to UTF-8.
*/
- utf8_facename = g_filename_to_utf8 (lfp->lfFaceName, NULL);
+ utf8_facename = g_filename_to_utf8 (lfp->lfFaceName, -1, NULL, NULL, NULL);
/* Replace characters illegal in an XLFD with hex escapes. */
p = facename;
@@ -1284,7 +1284,7 @@ gdk_font_load_internal (const gchar *font_name)
logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
logfont.lfQuality = PROOF_QUALITY;
logfont.lfPitchAndFamily = DEFAULT_PITCH;
- fn = g_filename_from_utf8 (font_name, NULL);
+ fn = g_filename_from_utf8 (font_name, -1, NULL, NULL, NULL);
strcpy (logfont.lfFaceName, fn);
g_free (fn);
}
@@ -1473,7 +1473,7 @@ gdk_font_load_internal (const gchar *font_name)
logfont.lfPitchAndFamily = VARIABLE_PITCH;
else
logfont.lfPitchAndFamily = DEFAULT_PITCH;
- fn = g_filename_from_utf8 (family, NULL);
+ fn = g_filename_from_utf8 (family, -1, NULL, NULL, NULL);
strcpy (logfont.lfFaceName, fn);
g_free (fn);
}
diff --git a/gdk/win32/gdkvisual-win32.c b/gdk/win32/gdkvisual-win32.c
index e76f1476f..9e1c35345 100644
--- a/gdk/win32/gdkvisual-win32.c
+++ b/gdk/win32/gdkvisual-win32.c
@@ -29,6 +29,8 @@
#include "gdkvisual.h"
#include "gdkprivate-win32.h"
+#include <stdlib.h>
+
static void gdk_visual_decompose_mask (gulong mask,
gint *shift,
gint *prec);