Index: src/totem-resources.c
===================================================================
--- src/totem-resources.c	(revision 4231)
+++ src/totem-resources.c	(working copy)
@@ -35,7 +35,10 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+
+#ifdef G_OS_UNIX
 #include <sys/resource.h>
+#endif
 
 #include "totem-resources.h"
 
@@ -49,6 +52,7 @@ static gboolean finished = TRUE;
 static void
 set_resource_limits (const char *input)
 {
+#ifdef G_OS_UNIX
 	struct rlimit limit;
 	struct stat buf;
 	rlim_t max;
@@ -78,6 +82,9 @@ set_resource_limits (const char *input)
 	limit.rlim_cur = MAX_HELPER_SECONDS;
 	limit.rlim_max = MAX_HELPER_SECONDS;
 	setrlimit (RLIMIT_CPU, &limit);
+#else
+#warning unimplemented
+#endif
 }
 
 static gpointer
Index: src/backend/bacon-video-widget-gst-0.10.c
===================================================================
--- src/backend/bacon-video-widget-gst-0.10.c	(revision 4231)
+++ src/backend/bacon-video-widget-gst-0.10.c	(working copy)
@@ -59,7 +59,6 @@
 #include <stdio.h>
 
 /* gtk+/gnome */
-#include <gdk/gdkx.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gconf/gconf-client.h>
@@ -231,6 +230,28 @@ static int bvw_signals[LAST_SIGNAL] = { 
 GST_DEBUG_CATEGORY (_totem_gst_debug_cat);
 #define GST_CAT_DEFAULT _totem_gst_debug_cat
 
+
+
+#if defined (GDK_WINDOWING_X11)
+#include <gdk/gdkx.h>
+static gulong
+get_gdk_window_native_window (GdkWindow *window)
+{
+  return GDK_WINDOW_XWINDOW (window);
+}
+#elif defined (GDK_WINDOWING_WIN32)
+#include <gdk/gdkwin32.h>
+static gulong
+get_gdk_window_native_window (GdkWindow *window)
+{
+  return (gulong)GDK_WINDOW_HWND (window);
+}
+#else
+#warning unimplemented
+#endif
+
+
+
 /* FIXME: temporary utility functions so we don't have to up the GStreamer
  * requirements to core/base CVS (0.10.11.1) before the next totem release */
 #define gst_pb_utils_init() /* noop */
@@ -677,8 +698,8 @@ bacon_video_widget_expose_event (GtkWidg
 {
   BaconVideoWidget *bvw = BACON_VIDEO_WIDGET (widget);
   GstXOverlay *xoverlay;
+  gulong window;
   gboolean draw_logo;
-  XID window;
 
   if (event && event->count > 0)
     return TRUE;
@@ -694,8 +715,7 @@ bacon_video_widget_expose_event (GtkWidg
 
   g_mutex_unlock (bvw->priv->lock);
 
-  window = GDK_WINDOW_XWINDOW (bvw->priv->video_window);
-
+  window = get_gdk_window_native_window (bvw->priv->video_window);
   if (xoverlay != NULL && GST_IS_X_OVERLAY (xoverlay))
     gst_x_overlay_set_xwindow_id (xoverlay, window);
 
@@ -4735,7 +4755,7 @@ bvw_element_msg_sync (GstBus *bus, GstMe
   /* This only gets sent if we haven't set an ID yet. This is our last
    * chance to set it before the video sink will create its own window */
   if (gst_structure_has_name (msg->structure, "prepare-xwindow-id")) {
-    XID window;
+    gulong window;
 
     GST_DEBUG ("Handling sync prepare-xwindow-id message");
 
@@ -4746,7 +4766,7 @@ bvw_element_msg_sync (GstBus *bus, GstMe
     g_return_if_fail (bvw->priv->xoverlay != NULL);
     g_return_if_fail (bvw->priv->video_window != NULL);
 
-    window = GDK_WINDOW_XWINDOW (bvw->priv->video_window);
+    window = get_gdk_window_native_window (bvw->priv->video_window);
     gst_x_overlay_set_xwindow_id (bvw->priv->xoverlay, window);
   }
 }
Index: src/bacon-message-connection.c
===================================================================
--- src/bacon-message-connection.c	(revision 4231)
+++ src/bacon-message-connection.c	(working copy)
@@ -19,14 +19,18 @@
 
 #include "config.h"
 
+#include <glib.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef G_OS_UNIX
 #include <sys/socket.h>
 #include <sys/un.h>
+#endif
 #include <errno.h>
 
 #include "bacon-message-connection.h"
@@ -57,6 +61,7 @@ struct BaconMessageConnection {
 	gpointer data;
 };
 
+#ifdef G_OS_UNIX
 static gboolean
 test_is_socket (const char *path)
 {
@@ -285,6 +290,7 @@ try_client (BaconMessageConnection *conn
 
 	return setup_connection (conn);
 }
+#endif
 
 BaconMessageConnection *
 bacon_message_connection_new (const char *prefix)
@@ -294,6 +300,7 @@ bacon_message_connection_new (const char
 	g_return_val_if_fail (prefix != NULL, NULL);
 
 	conn = g_new0 (BaconMessageConnection, 1);
+#ifdef G_OS_UNIX
 	conn->path = socket_filename (prefix);
 
 	if (test_is_socket (conn->path) == FALSE)
@@ -321,6 +328,9 @@ bacon_message_connection_new (const char
 		conn->is_server = TRUE;
 		return conn;
 	}
+#else
+	conn->fd = -1;
+#endif
 
 	conn->is_server = FALSE;
 	return conn;
@@ -381,10 +391,12 @@ bacon_message_connection_send (BaconMess
 	g_return_if_fail (conn != NULL);
 	g_return_if_fail (message != NULL);
 
+#ifdef G_OS_UNIX
 	g_io_channel_write_chars (conn->chan, message, strlen (message),
 				  NULL, NULL);
 	g_io_channel_write_chars (conn->chan, "\n", 1, NULL, NULL);
 	g_io_channel_flush (conn->chan, NULL);
+#endif
 }
 
 gboolean
Index: src/totem-interface.c
===================================================================
--- src/totem-interface.c	(revision 4231)
+++ src/totem-interface.c	(working copy)
@@ -34,7 +34,9 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
+#endif
 
 #include "totem-interface.h"
 
@@ -181,16 +183,18 @@ totem_interface_get_full_path (const cha
 static GdkWindow *
 totem_gtk_plug_get_toplevel (GtkPlug *plug)
 {
-	Window root, parent, *children;
-	guint nchildren;
 	GdkNativeWindow xid;
 
 	g_return_val_if_fail (GTK_IS_PLUG (plug), NULL);
 
 	xid = gtk_plug_get_id (plug);
 
+#ifdef GDK_WINDOWING_X11
 	do
 	{
+		Window root, parent, *children;
+		guint nchildren;
+
 		/* FIXME: multi-head */
 		if (XQueryTree (GDK_DISPLAY (), xid, &root,
 					&parent, &children, &nchildren) == 0)
@@ -208,6 +212,10 @@ totem_gtk_plug_get_toplevel (GtkPlug *pl
 		xid = parent;
 	}
 	while (TRUE);
+#else
+#warning unimplemented
+	return NULL;
+#endif
 }
 
 void
