]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtksocket.c
Adapt cast macros to standard.
[~andy/gtk] / gtk / gtksocket.c
index b1f6d019dfc27e5b0bf14e6e9aea14401dad32b5..d13cd995ec6ad12469e9a0072731b86ba7b08e15 100644 (file)
 
 /* By Owen Taylor <otaylor@gtk.org>              98/4/4 */
 
-#include "gdk/gdkx.h"
+/*
+ * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ */
+
+#include "gdkx.h"
 #include "gdk/gdkkeysyms.h"
 #include "gtkwindow.h"
 #include "gtksignal.h"
 #include "gtksocket.h"
 #include "gtkdnd.h"
 
+#ifdef GDK_WINDOWING_X11
+
 /* Forward declararations */
 
 static void gtk_socket_class_init               (GtkSocketClass    *klass);
@@ -54,10 +63,10 @@ static GdkFilterReturn gtk_socket_filter_func   (GdkXEvent *gdk_xevent,
 
 static GtkWidgetClass *parent_class = NULL;
 
-guint
+GtkType
 gtk_socket_get_type ()
 {
-  static guint socket_type = 0;
+  static GtkType socket_type = 0;
 
   if (!socket_type)
     {
@@ -298,8 +307,8 @@ gtk_socket_size_request (GtkWidget      *widget,
       gdk_error_trap_pop ();
     }
 
-  requisition->width = socket->request_width;
-  requisition->height = socket->request_height;
+  requisition->width = MAX (socket->request_width, 1);
+  requisition->height = MAX (socket->request_height, 1);
 }
 
 static void
@@ -738,3 +747,27 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
 
   return return_val;
 }
+
+#elif defined (GDK_WINDOWING_WIN32)
+
+guint
+gtk_socket_get_type ()
+{
+  g_error ("GtkSocket not implemented");
+  return 42;
+}
+
+GtkWidget*
+gtk_socket_new ()
+{
+  g_error ("GtkSocket not implemented");
+  return NULL;
+}
+
+void           
+gtk_socket_steal (GtkSocket *socket, guint32 id)
+{
+  g_error ("GtkSocket not implemented");
+}
+
+#endif /* GDK_WINDOWING */