diffing dir...
Sun Oct 7 15:11:58 BST 2012 Hamish Mackenzie <ham...@go...>
* Fixes for Gtk 3 on Linux
Ignore-this: 1b0050db0051982883743214e9241ff8
hunk ./gtk/Graphics/UI/Gtk/Embedding/Embedding.hsc 30
-#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) && GTK_MAJOR_VERSION < 3
hunk ./gtk/Graphics/UI/Gtk/Embedding/Embedding.hsc 38
-#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) && GTK_MAJOR_VERSION < 3
hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs 193
+#if GTK_MAJOR_VERSION < 3
hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs 195
+#else
+ {# call pure unsafe gdk_window_get_type #}
+#endif
hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs 119
+import Data.Maybe (isJust)
hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs 194
- -> IO DrawWindow -- ^ returns the window of the plug if available, or
- -- {@NULL@, FIXME: this should probably be converted to a
- -- Maybe data type}
+ -> IO (Maybe DrawWindow) -- ^ returns the window of the plug if available,
+ -- or Nothing
hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs 197
- makeNewGObject mkDrawWindow $
+ maybeNull (makeNewGObject mkDrawWindow) $
hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs 200
+
+#if GTK_MAJOR_VERSION >= 3
+socketHasPlug :: SocketClass s => s -> IO Bool
+socketHasPlug = liftM isJust . socketGetPlugWindow
+#endif
+
hunk ./gtk/Graphics/UI/Gtk/General/Structs.hsc 620
+#if GTK_MAJOR_VERSION < 3
hunk ./gtk/Graphics/UI/Gtk/General/Structs.hsc 622
+#else
+newtype NativeWindowId = NativeWindowId #{gtk2hs_type Window} deriving (Eq, Show)
+#endif
hunk ./gtk/hsgtk.h 6
+#if GTK_MAJOR_VERSION >= 3
+#include <gtk/gtkx.h>
+#endif
+
+#undef Bool
+#undef True
+#undef False
+#undef Button1 [_$_]
+#undef Button2
+#undef Button3
+#undef Button4
+#undef Button5
+#undef Button1Mask [_$_]
+#undef Button2Mask
+#undef Button3Mask
+#undef Button4Mask
+#undef Button5Mask
+
+#undef ShiftMask
+#undef LockMask
+#undef ControlMask
+#undef Mod1Mask
+#undef Mod2Mask
+#undef Mod3Mask
+#undef Mod4Mask
+#undef Mod5Mask
+
+#undef None
+#undef ParentRelative
+#undef CopyFromParent
+#undef PointerWindow
+#undef InputFocus
+#undef PointerRoot
+#undef AnyPropertyType
+#undef AnyKey
+#undef AnyButton
+#undef AllTemporary
+#undef CurrentTime
+#undef NoSymbol
+
+#undef NoEventMask
+#undef KeyPressMask
+#undef KeyReleaseMask
+#undef ButtonPressMask
+#undef ButtonReleaseMask
+#undef EnterWindowMask
+#undef LeaveWindowMask
+#undef PointerMotionMask
+#undef PointerMotionHintMask
+#undef Button1MotionMask
+#undef Button2MotionMask
+#undef Button3MotionMask
+#undef Button4MotionMask
+#undef Button5MotionMask
+#undef ButtonMotionMask
+#undef KeymapStateMask
+#undef ExposureMask
+#undef VisibilityChangeMask
+#undef StructureNotifyMask
+#undef ResizeRedirectMask
+#undef SubstructureNotifyMask
+#undef SubstructureRedirectMask
+#undef FocusChangeMask
+#undef PropertyChangeMask
+#undef ColormapChangeMask
+#undef OwnerGrabButtonMask
|