diff --git a/Graphics/UI/Gtk.chs b/Graphics/UI/Gtk.chs
--- a/Graphics/UI/Gtk.chs
+++ b/Graphics/UI/Gtk.chs
@@ -26,7 +26,7 @@
 --   DialogMessage : has only one variadic function which cannot be bound.
 --		     The same functionality can be simulated with Dialog.
 --   Item :	     The only child of this abstract class is MenuItem. The
---		     three signals Item defines are therefore bound in 
+--		     three signals Item defines are therefore bound in
 --		     MenuItem.
 --
 -- TODO
@@ -279,9 +279,11 @@
   module Graphics.UI.Gtk.Abstract.Scrollbar,
   module Graphics.UI.Gtk.Abstract.Separator,
   module Graphics.UI.Gtk.Abstract.Widget,
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
   -- * Cross-process embedding
   module Graphics.UI.Gtk.Embedding.Plug,
   module Graphics.UI.Gtk.Embedding.Socket,
+#endif
   -- * Non-widgets
   module System.Glib.Signals,
   module System.Glib.Attributes,
@@ -553,8 +555,10 @@
 import Graphics.UI.Gtk.Abstract.Separator
 import Graphics.UI.Gtk.Abstract.Widget
 -- cross-process embedding
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
 import Graphics.UI.Gtk.Embedding.Plug
 import Graphics.UI.Gtk.Embedding.Socket
+#endif
 
 -- non widgets
 import System.Glib.Signals
@@ -577,7 +581,7 @@
   isA
   )
 import Graphics.UI.Gtk.Builder
-  
+
 -- pango modules
 import Graphics.Rendering.Pango.Context
 import Graphics.Rendering.Pango.Markup
diff --git a/Graphics/UI/Gtk/Abstract/Bin.chs b/Graphics/UI/Gtk/Abstract/Bin.chs
--- a/Graphics/UI/Gtk/Abstract/Bin.chs
+++ b/Graphics/UI/Gtk/Abstract/Bin.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Abstract.Bin (
 -- * Detail
--- 
+--
 -- | The 'Bin' widget is a container with just one child. It is not very
 -- useful itself, but it is useful for deriving subclasses, since it provides
 -- common code needed for handling a single child widget.
diff --git a/Graphics/UI/Gtk/Abstract/Box.chs b/Graphics/UI/Gtk/Abstract/Box.chs
--- a/Graphics/UI/Gtk/Abstract/Box.chs
+++ b/Graphics/UI/Gtk/Abstract/Box.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Abstract.Box (
 -- * Detail
--- 
+--
 -- | 'Box' is an abstract widget which encapsulates functionality for a
 -- particular kind of container, one that organizes a variable number of
 -- widgets into a rectangular area. 'Box' currently has two derived classes,
@@ -167,12 +167,12 @@
     (fromIntegral padding)
   where (expand, fill) = fromPacking packing
 
--- | Adds the @child@ widget to the box, packed with reference to the end of 
+-- | Adds the @child@ widget to the box, packed with reference to the end of
 -- the box. The
 -- @child@ is packed after (away from end of) any other child packed with
 -- reference to the end of the box.
 --
--- Note that 
+-- Note that
 -- for 'boxPackEnd' the 'PackNatural' option will move a child to the right in
 -- an 'HBox' or to the bottom in an 'VBox' if there is more space availble.
 --
@@ -278,7 +278,7 @@
 
 -- | Returns information about how @child@ is packed into the box.
 --
--- Returns information on the behaviour if free space is available 
+-- Returns information on the behaviour if free space is available
 -- (in 'Packing'), the additional padding for this widget and if the widget
 -- was inserted at the start or end of the container ('PackType').
 --
diff --git a/Graphics/UI/Gtk/Abstract/Container.chs b/Graphics/UI/Gtk/Abstract/Container.chs
--- a/Graphics/UI/Gtk/Abstract/Container.chs
+++ b/Graphics/UI/Gtk/Abstract/Container.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Abstract.Container (
 -- * Detail
--- 
+--
 -- | A Gtk+ user interface is constructed by nesting widgets inside widgets.
 -- Container widgets are the inner nodes in the resulting tree of widgets: they
 -- contain other widgets. So, for example, you might have a 'Window' containing
@@ -55,7 +55,7 @@
 -- out in two phases, size requisition and size allocation.
 
 -- ** Size Requisition
--- 
+--
 -- | The size requisition of a widget is it's desired width and height. This
 -- is represented by a 'Requisition'.
 --
@@ -72,7 +72,7 @@
 -- will get a requisition back from its child.
 
 -- ** Size Allocation
--- 
+--
 -- | When the top-level widget has determined how much space its child would
 -- like to have, the second phase of the size negotiation, size allocation,
 -- begins. Depending on its configuration (see 'windowSetResizable'), the
@@ -94,7 +94,7 @@
 -- request is only a request, and widgets must be able to cope with any size.
 
 -- ** Child attributes
--- 
+--
 -- | 'Container' introduces child attributes - these are object attributes
 -- that are not specific to either the container or the contained widget, but
 -- rather to their relation. Typical examples of child attributes are the
@@ -111,7 +111,7 @@
 -- Whereas child attributes take the child object as a parameter:
 --
 -- > set container [ attr child := value ]
--- 
+--
 -- And similarily for getting a child attribute's value:
 --
 -- > value <- get container (attr child)
diff --git a/Graphics/UI/Gtk/Abstract/Misc.chs b/Graphics/UI/Gtk/Abstract/Misc.chs
--- a/Graphics/UI/Gtk/Abstract/Misc.chs
+++ b/Graphics/UI/Gtk/Abstract/Misc.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Abstract.Misc (
 -- * Detail
--- 
+--
 -- | The 'Misc' widget is an abstract widget which is not useful itself, but
 -- is used to derive subclasses which have alignment and padding attributes.
 --
diff --git a/Graphics/UI/Gtk/Abstract/Object.chs b/Graphics/UI/Gtk/Abstract/Object.chs
--- a/Graphics/UI/Gtk/Abstract/Object.chs
+++ b/Graphics/UI/Gtk/Abstract/Object.chs
@@ -25,13 +25,13 @@
 --
 -- The base class of the Gtk+ type hierarchy.
 --
--- * Each widget is a represented as a purely abstract data type. It can only 
+-- * Each widget is a represented as a purely abstract data type. It can only
 --   be accessed through and the special access functions that are defined
 --   in each widget file.
 --
 module Graphics.UI.Gtk.Abstract.Object (
 -- * Detail
--- 
+--
 -- | 'Object' is the base class for all widgets, and for a few non-widget
 -- objects such as 'Adjustment'. 'Object' predates 'GObject'; non-widgets that
 -- derive from 'Object' rather than 'GObject' do so for backward compatibility
@@ -77,12 +77,6 @@
 
 import System.Glib.FFI
 import System.Glib.Attributes (ReadWriteAttr)
-import System.Glib.GObject	(objectUnref)
-#if GLIB_CHECK_VERSION(2,10,0)
-import System.Glib.GObject	(objectRefSink)
-#else
-import System.Glib.GObject      (objectRef)
-#endif
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 import Data.IORef
@@ -95,7 +89,7 @@
 -- turn the initial floating state to sunk
 --
 -- * The floating\/sunk concept of a GTK object is not very useful to us.
---   The following procedure circumvents the whole subject and ensures 
+--   The following procedure circumvents the whole subject and ensures
 --   proper cleanup:
 --     on creation:      objectRef, objectSink
 --     on finalization:  objectUnref
@@ -112,9 +106,9 @@
 -- * The constr argument is the contructor of the specific object.
 --
 #if GTK_MAJOR_VERSION < 3
-makeNewObject :: ObjectClass obj => 
+makeNewObject :: ObjectClass obj =>
 #else
-makeNewObject :: GObjectClass obj => 
+makeNewObject :: GObjectClass obj =>
 #endif
   (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
 makeNewObject (constr, objectUnref) generator = do
@@ -159,7 +153,7 @@
 #else
 objectWeakunref :: GObjectClass o => o -> GWeakNotify -> IO ()
 #endif
-objectWeakunref obj fun = 
+objectWeakunref obj fun =
   {#call unsafe g_object_weak_unref#} (toGObject obj) fun nullPtr
 
 
diff --git a/Graphics/UI/Gtk/Abstract/Paned.chs b/Graphics/UI/Gtk/Abstract/Paned.chs
--- a/Graphics/UI/Gtk/Abstract/Paned.chs
+++ b/Graphics/UI/Gtk/Abstract/Paned.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Abstract.Paned (
 -- * Detail
--- 
+--
 -- | 'Paned' is the base class for widgets with two panes, arranged either
 -- horizontally ('HPaned') or vertically ('VPaned'). Child widgets are added to
 -- the panes of the widget with 'panedPack1' and 'panedPack2'. The division
@@ -125,8 +125,10 @@
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
+#ifndef DISABLE_DEPRECATED
 {#import Graphics.UI.Gtk.Signals#}
 import Graphics.UI.Gtk.General.Enums	(ScrollType)
+#endif
 import Graphics.UI.Gtk.Abstract.ContainerChildProperties
 
 {# context lib="gtk" prefix="gtk" #}
@@ -312,7 +314,7 @@
 -- Deprecated Signals
 
 #ifndef DISABLE_DEPRECATED
--- | 
+-- |
 --
 onCycleChildFocus, afterCycleChildFocus :: PanedClass self => self
  -> (Bool -> IO Bool)
@@ -320,7 +322,7 @@
 onCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" False
 afterCycleChildFocus = connect_BOOL__BOOL "cycle_child_focus" True
 
--- | 
+-- |
 --
 onToggleHandleFocus, afterToggleHandleFocus :: PanedClass self => self
  -> IO Bool
@@ -328,7 +330,7 @@
 onToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" False
 afterToggleHandleFocus = connect_NONE__BOOL "toggle_handle_focus" True
 
--- | 
+-- |
 --
 onMoveHandle, afterMoveHandle :: PanedClass self => self
  -> (ScrollType -> IO Bool)
@@ -336,7 +338,7 @@
 onMoveHandle = connect_ENUM__BOOL "move_handle" False
 afterMoveHandle = connect_ENUM__BOOL "move_handle" True
 
--- | 
+-- |
 --
 onCycleHandleFocus, afterCycleHandleFocus :: PanedClass self => self
  -> (Bool -> IO Bool)
@@ -344,7 +346,7 @@
 onCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" False
 afterCycleHandleFocus = connect_BOOL__BOOL "cycle_handle_focus" True
 
--- | 
+-- |
 --
 onAcceptPosition, afterAcceptPosition :: PanedClass self => self
  -> IO Bool
@@ -352,7 +354,7 @@
 onAcceptPosition = connect_NONE__BOOL "accept_position" False
 afterAcceptPosition = connect_NONE__BOOL "accept_position" True
 
--- | 
+-- |
 --
 onCancelPosition, afterCancelPosition :: PanedClass self => self
  -> IO Bool
diff --git a/Graphics/UI/Gtk/Abstract/Range.chs b/Graphics/UI/Gtk/Abstract/Range.chs
--- a/Graphics/UI/Gtk/Abstract/Range.chs
+++ b/Graphics/UI/Gtk/Abstract/Range.chs
@@ -331,10 +331,10 @@
 #endif
 #if GTK_CHECK_VERSION(2,20,0)
 -- | This function is useful mainly for 'Range' subclasses.
--- 
+--
 -- See 'rangeSetMinSliderSize'.
 rangeGetMinSliderSize :: RangeClass self => self
-                      -> IO Int  -- ^ returns The minimum size of the range's slider. 
+                      -> IO Int  -- ^ returns The minimum size of the range's slider.
 rangeGetMinSliderSize range =
   liftM fromIntegral $
   {#call gtk_range_get_min_slider_size #}
@@ -342,7 +342,7 @@
 
 -- | This function returns the area that contains the range's trough and its steppers, in 'DrawWindow'
 -- coordinates.
--- 
+--
 -- This function is useful mainly for 'Range' subclasses.
 rangeGetRangeRect :: RangeClass self => self
                   -> IO Rectangle
@@ -354,12 +354,12 @@
   peek rPtr
 
 -- | This function returns sliders range along the long dimension, in 'DrawWindow' coordinates.
--- 
+--
 -- This function is useful mainly for 'Range' subclasses.
 rangeGetSliderRange :: RangeClass self => self
                     -> IO (Maybe (Int, Int))
 rangeGetSliderRange range =
-    alloca $ \ startPtr -> 
+    alloca $ \ startPtr ->
     alloca $ \ endPtr -> do
       {#call gtk_range_get_slider_range #}
         (toRange range)
@@ -373,17 +373,17 @@
          else return Nothing
 
 -- | This function is useful mainly for 'Range' subclasses.
--- 
+--
 -- See 'rangeSetSliderSizeFixed'.
 rangeGetSliderSizeFixed :: RangeClass self => self
-                        -> IO Bool  -- ^ returns whether the range's slider has a fixed size. 
-rangeGetSliderSizeFixed self =   
+                        -> IO Bool  -- ^ returns whether the range's slider has a fixed size.
+rangeGetSliderSizeFixed self =
   liftM toBool $
   {#call gtk_range_get_slider_size_fixed #}
     (toRange self)
 
 -- | Sets the minimum size of the range's slider.
--- 
+--
 -- This function is useful mainly for 'Range' subclasses.
 rangeSetMinSliderSize :: RangeClass self => self
                       -> Bool
@@ -395,10 +395,10 @@
 
 -- | Sets whether the range's slider has a fixed size, or a size that depends on it's adjustment's page
 -- size.
--- 
+--
 -- This function is useful mainly for 'Range' subclasses.
 rangeSetSliderSizeFixed :: RangeClass self => self
-                        -> Bool -- ^ @sizeFixed@ 'True' to make the slider size constant 
+                        -> Bool -- ^ @sizeFixed@ 'True' to make the slider size constant
                         -> IO ()
 rangeSetSliderSizeFixed self sizeFixed =
   {#call gtk_range_set_slider_size_fixed #}
@@ -413,7 +413,7 @@
 -- | How the range should be updated on the screen.
 --
 -- Default value: 'UpdateContinuous'
--- 
+--
 -- Removed in Gtk3.
 rangeUpdatePolicy :: RangeClass self => Attr self UpdateType
 rangeUpdatePolicy = newAttr
@@ -530,9 +530,9 @@
 --   the event itself and return 'True' to prevent further
 --   processing. Or, by returning 'False', it can pass the event to
 --   other handlers until the default GTK+ handler is reached.
---   
+--
 --   * Since Gtk 2.6
---   
+--
 onRangeChangeValue, afterRangeChangeValue :: RangeClass self => self
  -> (ScrollType -> Double -> IO Bool)
  -> IO (ConnectId self)
diff --git a/Graphics/UI/Gtk/Abstract/Scale.chs b/Graphics/UI/Gtk/Abstract/Scale.chs
--- a/Graphics/UI/Gtk/Abstract/Scale.chs
+++ b/Graphics/UI/Gtk/Abstract/Scale.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Abstract.Scale (
 -- * Detail
--- 
+--
 -- | A 'Scale' is a slider control used to select a numeric value. To use it,
 -- you'll probably want to investigate the methods on its base class, 'Range',
 -- in addition to the methods for 'Scale' itself. To set the value of a scale,
diff --git a/Graphics/UI/Gtk/Abstract/Scrollbar.hs b/Graphics/UI/Gtk/Abstract/Scrollbar.hs
--- a/Graphics/UI/Gtk/Abstract/Scrollbar.hs
+++ b/Graphics/UI/Gtk/Abstract/Scrollbar.hs
@@ -27,8 +27,8 @@
 --
 module Graphics.UI.Gtk.Abstract.Scrollbar (
 -- * Detail
--- 
--- | The 'Scrollbar' widget is an abstract base class for 
+--
+-- | The 'Scrollbar' widget is an abstract base class for
 --   'Graphics.UI.Gtk.Scrolling.HScrollbar' and
 --   'Graphics.UI.Gtk.Scrolling.VScrollbar'. It is not very useful in itself.
 --
diff --git a/Graphics/UI/Gtk/Abstract/Separator.hs b/Graphics/UI/Gtk/Abstract/Separator.hs
--- a/Graphics/UI/Gtk/Abstract/Separator.hs
+++ b/Graphics/UI/Gtk/Abstract/Separator.hs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Abstract.Separator (
 -- * Detail
--- 
+--
 -- | The 'Separator' widget is an abstract class, used only for deriving the
 -- subclasses 'Graphics.UI.Gtk.Ornaments.HSeparator' and
 -- 'Graphics.UI.Gtk.Ornaments.VSeparator'.
diff --git a/Graphics/UI/Gtk/Abstract/Widget.chs b/Graphics/UI/Gtk/Abstract/Widget.chs
--- a/Graphics/UI/Gtk/Abstract/Widget.chs
+++ b/Graphics/UI/Gtk/Abstract/Widget.chs
@@ -82,6 +82,7 @@
   DirectionType(..),
   StockId,
   WidgetHelpType(..),
+  Allocation,
 
 -- * Methods
   widgetShow,
@@ -92,14 +93,26 @@
   widgetHideAll,
 #endif
   widgetDestroy,
+#if GTK_CHECK_VERSION(3,0,0)
+  widgetDraw,
+#endif
   widgetQueueDraw,
   widgetQueueResize,
 #if GTK_CHECK_VERSION(2,4,0)
   widgetQueueResizeNoRedraw,
 #endif
+#if GTK_CHECK_VERSION(3,8,0)
+  widgetGetFrameClock,
+#endif
+#if GTK_CHECK_VERSION(3,10,0)
+  widgetGetScaleFactor,
+#endif
   widgetSizeRequest,
   widgetGetChildRequisition,
   widgetSizeAllocate,
+#if GTK_CHECK_VERSION(3,10,0)
+  widgetSizeAllocateWithBaseline,
+#endif
   widgetAddAccelerator,
   widgetRemoveAccelerator,
   widgetSetAccelPath,
@@ -157,6 +170,10 @@
   widgetInputShapeCombineMask,
 #endif
 #endif
+#if GTK_CHECK_VERSION(3,0,0)
+  widgetShapeCombineRegion,
+  widgetInputShapeCombineRegion,
+#endif
 #if GTK_CHECK_VERSION(2,12,0)
   widgetGetTooltipWindow,
   widgetSetTooltipWindow,
@@ -186,6 +203,9 @@
   widgetCreateLayout,
   widgetRenderIcon,
   widgetQueueDrawArea,
+#if GTK_CHECK_VERSION(3,0,0)
+  widgetQueueDrawRegion,
+#endif
 #if GTK_MAJOR_VERSION < 3
   widgetResetShapes,
 #endif
@@ -235,6 +255,13 @@
   widgetGetAllocatedWidth,
   widgetGetAllocatedHeight,
 #endif
+#if GTK_CHECK_VERSION(3,10,0)
+  widgetGetAllocatedBaseline,
+#endif
+#if GTK_CHECK_VERSION(3,14,0)
+  widgetGetClip,
+  widgetSetClip,
+#endif
   widgetGetState,
   widgetSetState,
 #if GTK_MAJOR_VERSION < 3
@@ -242,6 +269,15 @@
   widgetGetSize,
 #endif
   widgetEvent,
+#if GTK_CHECK_VERSION(3,0,0)
+  widgetGetHAlign,
+  widgetSetHAlign,
+  widgetGetVAlign,
+#if GTK_CHECK_VERSION(3,10,0)
+  widgetGetVAlignWithBaseline,
+#endif
+  widgetSetVAlign,
+#endif
 
 -- * Attributes
   widgetName,
@@ -269,6 +305,8 @@
 #if GTK_MAJOR_VERSION < 3
   widgetExtensionEvents,
 #endif
+  widgetExpand,
+  widgetHExpand,
   widgetNoShowAll,
   widgetChildVisible,
 #if GTK_MAJOR_VERSION < 3
@@ -284,7 +322,7 @@
   widgetGetRealized,
   widgetGetMapped,
 #endif
-#if GTK_MAJOR_VERSION >= 3
+#if GTK_CHECK_VERSION(3,0,0)
   widgetGetStyleContext,
 #endif
 
@@ -299,6 +337,9 @@
   hideSignal,
   focus,
   stateChanged,
+#if GTK_CHECK_VERSION(3,0,0)
+  stateFlagsChanged,
+#endif
   parentSet,
   hierarchyChanged,
   styleSet,
@@ -420,15 +461,17 @@
 import Data.Maybe	(fromMaybe)
 import Control.Monad.Reader (ask)
 import Control.Monad.Trans (liftIO)
-import Data.Bits ((.&.), complement)
 import System.Glib.FFI
-import System.Glib.Flags		(fromFlags, toFlags)
+import System.Glib.Flags (fromFlags, toFlags)
+#if GTK_CHECK_VERSION(3,0,0)
+import System.Glib.GError (failOnGError)
+import System.Glib.Flags (Flags)
+#endif
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)
 import System.Glib.GType      (GType)
-import System.Glib.GList      (GList, fromGList)
+import System.Glib.GList      (fromGList)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 import Graphics.UI.Gtk.General.DNDTypes (Atom (Atom), SelectionTag)
 {#import Graphics.UI.Gtk.Types#}
@@ -454,21 +497,9 @@
 					,widgetGetDrawWindow, widgetGetSize
 #endif
 					)
-import Graphics.UI.Gtk.Gdk.Events	(Event(..), marshalEvent,
-  marshExposeRect,
-  EventButton,
-  EventScroll,
-  EventMotion,
-  EventExpose,
-  EventKey,
-  EventConfigure,
-  EventCrossing,
-  EventFocus,
-  EventProperty,
-  EventProximity,
-  EventVisibility,
-  EventWindowState,
-  EventGrabBroken)
+#ifndef DISABLE_DEPRECATED
+import Graphics.UI.Gtk.Gdk.Events	(Event(..), marshalEvent, marshExposeRect)
+#endif
 import Graphics.UI.Gtk.Gdk.EventM	(EventM,
   EventM,
   EAny,
@@ -484,15 +515,16 @@
   EProperty,
   EProximity,
   EWindowState,
-#if GTK_CHECK_VERSION(2,6,0)
-  EOwnerChange,
-#endif
 #if GTK_CHECK_VERSION(2,8,0)
   EGrabBroken,
 #endif
   )
 import Graphics.UI.Gtk.General.Enums	(StateType(..), TextDirection(..),
-					 AccelFlags(..), DirectionType(..), Modifier)
+					 AccelFlags(..), DirectionType(..), Modifier
+#if GTK_CHECK_VERSION(3,0,0)
+                                        ,StateFlags(..), Align(..)
+#endif
+					)
 {#import Graphics.Rendering.Pango.Types#}
 {#import Graphics.Rendering.Pango.BasicTypes#}	(FontDescription(FontDescription),
 					 PangoLayout(PangoLayout), makeNewPangoString )
@@ -500,13 +532,12 @@
 import Data.IORef ( newIORef )
 import Control.Monad.Reader ( runReaderT )
 #if GTK_CHECK_VERSION(3,0,0)
-import Graphics.Rendering.Cairo.Types (Cairo(..))
+import Graphics.Rendering.Cairo.Types (Cairo(..), unCairo, Region(..), withRegion)
 import Graphics.Rendering.Cairo.Internal (Render(..))
 #endif
 
 {# context lib="gtk" prefix="gtk" #}
 
-
 --------------------
 -- Methods
 
@@ -581,6 +612,36 @@
   {# call widget_destroy #}
     (toWidget self)
 
+#if GTK_CHECK_VERSION(3,0,0)
+-- | Draws widget to @cr@. The top left corner of the widget will be drawn
+-- to the currently set origin point of @cr@.
+--
+-- You should pass a cairo context as cr argument that is in an original
+-- state. Otherwise the resulting drawing is undefined. For example changing
+-- the operator using 'Graphics.Rendering.Cairo.setOperator' or the line
+-- width using 'Graphics.Rendering.Cairo.setLineWidth' might have unwanted
+-- side effects. You may however change the context’s transform matrix - like
+-- with 'Graphics.Rendering.Cairo.scale', 'Graphics.Rendering.Cairo.translate'
+-- or 'Graphics.Rendering.Cairo.setMatrix' and clip region with
+-- 'Graphics.Rendering.Cairo.clip' prior to calling this function. Also, it
+-- is fine to modify the context with 'Graphics.Rendering.Cairo.save' and
+-- 'Graphics.Rendering.Cairo.pushGroup prior to calling this function.
+--
+-- Note that special-purpose widgets may contain special code for rendering
+-- to the screen and might appear differently on screen and when rendered
+-- using 'widgetDraw'.
+--
+widgetDraw :: WidgetClass self
+ => self  -- ^ the widget to draw. It must be drawable (see 'widgetIsDrawable')
+          -- and a size must have been allocated.
+ -> Cairo -- ^ a cairo context to draw to
+ -> IO ()
+widgetDraw self cr =
+  {# call widget_draw #}
+    (toWidget self)
+    (castPtr $ unCairo cr)
+#endif
+
 -- * Functions to be used with 'Graphics.UI.Gtk.Misc.DrawingArea' or
 --   container implementations.
 
@@ -616,6 +677,48 @@
     (toWidget self)
 #endif
 
+#if GTK_CHECK_VERSION(3,8,0)
+-- | Obtains the frame clock for a widget. The frame clock is a global “ticker”
+-- that can be used to drive animations and repaints. The most common reason to
+-- get the frame clock is to call 'frameClockGetFrameTime', in order to get a
+-- time to use for animating. For example you might record the start of the
+-- animation with an initial value from 'frameClockGetFrameTime', and then
+-- update the animation by calling 'frameClockGetFrameTime' again during each
+-- repaint.
+--
+-- 'frameClockRequestPhase' will result in a new frame on the clock, but won’t
+-- necessarily repaint any widgets. To repaint a widget, you have to use
+-- 'widgetQueueDraw' which invalidates the widget (thus scheduling it to
+-- receive a draw on the next frame). 'widgetQueueDraw' will also end up
+-- requesting a frame on the appropriate frame clock.
+--
+-- A widget’s frame clock will not change while the widget is mapped.
+-- Reparenting a widget (which implies a temporary unmap) can change the
+-- widget’s frame clock.
+--
+-- Unrealized widgets do not have a frame clock.
+--
+widgetGetFrameClock :: WidgetClass self => self -> IO FrameClock
+widgetGetFrameClock self =
+  makeNewGObject mkFrameClock $
+  {# call widget_get_frame_clock #}
+    (toWidget self)
+#endif
+
+#if GTK_CHECK_VERSION(3,10,0)
+-- | Retrieves the internal scale factor that maps from window coordinates to
+-- the actual device pixels. On traditional systems this is 1, on high density
+-- outputs, it can be a higher value (typically 2).
+--
+-- See 'drawWindowGetScaleFactor'.
+--
+widgetGetScaleFactor :: WidgetClass self => self -> IO Int
+widgetGetScaleFactor self =
+  liftM fromIntegral $
+  {# call widget_get_scale_factor #}
+    (toWidget self)
+#endif
+
 -- | This function is typically used when implementing a
 -- 'Graphics.UI.Gtk.Abstract.Container.Container' subclass. Obtains the preferred size
 -- of a widget. The container uses this information to arrange its child
@@ -668,6 +771,31 @@
 widgetSizeAllocate self rect = with rect $ \rectPtr ->
   {#call widget_size_allocate#} (toWidget self) (castPtr rectPtr)
 
+#if GTK_CHECK_VERSION(3,10,0)
+-- | This function is only used by
+-- 'Graphics.UI.Gtk.Abstract.Container.Container' subclasses, to assign a
+-- size, position and (optionally) baseline to their child widgets.
+--
+-- In this function, the allocation and baseline may be adjusted. It will
+-- be forced to a 1x1 minimum size, and the adjust_size_allocation virtual
+-- and adjust_baseline_allocation methods on the child will be used to adjust
+-- the allocation and baseline. Standard adjustments include removing the
+-- widget's margins, and applying the widget’s 'widgetHAlign' and
+-- 'widgetVAlign' properties.
+--
+-- If the child widget does not have a valign of AlignBaseline the baseline
+-- argument is ignored and -1 is used instead.
+--
+widgetSizeAllocateWithBaseline :: WidgetClass self => self
+  -> Allocation -- ^ The @x@ and @y@ values of the rectangle determine the
+                --   the position of the widget's area relative to its parent
+                --   allocation.
+  -> Int        -- ^ The baseline of the child, or -1
+  -> IO ()
+widgetSizeAllocateWithBaseline self rect baseline = with rect $ \rectPtr ->
+  {#call widget_size_allocate_with_baseline#} (toWidget self) (castPtr rectPtr) (fromIntegral baseline)
+#endif
+
 -- %hash c:1e14 d:53c5
 -- | Installs an accelerator for this @widget@ in @accelGroup@ that causes
 -- @accelSignal@ to be emitted if the accelerator is activated. The
@@ -1272,6 +1400,31 @@
 #endif
 #endif
 
+#if GTK_CHECK_VERSION(3,0,0)
+-- | Sets a shape for this widget’s GDK window. This allows for transparent
+-- windows etc., see 'drawWindowShapeCombineRegion' for more information.
+widgetShapeCombineRegion :: WidgetClass self => self
+ -> Maybe Region
+ -> IO ()
+widgetShapeCombineRegion self region =
+  withRegion (fromMaybe (Region nullForeignPtr) region) $ \ptrRegion ->
+  {# call gtk_widget_shape_combine_region #}
+    (toWidget self)
+    (castPtr ptrRegion)
+
+-- | Sets an input shape for this widget’s GDK window. This allows for windows
+-- which react to mouse click in a nonrectangular region,
+-- see 'drawWindowInputShapeCombineRegion' for more information.
+widgetInputShapeCombineRegion :: WidgetClass self => self
+ -> Maybe Region
+ -> IO ()
+widgetInputShapeCombineRegion self region =
+  withRegion (fromMaybe (Region nullForeignPtr) region) $ \ptrRegion ->
+  {# call gtk_widget_input_shape_combine_region #}
+    (toWidget self)
+    (castPtr ptrRegion)
+#endif
+
 #if GTK_CHECK_VERSION(2,12,0)
 -- | Returns the 'Window' of the current tooltip. This can be the 'Window' created by default, or the
 -- custom tooltip window set using 'widgetSetTooltipWindow'.
@@ -1743,6 +1896,26 @@
     (fromIntegral width)
     (fromIntegral height)
 
+#if GTK_CHECK_VERSION(3,0,0)
+-- | Invalidates the area of widget defined by @region@ by calling
+-- 'drawWindowInvalidateRegion' on the widget’s window and all its child
+-- windows. Once the main loop becomes idle (after the current batch of
+-- events has been processed, roughly), the window will receive expose events
+-- for the union of all regions that have been invalidated.
+--
+-- Normally you would only use this function in widget implementations. You
+-- might also use it to schedule a redraw of a DrawingArea or some portion
+-- thereof.
+widgetQueueDrawRegion :: WidgetClass self => self
+ -> Region
+ -> IO ()
+widgetQueueDrawRegion self region =
+  withRegion region $ \regionPtr ->
+  {# call gtk_widget_queue_draw_region #}
+    (toWidget self)
+    (castPtr regionPtr)
+#endif
+
 #if GTK_MAJOR_VERSION < 3
 -- %hash c:5ffb d:3e1a
 -- | Recursively resets the shape on this widget and its descendants.
@@ -2324,6 +2497,50 @@
      liftM fromIntegral $ {#call widget_get_allocated_height#} (toWidget widget)
 #endif
 
+#if GTK_CHECK_VERSION(3,10,0)
+-- | Returns the baseline that has currently been allocated to widget . This function is intended
+-- to be used when implementing handlers for the “draw” function, and when allocating child
+-- widgets in “size_allocate”.
+widgetGetAllocatedBaseline :: WidgetClass self => self -> IO Int
+widgetGetAllocatedBaseline widget =
+     liftM fromIntegral $ {#call widget_get_allocated_baseline#} (toWidget widget)
+#endif
+
+#if GTK_CHECK_VERSION(3,14,0)
+-- | Retrieves the widget’s clip area.
+--
+-- The clip area is the area in which all of widget's drawing will happen. Other
+-- toolkits call it the bounding box.
+--
+-- Historically, in GTK+ the clip area has been equal to the allocation retrieved
+-- via widgetGetAllocation.
+widgetGetClip :: WidgetClass self => self -> IO Allocation
+widgetGetClip widget =
+  alloca $ \ allocationPtr -> do
+     {#call widget_get_clip#} (toWidget widget) (castPtr allocationPtr)
+     peek allocationPtr
+
+-- | Sets the widget’s clip. This must not be used directly, but from within a widget’s 'sizeAllocate' method.
+--
+-- The clip set should be the area that widget draws on. If widget is a GtkContainer, the area
+-- must contain all children's clips.
+--
+-- If this function is not called by widget during a 'sizeAllocate' handler, it is assumed to be
+-- equal to the allocation. However, if the function is not called, certain features that might extend
+-- a widget's allocation will not be available:
+--
+-- * The “draw” signal will be clipped to the widget's allocation to avoid overdraw.
+--
+-- * Calling gtk_render_background() will not draw outset shadows.
+--
+-- It is therefore suggested that you always call widgetSetClip during a 'sizeAllocate' handler.
+widgetSetClip :: WidgetClass self => self
+  -> Allocation
+  -> IO ()
+widgetSetClip self clip = with clip $ \clipPtr ->
+  {#call widget_set_clip#} (toWidget self) (castPtr clipPtr)
+#endif
+
 #if GTK_CHECK_VERSION(2,18,0)
 -- | Retrieve the current state of the widget.
 --
@@ -2532,6 +2749,20 @@
   widgetSetExtensionEvents
 #endif
 
+-- | Whether to expand in both directions. Setting this sets both 'widgetHExpand' and 'widgetVExpand'
+--
+-- Default value: @False@
+--
+widgetExpand :: WidgetClass self => Attr self Bool
+widgetExpand = newAttrFromBoolProperty "expand"
+
+-- | Whether to expand in both directions. Setting this sets both 'widgetHExpand' and 'widgetVExpand'
+--
+-- Default value: @False@
+--
+widgetHExpand :: WidgetClass self => Attr self Bool
+widgetHExpand = newAttrFromBoolProperty "hexpand"
+
 -- %hash c:1605 d:48ea
 -- | Whether 'widgetShowAll' should not affect this widget.
 --
@@ -2648,7 +2879,7 @@
 
 #endif
 
-#if GTK_MAJOR_VERSION >= 3
+#if GTK_CHECK_VERSION(3,0,0)
 -- | Returns the style context associated to @widget@.
 widgetGetStyleContext :: WidgetClass widget
                       => widget          -- ^ @widget@ : a @Widget@
@@ -2657,8 +2888,56 @@
   makeNewGObject mkStyleContext $
   {# call gtk_widget_get_style_context #}
   (toWidget widget)
+
+-- | Gets the value of the `widgetHAlign` property.
+--
+-- For backwards compatibility reasons this method will never return AlignBaseline,
+-- but instead it will convert it to AlignFill. Baselines are not supported for
+-- horizontal alignment.
+--
+widgetGetHAlign :: WidgetClass self => self -> IO Align
+widgetGetHAlign self =
+  liftM (toEnum . fromIntegral) $
+  {# call gtk_widget_get_halign #}
+    (toWidget self)
+
+-- | Sets the horizontal alignment of widget. See the 'widgetHAlign' property.
+--
+widgetSetHAlign :: WidgetClass self => self -> Align -> IO ()
+widgetSetHAlign self align =
+  {# call gtk_widget_set_halign #}
+    (toWidget self)
+    (fromIntegral $ fromEnum align)
+
+-- | Gets the value of the 'widgetVAlign' property.
+--
+-- For backwards compatibility reasons this method will never return AlignBaseline,
+-- but instead it will convert it to AlignFill. If your widget want to support
+-- baseline aligned children it must use 'widgetGetVAlignWithBaseline', or
+-- 'widgetVAlign', which will also report the true value.
+widgetGetVAlign :: WidgetClass self => self -> IO Align
+widgetGetVAlign self =
+  liftM (toEnum . fromIntegral) $
+  {# call gtk_widget_get_valign #}
+    (toWidget self)
+
+#if GTK_CHECK_VERSION(3,10,0)
+-- | Gets the value of the 'widgetVAlign' property, including AlignBaseline.
+widgetGetVAlignWithBaseline :: WidgetClass self => self -> IO Align
+widgetGetVAlignWithBaseline self =
+  liftM (toEnum . fromIntegral) $
+  {# call gtk_widget_get_valign_with_baseline #}
+    (toWidget self)
 #endif
 
+-- | Sets the vertical alignment of widget . See the 'widgetVAlign' property.
+widgetSetVAlign :: WidgetClass self => self -> Align -> IO ()
+widgetSetVAlign self align =
+  {# call gtk_widget_set_valign #}
+    (toWidget self)
+    (fromIntegral $ fromEnum align)
+#endif
+
 --------------------
 -- Signals
 
@@ -2738,6 +3017,25 @@
 stateChanged :: WidgetClass self => Signal self (StateType -> IO ())
 stateChanged = Signal (connect_ENUM__NONE "state-changed")
 
+#if GTK_CHECK_VERSION(3,0,0)
+connect_FLAGS__NONE ::
+  (Flags a, GObjectClass obj) => SignalName ->
+  ConnectAfter -> obj ->
+  ([a] -> IO ()) ->
+  IO (ConnectId obj)
+connect_FLAGS__NONE signal after obj user =
+  connectGeneric signal after obj action
+  where action :: Ptr GObject -> Int -> IO ()
+        action _ flags1 =
+          failOnGError $
+          user (toFlags flags1)
+
+-- | The state of the widget (input focus, insensitive, etc.) has changed.
+--
+stateFlagsChanged :: WidgetClass self => Signal self ([StateFlags] -> IO ())
+stateFlagsChanged = Signal (connect_FLAGS__NONE "state-flags-changed")
+#endif
+
 -- %hash c:bef2 d:1d66
 -- | The 'parentSet' signal is emitted when a new parent has been set on a
 -- widget. The parameter is the new parent.
@@ -3027,8 +3325,9 @@
 -- identified by a 'PropertyTag'. This event is triggered if a property is
 -- changed or deleted. Sets the widget's 'PropertyChangeMask' flag.
 --
-propertyNotifyEvent :: WidgetClass self => Signal self (EventM EProperty Bool)
-propertyNotifyEvent = Signal (eventM "property_notify_event" [PropertyChangeMask])
+_propertyNotifyEvent :: WidgetClass self => Signal self (EventM EProperty Bool)
+_propertyNotifyEvent = Signal (eventM "property_notify_event" [PropertyChangeMask])
+
 {- not sure if these are useful
 -- %hash c:58cc d:af3f
 -- |
diff --git a/Graphics/UI/Gtk/ActionMenuToolbar/Action.chs b/Graphics/UI/Gtk/ActionMenuToolbar/Action.chs
--- a/Graphics/UI/Gtk/ActionMenuToolbar/Action.chs
+++ b/Graphics/UI/Gtk/ActionMenuToolbar/Action.chs
@@ -153,7 +153,6 @@
 import System.Glib.GList
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
diff --git a/Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs b/Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs
--- a/Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs
+++ b/Graphics/UI/Gtk/ActionMenuToolbar/ActionGroup.chs
@@ -113,8 +113,6 @@
 import System.Glib.GList
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject,
-					 makeNewGObject, destroyFunPtr)
 {#import Graphics.UI.Gtk.Types#}
 import System.Glib.Signals (on)
 
diff --git a/Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs b/Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs
--- a/Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs
+++ b/Graphics/UI/Gtk/ActionMenuToolbar/RadioAction.chs
@@ -88,7 +88,6 @@
 import System.Glib.GList
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 import Graphics.UI.Gtk.General.StockItems
diff --git a/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs b/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs
--- a/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs
+++ b/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs
@@ -65,13 +65,11 @@
   ) where
 
 import Control.Monad	(liftM)
-import Data.Maybe (fromMaybe)
 
 import System.Glib.FFI
 import System.Glib.Attributes
 import System.Glib.Properties
 import System.Glib.UTFString
-import System.Glib.GObject		(wrapNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
diff --git a/Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs b/Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs
--- a/Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs
+++ b/Graphics/UI/Gtk/ActionMenuToolbar/ToggleAction.chs
@@ -83,7 +83,6 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 import Graphics.UI.Gtk.General.StockItems
diff --git a/Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs b/Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs
--- a/Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs
+++ b/Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs
@@ -262,7 +262,6 @@
 import System.Glib.GError
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
diff --git a/Graphics/UI/Gtk/Builder.chs b/Graphics/UI/Gtk/Builder.chs
--- a/Graphics/UI/Gtk/Builder.chs
+++ b/Graphics/UI/Gtk/Builder.chs
@@ -100,7 +100,6 @@
 import System.Glib.GError
 import System.Glib.GList
 import System.Glib.UTFString
-import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
diff --git a/Graphics/UI/Gtk/Buttons/Button.chs b/Graphics/UI/Gtk/Buttons/Button.chs
--- a/Graphics/UI/Gtk/Buttons/Button.chs
+++ b/Graphics/UI/Gtk/Buttons/Button.chs
@@ -269,36 +269,6 @@
   {# call unsafe button_get_relief #}
     (toButton self)
 
-#if GTK_CHECK_VERSION(2,4,0)
--- %hash c:d8cb d:1e7d
--- | If the child of the button is a 'Misc' or 'Alignment', this property can
--- be used to control it's horizontal alignment. 0.0 is left aligned, 1.0 is
--- right aligned.
---
--- Allowed values: [0,1]
---
--- Default value: 0.5
---
--- * Available since Gtk+ version 2.4
---
-buttonXAlign :: ButtonClass self => Attr self Float
-buttonXAlign = newAttrFromFloatProperty "xalign"
-
--- %hash c:ce4e d:4fec
--- | If the child of the button is a 'Misc' or 'Alignment', this property can
--- be used to control it's vertical alignment. 0.0 is top aligned, 1.0 is
--- bottom aligned.
---
--- Allowed values: [0,1]
---
--- Default value: 0.5
---
--- * Available since Gtk+ version 2.4
---
-buttonYAlign :: ButtonClass self => Attr self Float
-buttonYAlign = newAttrFromFloatProperty "yalign"
-#endif
-
 -- | Sets the text of the label of the button. This text is also used
 -- to select the stock item if 'buttonSetUseStock' is used.
 --
diff --git a/Graphics/UI/Gtk/Buttons/LinkButton.chs b/Graphics/UI/Gtk/Buttons/LinkButton.chs
--- a/Graphics/UI/Gtk/Buttons/LinkButton.chs
+++ b/Graphics/UI/Gtk/Buttons/LinkButton.chs
@@ -84,7 +84,7 @@
 #endif
   ) where
 
-import Control.Monad	(liftM, unless)
+import Control.Monad	(liftM)
 
 import System.Glib.FFI
 import System.Glib.UTFString
@@ -92,7 +92,6 @@
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
-{#import Graphics.UI.Gtk.Signals#}
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/Cairo.chs b/Graphics/UI/Gtk/Cairo.chs
--- a/Graphics/UI/Gtk/Cairo.chs
+++ b/Graphics/UI/Gtk/Cairo.chs
@@ -25,7 +25,7 @@
 -- Stability   : provisional
 -- Portability : portable (depends on GHC)
 --
--- 
+--
 -- Gtk specific functions to for redering with Cairo.
 --
 -- Cairo is a graphics library that supports vector graphics and image
@@ -58,6 +58,7 @@
 #endif
   setSourceColor,
   setSourcePixbuf,
+  rectangle,
   updateContext,
   createLayout,
   updateLayout,
@@ -86,7 +87,6 @@
 {#import Graphics.Rendering.Cairo.Types#} as Cairo
 #endif
 import qualified Graphics.Rendering.Cairo.Internal as Cairo.Internal
-import qualified Graphics.Rendering.Cairo as Cairo
 import Graphics.Rendering.Cairo.Internal (Render(Render))
 import Control.Monad.Reader
 import Graphics.UI.Gtk.General.Structs (Rectangle(..))
diff --git a/Graphics/UI/Gtk/Display/Image.chs b/Graphics/UI/Gtk/Display/Image.chs
--- a/Graphics/UI/Gtk/Display/Image.chs
+++ b/Graphics/UI/Gtk/Display/Image.chs
@@ -148,7 +148,6 @@
 import System.Glib.Attributes
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
-import System.Glib.GObject		(makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.General.StockItems
 import Graphics.UI.Gtk.General.Structs	(IconSize(..))
diff --git a/Graphics/UI/Gtk/Display/Label.chs b/Graphics/UI/Gtk/Display/Label.chs
--- a/Graphics/UI/Gtk/Display/Label.chs
+++ b/Graphics/UI/Gtk/Display/Label.chs
@@ -190,6 +190,13 @@
 #endif
   labelLineWrap,
   labelText,
+
+-- * Signals
+  labelActiveCurrentLink,
+  labelActiveLink,
+  labelCopyClipboard,
+  labelMoveCursor,
+  labelPopulatePopup
   ) where
 
 import Control.Monad    (liftM)
@@ -200,21 +207,16 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject              (makeNewGObject)
 {#import Graphics.Rendering.Pango.Layout#}
 import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.Rendering.Pango.Attributes ( withAttrList, fromAttrList)
 import Graphics.UI.Gtk.Gdk.Keys         (KeyVal)
 import Graphics.UI.Gtk.General.Enums    (Justification(..), MovementStep (..))
-import Graphics.Rendering.Pango.Markup
 {#import Graphics.Rendering.Pango.BasicTypes#}  (PangoLayout(PangoLayout),
                                          makeNewPangoString, PangoString(..) )
 import Graphics.Rendering.Pango.Types (mkPangoLayoutRaw, PangoLayoutRaw)
 import Graphics.Rendering.Pango.Enums   (PangoAttribute)
-#if GTK_CHECK_VERSION(2,6,0)
-import Graphics.Rendering.Pango.Enums   (EllipsizeMode(..))
-#endif
 import Data.IORef ( newIORef )
 {#import Graphics.UI.Gtk.Signals#}
 
diff --git a/Graphics/UI/Gtk/Display/LevelBar.chs b/Graphics/UI/Gtk/Display/LevelBar.chs
--- a/Graphics/UI/Gtk/Display/LevelBar.chs
+++ b/Graphics/UI/Gtk/Display/LevelBar.chs
@@ -62,6 +62,7 @@
   levelBarMaxValue,
   levelBarMinValue,
   levelBarValue,
+  levelBarMode
 #endif
   ) where
 
diff --git a/Graphics/UI/Gtk/Display/Spinner.chs b/Graphics/UI/Gtk/Display/Spinner.chs
--- a/Graphics/UI/Gtk/Display/Spinner.chs
+++ b/Graphics/UI/Gtk/Display/Spinner.chs
@@ -28,10 +28,10 @@
 module Graphics.UI.Gtk.Display.Spinner (
 #if GTK_CHECK_VERSION(2,20,0)
 -- * Detail
--- 
+--
 -- | A 'Spinner' widget displays an icon-size spinning animation. It is often used as an alternative to
 -- a 'ProgressBar' for displaying indefinite activity, instead of actual progress.
--- 
+--
 -- To start the animation, use 'spinnerStart'.
 
 -- * Types
@@ -44,8 +44,8 @@
 -- * Methods
    spinnerStart,
    spinnerStop,
-   
--- * Attributes   
+
+-- * Attributes
    spinnerActive,
 #endif
 ) where
@@ -53,12 +53,10 @@
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
-{#import Graphics.UI.Gtk.Signals#}
 
 {# context lib="gtk" prefix="gtk" #}
 
@@ -68,7 +66,7 @@
 
 -- | Returns a new spinner widget. Not yet started.
 spinnerNew :: IO Spinner
-spinnerNew = 
+spinnerNew =
   makeNewObject mkSpinner $
   liftM (castPtr :: Ptr Widget -> Ptr Spinner) $
   {# call unsafe spinner_new #}
@@ -92,7 +90,7 @@
 -- Attributes
 
 -- | Whether the spinner is active.
--- 
+--
 -- Default value: 'False'
 spinnerActive :: SpinnerClass spinner => Attr spinner Bool
 spinnerActive = newAttrFromBoolProperty "active"
diff --git a/Graphics/UI/Gtk/Display/StatusIcon.chs b/Graphics/UI/Gtk/Display/StatusIcon.chs
--- a/Graphics/UI/Gtk/Display/StatusIcon.chs
+++ b/Graphics/UI/Gtk/Display/StatusIcon.chs
@@ -165,7 +165,6 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject,makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.General.Enums#}
 import Graphics.UI.Gtk.General.Structs
diff --git a/Graphics/UI/Gtk/Display/Statusbar.chs b/Graphics/UI/Gtk/Display/Statusbar.chs
--- a/Graphics/UI/Gtk/Display/Statusbar.chs
+++ b/Graphics/UI/Gtk/Display/Statusbar.chs
@@ -116,7 +116,9 @@
 
 import System.Glib.FFI
 import System.Glib.UTFString
+#if GTK_MAJOR_VERSION < 3
 import System.Glib.Attributes
+#endif
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
diff --git a/Graphics/UI/Gtk/Embedding/Plug.chs b/Graphics/UI/Gtk/Embedding/Plug.chs
--- a/Graphics/UI/Gtk/Embedding/Plug.chs
+++ b/Graphics/UI/Gtk/Embedding/Plug.chs
@@ -28,7 +28,7 @@
 --
 module Graphics.UI.Gtk.Embedding.Plug (
 -- * Detail
--- 
+--
 -- | Together with 'Socket', 'Plug' provides the ability to embed widgets from
 -- one process into another process in a fashion that is transparent to the
 -- user. One process creates a 'Socket' widget and, passes the ID of that
@@ -78,6 +78,8 @@
 #endif
   ) where
 
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
+
 import Control.Monad	(liftM)
 import Data.Maybe	(fromMaybe)
 
@@ -94,8 +96,6 @@
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
-
 --------------------
 -- Constructors
 
@@ -108,7 +108,7 @@
 -- then a 'NativeWindowId' can be extracted from this 'Plug' using 'plugGetId'
 -- and be passed to the application which is to be embedded.
 --
-plugNew :: 
+plugNew ::
   Maybe NativeWindowId -- ^ @socketId@ - the window ID of the socket, or
                        -- @Nothing@.
  -> IO Plug
@@ -180,7 +180,7 @@
 -- | @True@ if the plug is embedded in a socket.
 --
 -- Default value: @False@
--- 
+--
 -- * Available since Gtk+ version 2.12
 --
 plugAttrEmbedded :: PlugClass self => ReadAttr self Bool
@@ -189,7 +189,7 @@
 -- | The window of the socket the plug is embedded in.
 --
 -- * Available since Gtk+ version 2.14
--- 
+--
 plugAttrSocketWindow :: PlugClass self => ReadAttr self (Maybe DrawWindow)
 plugAttrSocketWindow = readAttrFromMaybeObjectProperty "socket-window"
 #if GTK_MAJOR_VERSION < 3
diff --git a/Graphics/UI/Gtk/Embedding/Socket.chs b/Graphics/UI/Gtk/Embedding/Socket.chs
--- a/Graphics/UI/Gtk/Embedding/Socket.chs
+++ b/Graphics/UI/Gtk/Embedding/Socket.chs
@@ -28,7 +28,7 @@
 --
 module Graphics.UI.Gtk.Embedding.Socket (
 -- * Detail
--- 
+--
 -- | Together with 'Plug', 'Socket' provides the ability to embed widgets from
 -- one process into another process in a fashion that is transparent to the
 -- user. One process creates a 'Socket' widget and, passes the that widget's
@@ -41,11 +41,11 @@
 -- added to its parent.
 --
 -- * Obtaining the window ID of a socket.
--- 
+--
 -- > socket <- socketNew
 -- > widgetShow socket
 -- > containerAdd parent socket
--- > 
+-- >
 -- > -- The following call is only necessary if one of
 -- > -- the ancestors of the socket is not yet visible.
 -- > --
@@ -115,6 +115,8 @@
 #endif
   ) where
 
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
+
 import Control.Monad	(liftM)
 import Data.Maybe (isJust)
 
@@ -130,8 +132,6 @@
 import Graphics.UI.Gtk.General.Structs
 
 {# context lib="gtk" prefix="gtk" #}
-
-#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
 
 --------------------
 -- Constructors
diff --git a/Graphics/UI/Gtk/Entry/Entry.chs b/Graphics/UI/Gtk/Entry/Entry.chs
--- a/Graphics/UI/Gtk/Entry/Entry.chs
+++ b/Graphics/UI/Gtk/Entry/Entry.chs
@@ -162,7 +162,6 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(makeNewGObject)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 import Graphics.UI.Gtk.General.Enums (DeleteType (..), MovementStep (..)
 #if GTK_CHECK_VERSION(2,16,0)
@@ -812,14 +811,6 @@
 onEntryActivate = connect_NONE__NONE "activate" False
 afterEntryActivate = connect_NONE__NONE "activate" True
 
--- | Emitted when the settings of the
--- 'Entry' widget changes.
---
-onEntryChanged, afterEntryChanged :: EntryClass ec => ec -> IO () ->
-                                     IO (ConnectId ec)
-onEntryChanged = connect_NONE__NONE "changed" False
-afterEntryChanged = connect_NONE__NONE "changed" True
-
 -- | Emitted when the current selection has been
 -- copied to the clipboard.
 --
@@ -843,14 +834,6 @@
                                          IO (ConnectId ec)
 onPasteClipboard = connect_NONE__NONE "paste_clipboard" False
 afterPasteClipboard = connect_NONE__NONE "paste_clipboard" True
-
--- | Emitted when a piece of text is deleted from
--- the 'Entry'.
---
-onDeleteText, afterDeleteText :: EntryClass ec => ec ->
-                                 (Int -> Int -> IO ()) -> IO (ConnectId ec)
-onDeleteText = connect_INT_INT__NONE "delete_text" False
-afterDeleteText = connect_INT_INT__NONE "delete_text" True
 
 -- | Emitted when the user changes from
 -- overwriting to inserting.
diff --git a/Graphics/UI/Gtk/Entry/EntryCompletion.chs b/Graphics/UI/Gtk/Entry/EntryCompletion.chs
--- a/Graphics/UI/Gtk/Entry/EntryCompletion.chs
+++ b/Graphics/UI/Gtk/Entry/EntryCompletion.chs
@@ -141,8 +141,6 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 import System.Glib.Attributes
-import System.Glib.GObject		(wrapNewGObject,
-					 makeNewGObject, destroyFunPtr)
 import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
diff --git a/Graphics/UI/Gtk/Entry/HScale.chs b/Graphics/UI/Gtk/Entry/HScale.chs
--- a/Graphics/UI/Gtk/Entry/HScale.chs
+++ b/Graphics/UI/Gtk/Entry/HScale.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Entry.HScale (
 -- * Detail
--- 
+--
 -- | The 'HScale' widget is used to allow the user to select a value using a
 -- horizontal slider. To create one, use 'hScaleNewWithRange'.
 --
@@ -69,7 +69,7 @@
 
 -- | Creates a new 'HScale'.
 --
-hScaleNew :: 
+hScaleNew ::
     Adjustment -- ^ @adjustment@ - the 'Adjustment' which sets the range of
                -- the scale.
  -> IO HScale
@@ -88,7 +88,7 @@
 -- is a power of ten. If the resulting precision is not suitable for your
 -- needs, use 'Graphics.UI.Gtk.Abstract.Scale.scaleSetDigits' to correct it.
 --
-hScaleNewWithRange :: 
+hScaleNewWithRange ::
     Double    -- ^ @min@ - minimum value
  -> Double    -- ^ @max@ - maximum value
  -> Double    -- ^ @step@ - step increment (tick size) used with keyboard
diff --git a/Graphics/UI/Gtk/Entry/SpinButton.chs b/Graphics/UI/Gtk/Entry/SpinButton.chs
--- a/Graphics/UI/Gtk/Entry/SpinButton.chs
+++ b/Graphics/UI/Gtk/Entry/SpinButton.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Entry.SpinButton (
 -- * Detail
--- 
+--
 -- | A 'SpinButton' is an ideal way to allow the user to set the value of some
 -- attribute. Rather than having to directly type a number into a 'Entry',
 -- 'SpinButton' allows the user to click on one of two arrows to increment or
@@ -125,7 +125,7 @@
 
 -- | Creates a new 'SpinButton'.
 --
-spinButtonNew :: 
+spinButtonNew ::
     Adjustment    -- ^ @adjustment@ - the 'Adjustment' object that this spin
                   -- button should use.
  -> Double        -- ^ @climbRate@ - specifies how much the spin button
@@ -149,7 +149,7 @@
 -- is a power of ten. If the resulting precision is not suitable for your
 -- needs, use 'spinButtonSetDigits' to correct it.
 --
-spinButtonNewWithRange :: 
+spinButtonNewWithRange ::
     Double        -- ^ @min@ - Minimum allowable value
  -> Double        -- ^ @max@ - Maximum allowable value
  -> Double        -- ^ @step@ - Increment added or subtracted by spinning the
diff --git a/Graphics/UI/Gtk/Entry/VScale.chs b/Graphics/UI/Gtk/Entry/VScale.chs
--- a/Graphics/UI/Gtk/Entry/VScale.chs
+++ b/Graphics/UI/Gtk/Entry/VScale.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Entry.VScale (
 -- * Detail
--- 
+--
 -- | The 'VScale' widget is used to allow the user to select a value using a
 -- vertical slider. To create one, use 'vScaleNewWithRange'.
 --
@@ -69,7 +69,7 @@
 
 -- | Creates a new 'VScale'.
 --
-vScaleNew :: 
+vScaleNew ::
     Adjustment -- ^ @adjustment@ - the 'Adjustment' which sets the range of
                -- the scale.
  -> IO VScale
@@ -88,7 +88,7 @@
 -- is a power of ten. If the resulting precision is not suitable for your
 -- needs, use 'Graphics.UI.Gtk.Abstract.Scale.scaleSetDigits' to correct it.
 --
-vScaleNewWithRange :: 
+vScaleNewWithRange ::
     Double    -- ^ @min@ - minimum value
  -> Double    -- ^ @max@ - maximum value
  -> Double    -- ^ @step@ - step increment (tick size) used with keyboard
diff --git a/Graphics/UI/Gtk/Gdk/AppLaunchContext.chs b/Graphics/UI/Gtk/Gdk/AppLaunchContext.chs
--- a/Graphics/UI/Gtk/Gdk/AppLaunchContext.chs
+++ b/Graphics/UI/Gtk/Gdk/AppLaunchContext.chs
@@ -48,11 +48,8 @@
 #endif
   ) where
 
-import Control.Monad	(liftM)
-
 import System.Glib.FFI
 import System.Glib.UTFString
-import System.Glib.GObject		(wrapNewGObject)
 import Graphics.UI.Gtk.Gdk.EventM (TimeStamp)
 {#import Graphics.UI.Gtk.Types#}
 #ifdef HAVE_GIO
diff --git a/Graphics/UI/Gtk/Gdk/Cursor.chs b/Graphics/UI/Gtk/Gdk/Cursor.chs
--- a/Graphics/UI/Gtk/Gdk/Cursor.chs
+++ b/Graphics/UI/Gtk/Gdk/Cursor.chs
@@ -52,13 +52,9 @@
 
 import System.Glib.FFI
 import System.Glib.UTFString
-import Foreign.ForeignPtr (ForeignPtr, castForeignPtr)
-#if __GLASGOW_HASKELL__ >= 707
-import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
-#else
-import Foreign.ForeignPtr (unsafeForeignPtrToPtr)
+#if GTK_MAJOR_VERSION < 3
+import Graphics.UI.Gtk.General.Structs (Color)
 #endif
-import Graphics.UI.Gtk.General.Structs
 
 {#import Graphics.UI.Gtk.Types#} hiding (Arrow)
 
diff --git a/Graphics/UI/Gtk/Gdk/Display.chs b/Graphics/UI/Gtk/Gdk/Display.chs
--- a/Graphics/UI/Gtk/Gdk/Display.chs
+++ b/Graphics/UI/Gtk/Gdk/Display.chs
@@ -121,7 +121,6 @@
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.Signals
 import Graphics.UI.Gtk.Gdk.EventM
-import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..))
 import Graphics.UI.Gtk.General.DNDTypes (SelectionTag, TargetTag, Atom(..))
 
 {# context lib="gdk" prefix="gdk" #}
diff --git a/Graphics/UI/Gtk/Gdk/DisplayManager.chs b/Graphics/UI/Gtk/Gdk/DisplayManager.chs
--- a/Graphics/UI/Gtk/Gdk/DisplayManager.chs
+++ b/Graphics/UI/Gtk/Gdk/DisplayManager.chs
@@ -62,13 +62,10 @@
 #endif
   ) where
 
-import Control.Monad	(liftM)
-
 import System.Glib.FFI
 import System.Glib.Attributes
 import System.Glib.Properties
 import System.Glib.GList
-import System.Glib.GObject		(constructNewGObject, makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 
@@ -89,7 +86,7 @@
 -- | List all currently open displays.
 --
 displayManagerListDisplays :: DisplayManagerClass self => self
- -> IO [Display] -- ^ returns a newly allocated list of 'Display' objects. 
+ -> IO [Display] -- ^ returns a newly allocated list of 'Display' objects.
 displayManagerListDisplays self =
   {# call gdk_display_manager_list_displays #}
     (toDisplayManager self)
diff --git a/Graphics/UI/Gtk/Gdk/DrawWindow.chs b/Graphics/UI/Gtk/Gdk/DrawWindow.chs
--- a/Graphics/UI/Gtk/Gdk/DrawWindow.chs
+++ b/Graphics/UI/Gtk/Gdk/DrawWindow.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Gdk.DrawWindow (
 -- A 'DrawWindow' is used to implement high-level objects such as 'Widget' and
--- 'Window' on the Gtk+ level. 
+-- 'Window' on the Gtk+ level.
 --
 -- Most widgets draws its content into a 'DrawWindow', in particular
 -- 'DrawingArea' is nothing but a widget that contains a 'DrawWindow'.
@@ -61,6 +61,7 @@
 #endif
   drawWindowRaise,
   drawWindowLower,
+  drawWindowRegisterDnd,
   drawWindowBeginPaintRect,
 #if GTK_MAJOR_VERSION < 3
   drawWindowBeginPaintRegion,
@@ -102,26 +103,19 @@
 
 import System.Glib.FFI
 import System.Glib.Flags                (toFlags)
-import System.Glib.GObject              (wrapNewGObject,makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Gdk.Enums#}
 #if GTK_MAJOR_VERSION < 3
 {#import Graphics.UI.Gtk.Gdk.Region#}
 #endif
 {#import Graphics.UI.Gtk.Gdk.Cursor#}
-import Graphics.UI.Gtk.Gdk.EventM	(Modifier,
-#if GTK_MAJOR_VERSION < 3
-    eventRegion,
-#endif
-    )
 import Graphics.UI.Gtk.General.Structs
-import Graphics.UI.Gtk.Abstract.Widget	(widgetSetDoubleBuffered)
 
 {# context lib="gdk" prefix="gdk" #}
 
 -- | Gets the bitwise OR of the currently active drawWindow state flags, from
 -- the 'WindowState' enumeration.
--- 
+--
 drawWindowGetState :: DrawWindowClass self => self
  -> IO [WindowState] -- ^ returns @DrawWindow@ flags
 drawWindowGetState self =
@@ -139,7 +133,7 @@
 -- if the edges of the window's parent do not extend beyond the edges of the
 -- drawWindow. In other cases, a multi-step process is used to scroll the window
 -- which may produce temporary visual artifacts and unnecessary invalidations.)
--- 
+--
 drawWindowScroll :: DrawWindowClass self => self
  -> Int   -- ^ @dx@ - Amount to scroll in the X direction
  -> Int   -- ^ @dy@ - Amount to scroll in the Y direction
@@ -152,7 +146,7 @@
 
 #if GTK_MAJOR_VERSION < 3
 -- | Clears an entire @DrawWindow@ to the background color or background pixmap.
--- 
+--
 -- Removed in Gtk3.
 drawWindowClear :: DrawWindowClass self => self -> IO ()
 drawWindowClear self =
@@ -160,8 +154,8 @@
      (toDrawWindow self)
 
 -- | Clears an area of @DrawWindow@ to the background color or background pixmap.
--- 
--- Removed in Gtk3. 
+--
+-- Removed in Gtk3.
 drawWindowClearArea :: DrawWindowClass self => self
  -> Int   -- ^ @x@ - x coordinate of rectangle to clear
  -> Int   -- ^ @y@ - y coordinate of rectangle to clear
@@ -178,7 +172,7 @@
 
 -- | Like 'drawWindowClearArea', but also generates an expose event for the
 -- cleared area.
--- 
+--
 -- Removed in Gtk3.
 drawWindowClearAreaExpose :: DrawWindowClass self => self
  -> Int   -- ^ @x@ - x coordinate of rectangle to clear
@@ -202,7 +196,7 @@
 -- If @DrawWindow@ is a toplevel, the window manager may choose to deny the
 -- request to move the drawWindow in the Z-order, 'drawWindowRaise' only requests the
 -- restack, does not guarantee it.
--- 
+--
 drawWindowRaise :: DrawWindowClass self => self -> IO ()
 drawWindowRaise self =
   {# call gdk_window_raise #}
@@ -227,7 +221,7 @@
      (toDrawWindow self)
 
 -- | Registers a drawWindow as a potential drop destination.
--- 
+--
 drawWindowRegisterDnd :: DrawWindowClass self => self -> IO ()
 drawWindowRegisterDnd self =
   {# call gdk_window_register_dnd #}
@@ -237,7 +231,7 @@
 -- rectangular region for you.
 --
 -- * See 'drawWindowBeginPaintRegion' for details.
--- 
+--
 drawWindowBeginPaintRect :: DrawWindowClass self => self
  -> Rectangle -- ^ @rectangle@ - rectangle you intend to draw to
  -> IO ()
@@ -281,7 +275,7 @@
 -- drawing operations affect only the topmost backing store in the stack. One
 -- matching call to 'drawWindowEndPaint' is required for each call to
 -- 'drawWindowBeginPaintRegion'.
--- 
+--
 -- Removed in Gtk3.
 drawWindowBeginPaintRegion :: DrawWindowClass self => self
  -> Region -- ^ @region@ - region you intend to draw to
@@ -299,7 +293,7 @@
 -- next-most-recent backing store or no backing store at all as the active
 -- paint region. See 'drawWindowBeginPaintRegion' for full details. It is an error
 -- to call this function without a matching 'drawWindowBeginPaintRegion' first.
--- 
+--
 drawWindowEndPaint :: DrawWindowClass self => self -> IO ()
 drawWindowEndPaint self =
   {# call gdk_window_end_paint #}
@@ -307,7 +301,7 @@
 
 -- | A convenience wrapper around 'drawWindowInvalidateRegion' which invalidates a
 -- rectangular region. See 'drawWindowInvalidateRegion' for details.
--- 
+--
 drawWindowInvalidateRect :: DrawWindowClass self => self
  -> Rectangle -- ^ @rect@ - rectangle to invalidate
  -> Bool              -- ^ @invalidateChildren@ - whether to also invalidate
@@ -330,7 +324,7 @@
 -- The @invalidateChildren@ parameter controls whether the region of each
 -- child drawWindow that intersects @region@ will also be invalidated. If @False@,
 -- then the update area for child drawWindows will remain unaffected.
--- 
+--
 drawWindowInvalidateRegion :: DrawWindowClass self => self
  -> Region -- ^ @region@ - a "Region"
  -> Bool           -- ^ @invalidateChildren@ - @True@ to also invalidate child
@@ -350,7 +344,7 @@
 -- function. That is, after calling this function, @DrawWindow@ will no longer have
 -- an invalid\/dirty region; the update area is removed from @DrawWindow@ and
 -- handed to you. If this window has no update area, 'drawWindowGetUpdateArea' returns 'Nothing'.
--- 
+--
 -- Removed in Gtk3.
 drawWindowGetUpdateArea :: DrawWindowClass self => self
  -> IO (Maybe Region) -- ^ returns the update area for @DrawWindow@
@@ -360,19 +354,19 @@
 #endif
 
 -- | Temporarily freezes a drawWindow such that it won\'t receive expose events.
---  * The drawWindow will begin receiving expose events again when 
+--  * The drawWindow will begin receiving expose events again when
 --  'drawWindowThawUpdates'
 -- is called. If 'drawWindowFreezeUpdates' has been called more than once,
 -- 'drawWindowThawUpdates' must be called an equal number of times to begin
 -- processing exposes.
--- 
+--
 drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO ()
 drawWindowFreezeUpdates self =
   {# call gdk_window_freeze_updates #}
      (toDrawWindow self)
 
 -- | Thaws a drawWindow frozen with 'drawWindowFreezeUpdates'.
--- 
+--
 drawWindowThawUpdates :: DrawWindowClass self => self -> IO ()
 drawWindowThawUpdates self =
   {# call gdk_window_thaw_updates #}
@@ -388,7 +382,7 @@
 -- and synchronously (vs. the usual case, where Gtk delivers them in an idle
 -- handler). Occasionally this is useful to produce nicer scrolling behavior,
 -- for example.
--- 
+--
 drawWindowProcessUpdates :: DrawWindowClass self => self
  -> Bool  -- ^ @updateChildren@ - whether to also process updates for child
           -- drawWindows
@@ -406,7 +400,7 @@
 -- hint. ICCCM-compliant drawWindow manager usually respect it.
 --
 -- * Available since Gdk version 2.4
--- 
+--
 drawWindowSetAcceptFocus :: DrawWindowClass self => self
  -> Bool  -- ^ @acceptFocus@ - @True@ if the drawWindow should receive input focus
  -> IO ()
@@ -428,7 +422,7 @@
 --
 -- * On the X11 platform, this uses an X server extension which is widely
 --   available on most common platforms, but not available on very old
---   X servers, and occasionally the implementation will be buggy. 
+--   X servers, and occasionally the implementation will be buggy.
 --   On servers without the shape extension, this function will do nothing.
 --   On the Win32 platform the functionality is always present.
 --
@@ -472,7 +466,7 @@
 -- shape extension, this function will do nothing.
 --
 -- This function works on both toplevel and child drawWindows.
--- 
+--
 drawWindowShapeCombineRegion :: DrawWindowClass self => self
  -> Maybe Region -- ^ @shapeRegion@ - region of drawWindow to be non-transparent
  -> Int            -- ^ @offsetX@ - X position of @shapeRegion@ in @DrawWindow@
@@ -498,7 +492,7 @@
 -- children of @DrawWindow@, ignoring the shape mask of @DrawWindow@ itself. Contrast
 -- with 'drawWindowMergeChildShapes' which includes the shape mask of @DrawWindow@ in
 -- the masks to be merged.
--- 
+--
 drawWindowSetChildShapes :: DrawWindowClass self => self -> IO ()
 drawWindowSetChildShapes self =
   {# call gdk_window_set_child_shapes #}
@@ -510,7 +504,7 @@
 --
 -- This function is distinct from 'drawWindowSetChildShapes' because it includes
 -- @DrawWindow@'s shape mask in the set of shapes to be merged.
--- 
+--
 drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO ()
 drawWindowMergeChildShapes self =
   {# call gdk_window_merge_child_shapes #}
@@ -521,7 +515,7 @@
 --
 -- * The position is
 -- given in coordinates relative to the given window.
--- 
+--
 -- * The return value is @Just (same, x, y, mod)@ where @same@ is @True@
 --   if the passed in window is the window over which the mouse currently
 --   resides.
@@ -548,12 +542,12 @@
 --
 -- * The position is
 -- given in coordinates relative to the given window.
--- 
+--
 -- * The return value is @(Just win, x, y, mod)@ where @win@ is the
 --   window over which the mouse currently resides and @mod@ denotes
 --   the keyboard modifiers currently being depressed.
 --
--- * The return value is @Nothing@ for the window if the mouse cursor is 
+-- * The return value is @Nothing@ for the window if the mouse cursor is
 --   not over a known window.
 --
 drawWindowGetPointerPos :: DrawWindowClass self => self
@@ -613,8 +607,8 @@
 #endif
 
 -- | Obtains the root window (parent all other windows are inside) for the default display and screen.
-drawWindowGetDefaultRootWindow :: 
-  IO DrawWindow -- ^ returns the default root window 
+drawWindowGetDefaultRootWindow ::
+  IO DrawWindow -- ^ returns the default root window
 drawWindowGetDefaultRootWindow =
   makeNewGObject mkDrawWindow $
   {#call gdk_get_default_root_window #}
diff --git a/Graphics/UI/Gtk/Gdk/EventM.hsc b/Graphics/UI/Gtk/Gdk/EventM.hsc
--- a/Graphics/UI/Gtk/Gdk/EventM.hsc
+++ b/Graphics/UI/Gtk/Gdk/EventM.hsc
@@ -1,4 +1,5 @@
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE EmptyDataDecls #-}
 -- -*-haskell-*-
 
 #include <gtk/gtk.h>
@@ -197,8 +198,6 @@
 import Graphics.UI.Gtk.General.DNDTypes (Atom(..), SelectionTag)
 import Graphics.UI.Gtk.Types ( DrawWindow, mkDrawWindow )
 
-import Data.Bits ((.|.), (.&.), testBit, shiftL, shiftR)
-import Data.Maybe (catMaybes)
 import Data.List (isPrefixOf)
 import Control.Monad.Reader ( ReaderT, ask, runReaderT )
 import Control.Monad.Trans ( liftIO )
@@ -216,56 +215,56 @@
 
 -- | A monad providing access to data in an event.
 --
-type EventM t a = ReaderT (Ptr t) IO a
+type EventM t = ReaderT (Ptr t) IO
 
 -- | A tag for events that do not carry any event-specific information.
-data EAny = EAny
+data EAny
 
 -- | A tag for /key/ events.
-data EKey = EKey
+data EKey
 
 -- | A tag for /Button/ events.
-data EButton = EButton
+data EButton
 
 -- | A tag for /Scroll/ events.
-data EScroll = EScroll
+data EScroll
 
 -- | A tag for /Motion/ events.
-data EMotion = EMotion
+data EMotion
 
 -- | A tag for /Expose/ events.
-data EExpose = EExpose
+data EExpose
 
 -- | A tag for /Visibility/ events.
-data EVisibility = EVisibility
+data EVisibility
 
 -- | A tag for /Crossing/ events.
-data ECrossing = ECrossing
+data ECrossing
 
 -- | A tag for /Focus/ events.
-data EFocus = EFocus
+data EFocus
 
 -- | A tag for /Configure/ events.
-data EConfigure = EConfigure
+data EConfigure
 
 -- | A tag for /Property/ events.
-data EProperty = EProperty
+data EProperty
 
 -- | A tag for /Proximity/ events.
-data EProximity = EProximity
+data EProximity
 
 -- | A tag for /WindowState/ event.
-data EWindowState = EWindowState
+data EWindowState
 
 #if GTK_CHECK_VERSION(2,6,0)
 -- | A tag for /OwnerChange/ events.
-data EOwnerChange = EOwnerChange
+data EOwnerChange
 #endif
 
 
 #if GTK_CHECK_VERSION(2,8,0)
 -- | A tag for /GrabBroken/ events.
-data EGrabBroken = EGrabBroken
+data EGrabBroken
 #endif
 
 -- | Retrieve the 'Graphics.UI.Gtk.Gdk.DrawWindow.DrawWindow' that this
diff --git a/Graphics/UI/Gtk/Gdk/Events.hsc b/Graphics/UI/Gtk/Gdk/Events.hsc
--- a/Graphics/UI/Gtk/Gdk/Events.hsc
+++ b/Graphics/UI/Gtk/Gdk/Events.hsc
@@ -70,7 +70,6 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 import System.Glib.Flags
-import System.Glib.GObject ( makeNewGObject )
 import Graphics.UI.Gtk.Gdk.Keys		(KeyVal, keyvalToChar, keyvalName)
 #if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Gdk.Region       (Region, makeNewRegion)
@@ -83,12 +82,7 @@
 					 ScrollDirection(..))
 import Graphics.UI.Gtk.General.Enums	(MouseButton(..), Click(..))
 import Graphics.UI.Gtk.General.Structs	(Rectangle(..))
-import Graphics.UI.Gtk.Types ( DrawWindow, mkDrawWindow )
 
-import Data.Bits ((.|.), (.&.), testBit, shiftL, shiftR)
-import Data.Maybe (catMaybes)
-
-
 -- | The time (in milliseconds) when an event happened. This is used mostly
 -- for ordering events and responses to events.
 --
@@ -209,7 +203,7 @@
 #endif
 
     -- | The number of contiguous 'Expose' events following this
-    --   one. The only use for this is \"exposure compression\", i.e. 
+    --   one. The only use for this is \"exposure compression\", i.e.
     --   handling all contiguous 'Expose' events in one go, though Gdk
     --   performs some exposure compression so this is not normally needed.
     eventCount	:: Int }
@@ -233,7 +227,7 @@
     --
     eventIsHint	:: Bool,
     eventXRoot,
-    eventYRoot	:: Double } 
+    eventYRoot	:: Double }
   -- | A mouse button was pressed or released.
   --
   -- * This event is triggered if the mouse button was pressed or released
@@ -382,7 +376,7 @@
     -- | The mask indicates which flags have changed.
     eventWindowMask	:: [WindowState],
     -- | The state indicates the current state of the window.
-    eventWindowState	:: [WindowState]} 
+    eventWindowState	:: [WindowState]}
   -- | The state of the pen of a graphics tablet pen or touchscreen device.
   | Proximity {
     eventSent	:: Bool,
@@ -410,7 +404,7 @@
     #{const GDK_FOCUS_CHANGE}	-> marshFocus
     #{const GDK_CONFIGURE}	-> marshConfigure
     #{const GDK_MAP}            -> marshAny
-    #{const GDK_UNMAP}          -> marshAny    
+    #{const GDK_UNMAP}          -> marshAny
 --    #{const GDK_PROPERTY_NOTIFY}-> marshProperty
     #{const GDK_PROXIMITY_IN}   -> marshProximity True
     #{const GDK_PROXIMITY_OUT}	-> marshProximity False
@@ -502,7 +496,7 @@
   (time_   ::#gtk2hs_type guint32)	<- #{peek GdkEventKey, time} ptr
   (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventKey, state} ptr
   (keyval_ ::#gtk2hs_type guint)	<- #{peek GdkEventKey, keyval} ptr
-  
+
   (length_ ::#gtk2hs_type gint)	<- #{peek GdkEventKey, length} ptr
   keyChar <- keyvalToChar keyval_
   keyName <- unsafeInterleaveIO $ keyvalName keyval_
@@ -526,10 +520,10 @@
   (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventCrossing, state} ptr
   (xRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventCrossing, x_root} ptr
   (yRoot_  ::#gtk2hs_type gdouble)	<- #{peek GdkEventCrossing, y_root} ptr
-  (cMode_  ::#gtk2hs_type GdkCrossingMode) 
+  (cMode_  ::#gtk2hs_type GdkCrossingMode)
 				<- #{peek GdkEventCrossing, mode} ptr
   (nType_  ::#gtk2hs_type GdkNotifyType)
-				<- #{peek GdkEventCrossing, detail} ptr  
+				<- #{peek GdkEventCrossing, detail} ptr
   (modif_  ::#gtk2hs_type guint)	<- #{peek GdkEventCrossing, state} ptr
   return $ Crossing {
     eventSent   = toBool sent_,
diff --git a/Graphics/UI/Gtk/Gdk/Keymap.chs b/Graphics/UI/Gtk/Gdk/Keymap.chs
--- a/Graphics/UI/Gtk/Gdk/Keymap.chs
+++ b/Graphics/UI/Gtk/Gdk/Keymap.chs
@@ -28,24 +28,24 @@
 module Graphics.UI.Gtk.Gdk.Keymap (
 
 -- * Details
--- 
+--
 -- | Key values are the codes which are sent whenever a key is pressed or released. They appear in the
 -- keyval field of the 'EventKey' structure, which is passed to signal handlers for the
--- 'keyPressEvent' and 'keyReleaseEvent' signals. 
--- 
+-- 'keyPressEvent' and 'keyReleaseEvent' signals.
+--
 -- Key values are regularly updated from the upstream X.org X11 implementation, so new values are added
 -- regularly. They will be prefixed with GDK_ rather than XF86XK_ or ' (for older symbols)'.
--- 
+--
 -- Key values can be converted into a string representation using 'keyvalName'. The reverse
 -- function, converting a string to a key value, is provided by 'keyvalFromName'.
--- 
+--
 -- The case of key values can be determined using 'keyvalIsUpper'. Key
 -- values can be converted to upper or lower case using 'keyvalToUpper' and
 -- 'keyvalToLower'.
--- 
+--
 -- When it makes sense, key values can be converted to and from Unicode characters with
 -- 'keyvalToUnicode'.
--- 
+--
 -- One 'Keymap' object exists for each user display. 'keymapGetDefault' returns the 'Keymap'
 -- for the default display; to obtain keymaps for other displays, use 'keymapGetForDisplay'. A
 -- keymap is a mapping from 'KeymapKey' to key values. You can think of a 'KeymapKey' as a
@@ -61,7 +61,7 @@
 -- movement in a horizontal direction. Usually groups are used for two different languages. In group 0,
 -- a key might have two English characters, and in group 1 it might have two Hebrew characters. The
 -- Hebrew characters will be printed on the key next to the English characters.
--- 
+--
 -- In order to use a keymap to interpret a key event, it's necessary to first convert the keyboard
 -- state into an effective group and level. This is done via a set of rules that varies widely
 -- according to type of keyboard and user configuration.  The function
@@ -71,7 +71,7 @@
 -- and level. i.e. it returns "unconsumed modifiers." The keyboard group may differ from the effective
 -- group used for keymap lookups because some keys don't have multiple groups - e.g. the Enter key is
 -- always in group 0 regardless of keyboard state.
--- 
+--
 -- Note that 'keymapTranslateKeyboardState' also returns the keyval, i.e. it goes ahead and
 -- performs the keymap lookup in addition to telling you which effective group/level values were used
 -- for the lookup. 'EventKey' already contains this keyval, however, so you don't normally need to
@@ -122,9 +122,7 @@
   ) where
 
 import Control.Monad	(liftM)
-import Data.Maybe (fromMaybe)
 import System.Glib.FFI
-import System.Glib.UTFString
 import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..))
 import Graphics.UI.Gtk.Gdk.Keys	(KeyVal (..))
 {#import Graphics.Rendering.Pango.Enums#}
@@ -164,26 +162,26 @@
 -- 'keymapTranslateKeyboardState' instead of this function, since the effective
 -- group\/level may not be the same as the current keyboard state.
 --
-keymapLookupKey :: KeymapClass self 
-                => (Maybe self) -- ^ @keymap@  a 'Keymap' or 'Nothing' to use the default keymap             
+keymapLookupKey :: KeymapClass self
+                => (Maybe self) -- ^ @keymap@  a 'Keymap' or 'Nothing' to use the default keymap
                 -> KeymapKey -- ^ @key@ - a 'KeymapKey'
                             -- with keycode, group, and level initialized
                 -> IO Int    -- ^ returns a keyval, or 0 if none was mapped to
                             -- the given @key@
-keymapLookupKey Nothing key = 
+keymapLookupKey Nothing key =
   liftM fromIntegral $
   allocaBytes {# sizeof GdkKeymapKey #} $ \ keyPtr -> do
     poke keyPtr key
     {# call gdk_keymap_lookup_key #}
       (Keymap nullForeignPtr)
-      (castPtr keyPtr)    
+      (castPtr keyPtr)
 keymapLookupKey (Just self) key =
   liftM fromIntegral $
   allocaBytes {# sizeof GdkKeymapKey #} $ \ keyPtr -> do
     poke keyPtr key
     {# call gdk_keymap_lookup_key #}
       (toKeymap self)
-      (castPtr keyPtr)    
+      (castPtr keyPtr)
 
 -- | Translates the contents of a 'EventKey' into a
 -- keyval, effective group, and level. Modifiers that affected the translation
@@ -203,7 +201,7 @@
 keymapTranslateKeyboardState self hardwareKeycode state group =
   alloca $ \keyvalPtr ->
   alloca $ \effectiveGroupPtr ->
-  alloca $ \levelPtr -> 
+  alloca $ \levelPtr ->
   alloca $ \modifierPtr -> do
     success <- liftM toBool $
               {# call gdk_keymap_translate_keyboard_state #}
@@ -215,7 +213,7 @@
                 effectiveGroupPtr
                 levelPtr
                 modifierPtr
-    if success 
+    if success
        then do
          keyval <- peek keyvalPtr
          effectiveGroup <- peek effectiveGroupPtr
@@ -235,7 +233,7 @@
 -- switch key might convert a keyboard between Hebrew to English modes, for
 -- example. 'EventKey' contains a @group@ field that
 -- indicates the active keyboard group. The level is computed from the modifier
--- mask. 
+-- mask.
 --
 keymapGetEntriesForKeyval :: KeymapClass self => self
  -> KeyVal                -- ^ @keyval@ - a keyval, such as @GDK_a@, @GDK_Up@,
@@ -260,7 +258,7 @@
        else return Nothing
 
 -- | Returns the keyvals bound to @hardwareKeycode@. The Nth 'KeymapKey'
--- in @keys@ is bound to the Nth keyval in @keyvals@. 
+-- in @keys@ is bound to the Nth keyval in @keyvals@.
 -- When a keycode is pressed by the user, the
 -- keyval from this list of entries is selected by considering the effective
 -- keyboard group and level. See 'keymapTranslateKeyboardState'.
@@ -270,7 +268,7 @@
  -> IO (Maybe ([KeymapKey], [KeyVal]))
 keymapGetEntriesForKeycode self hardwareKeycode =
   alloca $ \nEntriesPtr ->
-  allocaArray 0 $ \ keysPtr -> 
+  allocaArray 0 $ \ keysPtr ->
   allocaArray 0 $ \ keyvalsPtr -> do
     success <- liftM toBool $
               {# call gdk_keymap_get_entries_for_keycode #}
diff --git a/Graphics/UI/Gtk/Gdk/Pixbuf.chs b/Graphics/UI/Gtk/Gdk/Pixbuf.chs
--- a/Graphics/UI/Gtk/Gdk/Pixbuf.chs
+++ b/Graphics/UI/Gtk/Gdk/Pixbuf.chs
@@ -1,5 +1,6 @@
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE EmptyDataDecls #-}
 -- -*-haskell-*-
 --  GIMP Toolkit (GTK) Pixbuf
 --
@@ -124,21 +125,22 @@
   ) where
 
 import Control.Monad (liftM)
-import Data.Ix
 import System.Glib.FFI
 import System.Glib.UTFString
-import System.Glib.GDateTime
 import System.Glib.GObject
 {#import Graphics.UI.Gtk.Types#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.General.Structs		(Rectangle(..))
+#endif
 import System.Glib.GError	(GError(..), GErrorClass(..), GErrorDomain,
 				propagateGError)
 import Graphics.UI.Gtk.Gdk.PixbufData ( PixbufData, mkPixbufData )
 #if GTK_MAJOR_VERSION < 3
-import Graphics.UI.Gtk.Gdk.Pixmap (Bitmap, Pixmap)
-#endif
+import Graphics.UI.Gtk.Gdk.Pixmap (Bitmap)
+#else
 import Graphics.Rendering.Cairo
 import Graphics.Rendering.Cairo.Types
+#endif
 
 {# context prefix="gdk" #}
 
@@ -399,7 +401,6 @@
 	      IO ()
 pixbufSave pb fname iType options =
   let (keys, values) = unzip options in
-  let optLen = length keys in
   propagateGError $ \errPtrPtr ->
     withUTFFilePath fname $ \fnPtr ->
     withUTFString iType $ \tyPtr ->
@@ -458,7 +459,7 @@
 --   that is embedded in the executable. See
 --   'pixbufNewFromInline' for an example.
 --
-data InlineImage = InlineImage
+data InlineImage
 
 -- | Create a new image from a static pointer.
 --
diff --git a/Graphics/UI/Gtk/Gdk/PixbufAnimation.chs b/Graphics/UI/Gtk/Gdk/PixbufAnimation.chs
--- a/Graphics/UI/Gtk/Gdk/PixbufAnimation.chs
+++ b/Graphics/UI/Gtk/Gdk/PixbufAnimation.chs
@@ -80,9 +80,7 @@
 import System.Glib.GDateTime
 import System.Glib.GObject
 {#import Graphics.UI.Gtk.Types#}
-import System.Glib.GError	(GError(..), GErrorClass(..), GErrorDomain,
-				propagateGError)
-{# import Graphics.UI.Gtk.Gdk.Pixbuf #}
+import System.Glib.GError	(propagateGError)
 
 {# context prefix="gdk" #}
 
diff --git a/Graphics/UI/Gtk/Gdk/PixbufData.hs b/Graphics/UI/Gtk/Gdk/PixbufData.hs
--- a/Graphics/UI/Gtk/Gdk/PixbufData.hs
+++ b/Graphics/UI/Gtk/Gdk/PixbufData.hs
@@ -35,9 +35,8 @@
 
 import System.Glib.FFI
 import Graphics.UI.Gtk.Types
-import Data.Ix
 -- internal module of GHC
-import Data.Array.Base ( MArray, newArray, newArray_, unsafeRead, unsafeWrite,
+import Data.Array.Base ( MArray(..), newArray_, unsafeRead, unsafeWrite,
                          getBounds, getNumElements )
 
 -- | An array that stored the raw pixel data of a 'Pixbuf'.
diff --git a/Graphics/UI/Gtk/Gdk/Screen.chs b/Graphics/UI/Gtk/Gdk/Screen.chs
--- a/Graphics/UI/Gtk/Gdk/Screen.chs
+++ b/Graphics/UI/Gtk/Gdk/Screen.chs
@@ -68,7 +68,7 @@
 #endif
 #endif
 
---  screenGetSystemVisual,
+  screenGetSystemVisual,
 #if GTK_CHECK_VERSION(2,10,0)
   screenIsComposited,
 #endif
diff --git a/Graphics/UI/Gtk/General/Clipboard.chs b/Graphics/UI/Gtk/General/Clipboard.chs
--- a/Graphics/UI/Gtk/General/Clipboard.chs
+++ b/Graphics/UI/Gtk/General/Clipboard.chs
@@ -140,7 +140,7 @@
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.General.DNDTypes#} (SelectionTag, TargetTag,
-  atomNew, Atom(..))
+  Atom(..))
 {#import Graphics.UI.Gtk.General.Selection#} (InfoId, SelectionDataM)
 import Graphics.UI.Gtk.General.Structs (
   selectionPrimary,
@@ -148,8 +148,7 @@
   selectionClipboard,
   withTargetEntries)
 import Control.Monad ( liftM )
-import Control.Monad.Trans ( liftIO )
-import Control.Monad.Reader (runReaderT, ask)
+import Control.Monad.Reader (runReaderT)
 import Data.IORef ( newIORef, readIORef, writeIORef )
 
 {# context lib="gtk" prefix="gtk" #}
@@ -296,7 +295,7 @@
 -- The difference between this function and 'clipboardSetWithData' is that
 -- a 'GObject' is passed in.
 --
-clipboardSetWithOwner :: (ClipboardClass self, GObjectClass owner) => self
+_clipboardSetWithOwner :: (ClipboardClass self, GObjectClass owner) => self
  -> [(TargetTag, InfoId)]     -- ^ @targets@ - a list containing information
                               -- about the available forms for the clipboard
                               -- data
@@ -312,7 +311,7 @@
                               -- data succeeded. If setting the clipboard data
                               -- failed the provided callback functions will be
                               -- ignored.
-clipboardSetWithOwner self targets getFunc clearFunc owner = do
+_clipboardSetWithOwner self targets getFunc clearFunc owner = do
   gFunPtr <- mkClipboardGetFunc
     (\_ sPtr info _ -> runReaderT (getFunc info) sPtr >> return ())
   cFunPtr <- mkClipboardClearFunc
@@ -338,10 +337,10 @@
 -- has not subsequently called, returns the owner set by
 -- 'clipboardSetWithOwner'.
 --
-clipboardGetOwner :: ClipboardClass self => self
+_clipboardGetOwner :: ClipboardClass self => self
  -> IO (Maybe GObject) -- ^ returns the owner of the clipboard, if any; otherwise
                         -- @Nothing@.
-clipboardGetOwner self =
+_clipboardGetOwner self =
   maybeNull (makeNewGObject mkGObject) $
   {# call gtk_clipboard_get_owner #}
     (toClipboard self)
@@ -352,8 +351,8 @@
 -- 'clipboardSetWithData', and when the @clearFunc@ you supplied is called.
 -- Otherwise, the clipboard may be owned by someone else.
 --
-clipboardClear :: ClipboardClass self => self -> IO ()
-clipboardClear self =
+_clipboardClear :: ClipboardClass self => self -> IO ()
+_clipboardClear self =
   {# call gtk_clipboard_clear #}
     (toClipboard self)
 
diff --git a/Graphics/UI/Gtk/General/CssProvider.chs b/Graphics/UI/Gtk/General/CssProvider.chs
--- a/Graphics/UI/Gtk/General/CssProvider.chs
+++ b/Graphics/UI/Gtk/General/CssProvider.chs
@@ -58,17 +58,14 @@
 
   ) where
 
+#if GTK_MAJOR_VERSION >= 3
 {# context prefix ="gtk" #}
 
-import Control.Monad (liftM)
-
 import System.Glib.FFI
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
-import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain,
-                           propagateGError)
+import System.Glib.GError (propagateGError)
 
-#if GTK_MAJOR_VERSION >= 3
 {#enum CssProviderError {underscoreToCase} deriving (Bounded,Eq,Show)#}
 
 --------------------
diff --git a/Graphics/UI/Gtk/General/DNDTypes.chs b/Graphics/UI/Gtk/General/DNDTypes.chs
--- a/Graphics/UI/Gtk/General/DNDTypes.chs
+++ b/Graphics/UI/Gtk/General/DNDTypes.chs
@@ -46,7 +46,6 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#} ()
-import System.Glib.UTFString ( readUTFString, withUTFString )
 import Control.Monad ( liftM )
 import Control.Monad.Reader ( ReaderT )
 
diff --git a/Graphics/UI/Gtk/General/Drag.chs b/Graphics/UI/Gtk/General/Drag.chs
--- a/Graphics/UI/Gtk/General/Drag.chs
+++ b/Graphics/UI/Gtk/General/Drag.chs
@@ -137,13 +137,9 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 import System.Glib.Flags
-import System.Glib.UTFString ( withUTFString )
-import System.Glib.GObject		(makeNewGObject)
-import System.Glib.Attributes ( Attr, newAttr )
 import Graphics.UI.Gtk.General.StockItems ( StockId )
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.General.DNDTypes#}
-{#import Graphics.UI.Gtk.General.Selection#} ( TargetList )
 import Graphics.UI.Gtk.Gdk.Enums ( DragAction(..) )
 import Graphics.UI.Gtk.General.Enums ( DestDefaults(..), DragProtocol(..)
 #if GTK_CHECK_VERSION(2,12,0)
@@ -161,6 +157,9 @@
   )
 import Graphics.UI.Gtk.Signals
 import Control.Monad.Reader (runReaderT)
+#if GTK_MAJOR_VERSION < 3
+import System.Glib.Attributes ( Attr, newAttr )
+#endif
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/General/Enums.chs b/Graphics/UI/Gtk/General/Enums.chs
--- a/Graphics/UI/Gtk/General/Enums.chs
+++ b/Graphics/UI/Gtk/General/Enums.chs
@@ -27,6 +27,9 @@
 --
 module Graphics.UI.Gtk.General.Enums (
   AccelFlags(..),
+#if GTK_CHECK_VERSION(3,0,0)
+  Align(..),
+#endif
   ArrowType(..),
   AttachOptions(..),
   MouseButton(..),
@@ -72,6 +75,9 @@
   ScrollStep (..),
   SelectionMode(..),
   ShadowType(..),
+#if GTK_CHECK_VERSION(3,0,0)
+  StateFlags(..),
+#endif
   SortType(..),
   StateType(..),
 #if GTK_MAJOR_VERSION < 3
@@ -95,7 +101,7 @@
 #endif
   WindowPosition(..),
   WindowType(..),
-  WrapMode(..), 
+  WrapMode(..),
 #if GTK_CHECK_VERSION(2,16,0)
   EntryIconPosition(..),
 #endif
@@ -118,6 +124,12 @@
 
 instance Flags AccelFlags
 
+#if GTK_CHECK_VERSION(3,0,0)
+-- | State of an accelerator
+--
+{#enum Align {underscoreToCase} deriving(Bounded,Eq,Show)#}
+#endif
+
 -- | Arrow directions for the arrow widget
 --
 {#enum ArrowType {underscoreToCase} deriving (Eq,Show)#}
@@ -264,7 +276,7 @@
 -- * The 'Packing' parameter determines how the child behaves in the horizontal
 --   or vertical way in an 'Graphics.UI.Gtk.Layout.HBox' or
 --   'Graphics.UI.Gtk.Layout.VBox', respectively. 'PackNatural'
---   means the child is as big as it requests. It will stay at the start or 
+--   means the child is as big as it requests. It will stay at the start or
 --   end of a 'Graphics.UI.Gtk.Layout.Box' if there is more space available.
 --   All children packed with 'PackRepel' will be padded on both sides with
 --   additional space. 'PackGrow' will increase the size of a widget so that it
@@ -278,7 +290,7 @@
 --   it is irrelevant whether the main area is inserted at the start or
 --   the end of a box. Finally 'PackRepel' is most useful in a window
 --   where no widget can make use of excess space. Examples include a
---   dialog box without list boxes or text fields. 
+--   dialog box without list boxes or text fields.
 --
 data Packing = PackRepel
 	     | PackGrow
@@ -364,6 +376,16 @@
 -- | Shadow types
 --
 {#enum ShadowType {underscoreToCase} deriving (Eq,Show)#}
+
+#if GTK_CHECK_VERSION(3,0,0)
+-- | Describes a widget state. Widget states are used to match the widget against
+-- CSS pseudo-classes. Note that GTK extends the regular CSS classes and
+-- sometimes uses different names.
+--
+{#enum StateFlags {underscoreToCase} deriving (Bounded,Eq,Show)#}
+
+instance Flags StateFlags
+#endif
 
 -- Sort a 'Graphics.UI.Gtk.ModelView.TreeViewColumn' in ascending or descending
 -- order.
diff --git a/Graphics/UI/Gtk/General/General.chs b/Graphics/UI/Gtk/General/General.chs
--- a/Graphics/UI/Gtk/General/General.chs
+++ b/Graphics/UI/Gtk/General/General.chs
@@ -80,11 +80,10 @@
   ) where
 
 import System.Environment (getProgName, getArgs)
-import Control.Monad      (liftM, mapM, when)
+import Control.Monad      (liftM, when)
 import Control.Applicative ((<$>))
 import Control.Concurrent (rtsSupportsBoundThreads, newEmptyMVar,
                            putMVar, takeMVar)
-import Data.IORef         (IORef, newIORef, readIORef, writeIORef)
 
 import System.Glib.FFI
 import System.Glib.UTFString
diff --git a/Graphics/UI/Gtk/General/IconFactory.chs b/Graphics/UI/Gtk/General/IconFactory.chs
--- a/Graphics/UI/Gtk/General/IconFactory.chs
+++ b/Graphics/UI/Gtk/General/IconFactory.chs
@@ -108,7 +108,6 @@
 
 import System.Glib.FFI
 import System.Glib.UTFString
-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.General.Enums	(TextDirection(..), StateType(..))
 import Graphics.UI.Gtk.General.StockItems
diff --git a/Graphics/UI/Gtk/General/IconTheme.chs b/Graphics/UI/Gtk/General/IconTheme.chs
--- a/Graphics/UI/Gtk/General/IconTheme.chs
+++ b/Graphics/UI/Gtk/General/IconTheme.chs
@@ -140,16 +140,11 @@
   ) where
 
 import Control.Monad	(liftM)
-import Control.Applicative ((<$>))
 
 import System.Glib.FFI
-import System.Glib.Attributes
-import System.Glib.Properties
 import System.Glib.UTFString
 import System.Glib.GList
-import System.Glib.Flags
-import System.Glib.GObject		(wrapNewGObject, makeNewGObject, Quark)
-import System.Glib.GError   (GErrorDomain, GErrorClass(..), propagateGError)
+import System.Glib.GError   (propagateGError)
 import Graphics.UI.Gtk.General.Structs (Rectangle, Point)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
diff --git a/Graphics/UI/Gtk/General/RcStyle.chs b/Graphics/UI/Gtk/General/RcStyle.chs
--- a/Graphics/UI/Gtk/General/RcStyle.chs
+++ b/Graphics/UI/Gtk/General/RcStyle.chs
@@ -460,7 +460,6 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 import System.Glib.GType (GType)
-import System.Glib.GTypeConstants (none)
 {#import Graphics.UI.Gtk.Types#}
 
 
diff --git a/Graphics/UI/Gtk/General/Selection.chs b/Graphics/UI/Gtk/General/Selection.chs
--- a/Graphics/UI/Gtk/General/Selection.chs
+++ b/Graphics/UI/Gtk/General/Selection.chs
@@ -120,12 +120,9 @@
   )
 
 import Graphics.UI.Gtk.Signals
-import System.Glib.UTFString ( peekUTFString, withUTFStringLen,
-                               withUTFStringArray0, peekUTFStringArray0 )
 import Control.Monad ( liftM )
 import Control.Monad.Trans ( liftIO )
 import Control.Monad.Reader (runReaderT, ask)
-import Data.Word ( Word32 )
 
 {# context lib="gtk" prefix="gtk" #}
 
@@ -269,9 +266,13 @@
 -- The GtkSelectionData struct was made opaque in Gtk3, but the accessor routines
 -- where introduced in 2.14.
 #if GTK_CHECK_VERSION(2,14,0)
+#if GTK_MAJOR_VERSION < 3
 selectionDataGet_format selPtr = {#call gtk_selection_data_get_format#} selPtr
+#endif
 selectionDataGet_length selPtr = {#call gtk_selection_data_get_length#} selPtr
+#if GTK_MAJOR_VERSION < 3
 selectionDataGet_data selPtr = {#call gtk_selection_data_get_data#} selPtr
+#endif
 selectionDataGet_target selPtr = {#call gtk_selection_data_get_target#} selPtr
 #else
 selectionDataGet_format selPtr = {#get SelectionData -> format#} selPtr
diff --git a/Graphics/UI/Gtk/General/Settings.chs b/Graphics/UI/Gtk/General/Settings.chs
--- a/Graphics/UI/Gtk/General/Settings.chs
+++ b/Graphics/UI/Gtk/General/Settings.chs
@@ -57,18 +57,6 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
-{#import Graphics.UI.Gtk.General.DNDTypes#} (SelectionTag, TargetTag,
-  atomNew, Atom(..))
-{#import Graphics.UI.Gtk.General.Selection#} (InfoId, SelectionDataM)
-import Graphics.UI.Gtk.General.Structs (
-  selectionPrimary,
-  selectionSecondary,
-  selectionClipboard,
-  withTargetEntries)
-import Control.Monad ( liftM )
-import Control.Monad.Trans ( liftIO )
-import Control.Monad.Reader (runReaderT, ask)
-import Data.IORef ( newIORef, readIORef, writeIORef )
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/General/StockItems.hsc b/Graphics/UI/Gtk/General/StockItems.hsc
--- a/Graphics/UI/Gtk/General/StockItems.hsc
+++ b/Graphics/UI/Gtk/General/StockItems.hsc
@@ -55,7 +55,7 @@
   stockCancel,
 #if GTK_CHECK_VERSION(2,16,0)
   stockCapsLockWarning,
-#endif                      
+#endif
   stockCDROM,
   stockClear,
   stockClose,
@@ -73,7 +73,7 @@
   stockDirectory,
 #if GTK_CHECK_VERSION(2,12,0)
   stockDiscard,
-#endif              
+#endif
   stockDisconnect,
   stockDnd,
   stockDndMultiple,
@@ -124,10 +124,10 @@
   stockOrientationReverseLandscape,
   stockOrientationPortrait,
   stockOrientationReversePortrait,
-#endif                                 
+#endif
 #if GTK_CHECK_VERSION(2,14,0)
   stockPageSetup,
-#endif                                 
+#endif
   stockPaste,
   stockPreferences,
   stockPrint,
@@ -136,7 +136,7 @@
   stockPrintPaused,
   stockPrintReport,
   stockPrintWarning,
-#endif    
+#endif
   stockPrintPreview,
   stockProperties,
   stockQuit,
@@ -148,7 +148,7 @@
   stockSaveAs,
 #if GTK_CHECK_VERSION(2,10,0)
   stockSelectAll,
-#endif                
+#endif
   stockSelectColor,
   stockSelectFont,
   stockSortAscending,
@@ -167,7 +167,7 @@
   stockZoomOut
   ) where
 
--- The StockItem structure is completely marshaled to Haskell. It is 
+-- The StockItem structure is completely marshaled to Haskell. It is
 -- possible to marshal all strings lazily because the string pointers are
 -- valid throughout the lifetime of the application. The only drawback it
 -- that a stock item that is replaced by the another item with the same
@@ -236,7 +236,7 @@
     #{poke GtkStockItem, stock_id} siPtr stockIdPtr
     labelPtr   <- newUTFString label
     #{poke GtkStockItem, label}	   siPtr labelPtr
-    #{poke GtkStockItem, modifier} siPtr 
+    #{poke GtkStockItem, modifier} siPtr
       ((fromIntegral (fromFlags modifier))::#{gtk2hs_type GdkModifierType})
     #{poke GtkStockItem, keyval}   siPtr ((fromIntegral keyval)::#{gtk2hs_type guint})
     transDomPtr<- newUTFString transDom
@@ -259,7 +259,7 @@
 -- | Lookup an item in stock.
 --
 stockLookupItem :: StockId -> IO (Maybe StockItem)
-stockLookupItem stockId = 
+stockLookupItem stockId =
   alloca $ \siPtr ->
   withUTFString stockId $ \strPtr -> do
   res <- stock_lookup strPtr siPtr
@@ -313,12 +313,12 @@
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-cancel.png>>
 stockCancel		:: StockId
 stockCancel		= #{const_str GTK_STOCK_CANCEL}
-                          
+
 #if GTK_CHECK_VERSION(2,16,0)
--- | <<http://library.gnome.org/devel/gtk/stable/gtk-caps-lock-warning.png>>                          
+-- | <<http://library.gnome.org/devel/gtk/stable/gtk-caps-lock-warning.png>>
 stockCapsLockWarning    :: StockId
 stockCapsLockWarning    = #{const_str GTK_STOCK_CAPS_LOCK_WARNING}
-#endif                          
+#endif
 
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-cdrom.png>>
 stockCDROM		:: StockId
@@ -397,10 +397,10 @@
 #endif
 
 #if GTK_CHECK_VERSION(2,12,0)
--- | 
+-- |
 stockDiscard            :: StockId
 stockDiscard            = #{const_str GTK_STOCK_DISCARD}
-#endif                          
+#endif
 
 #if GTK_CHECK_VERSION(2,6,0)
 
@@ -556,8 +556,8 @@
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-justify-right.png>>
 stockJustifyRight	:: StockId
 stockJustifyRight	= #{const_str GTK_STOCK_JUSTIFY_RIGHT}
-                          
--- | <<http://library.gnome.org/devel/gtk/stable/gtk-leave-fullscreen.png>>                          
+
+-- | <<http://library.gnome.org/devel/gtk/stable/gtk-leave-fullscreen.png>>
 stockLeaveFullscreen    :: StockId
 stockLeaveFullscreen    = #{const_str GTK_STOCK_LEAVE_FULLSCREEN}
 
@@ -679,22 +679,22 @@
 stockPrint		= #{const_str GTK_STOCK_PRINT}
 
 #if GTK_CHECK_VERSION(2,14,0)
--- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-error.png>>    
+-- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-error.png>>
 stockPrintError         :: StockId
 stockPrintError         = #{const_str GTK_STOCK_PRINT_ERROR}
-                          
+
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-paused.png>>
 stockPrintPaused        :: StockId
 stockPrintPaused        = #{const_str GTK_STOCK_PRINT_PAUSED}
-                          
+
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-report.png>>
 stockPrintReport        :: StockId
 stockPrintReport        = #{const_str GTK_STOCK_PRINT_REPORT}
-                          
+
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-warning.png>>
 stockPrintWarning       :: StockId
 stockPrintWarning       = #{const_str GTK_STOCK_PRINT_WARNING}
-#endif    
+#endif
 
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-print-preview.png>>
 stockPrintPreview	:: StockId
@@ -786,7 +786,7 @@
 #if GTK_CHECK_VERSION(2,4,0)
 
 -- | <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-ltr.png>>
--- <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-rtl.png>>    
+-- <<http://library.gnome.org/devel/gtk/stable/gtk-unindent-rtl.png>>
 stockUnindent		:: StockId
 stockUnindent		= #{const_str GTK_STOCK_UNINDENT}
 #else
diff --git a/Graphics/UI/Gtk/General/Structs.hsc b/Graphics/UI/Gtk/General/Structs.hsc
--- a/Graphics/UI/Gtk/General/Structs.hsc
+++ b/Graphics/UI/Gtk/General/Structs.hsc
@@ -1,5 +1,6 @@
 {-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-}
 {-# OPTIONS_HADDOCK hide #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
 -- -*-haskell-*-
 
 #include <gtk/gtk.h>
@@ -141,14 +142,14 @@
 -- | Represents the x and y coordinate of a point.
 --
 type Point = (Int, Int)
-    
-instance Storable Point where           
+
+instance Storable Point where
   sizeOf _ = #{const sizeof(GdkPoint)}
   alignment _ = alignment (undefined:: #gtk2hs_type gint)
   peek ptr = do
     (x_	     ::#gtk2hs_type gint)	<- #{peek GdkPoint, x} ptr
     (y_	     ::#gtk2hs_type gint)	<- #{peek GdkPoint, y} ptr
-    return $ (fromIntegral x_, fromIntegral y_) 
+    return $ (fromIntegral x_, fromIntegral y_)
   poke ptr (x, y) = do
     #{poke GdkPoint, x} ptr ((fromIntegral x)::#gtk2hs_type gint)
     #{poke GdkPoint, y} ptr ((fromIntegral y)::#gtk2hs_type gint)
@@ -161,7 +162,7 @@
     (y_	     ::#gtk2hs_type gint)	<- #{peek GdkRectangle, y} ptr
     (width_  ::#gtk2hs_type gint)	<- #{peek GdkRectangle, width} ptr
     (height_ ::#gtk2hs_type gint)	<- #{peek GdkRectangle, height} ptr
-    return $ Rectangle (fromIntegral x_) (fromIntegral y_) 
+    return $ Rectangle (fromIntegral x_) (fromIntegral y_)
 		       (fromIntegral width_) (fromIntegral height_)
   poke ptr (Rectangle x y width height) = do
     #{poke GdkRectangle, x} ptr ((fromIntegral x)::#gtk2hs_type gint)
@@ -240,7 +241,7 @@
         backgroundPtr = #{ptr GdkGCValues, background} ptr
     (foregroundPixelPtr :: CULong) <- #{peek GdkColor, pixel} foregroundPtr
     (backgroundPixelPtr :: CULong) <- #{peek GdkColor, pixel} backgroundPtr
-    colormapPtr <- gdkColormapGetSystem    
+    colormapPtr <- gdkColormapGetSystem
     gdkColormapQueryColor colormapPtr foregroundPixelPtr foregroundPtr
     gdkColormapQueryColor colormapPtr backgroundPixelPtr backgroundPtr
 
@@ -260,25 +261,25 @@
 		     pPtr <- #{peek GdkGCValues, clip_mask} ptr
 		     if (pPtr==nullPtr) then return Nothing else
 		       liftM Just $ makeNewGObject mkPixmap $ return pPtr
-    (subwindow_	:: #{gtk2hs_type GdkSubwindowMode}) 
+    (subwindow_	:: #{gtk2hs_type GdkSubwindowMode})
 		<- #{peek GdkGCValues, subwindow_mode} ptr
-    (tsXOrigin_	:: #{gtk2hs_type gint}) 
+    (tsXOrigin_	:: #{gtk2hs_type gint})
 		<- #{peek GdkGCValues, ts_x_origin} ptr
-    (tsYOrigin_	:: #{gtk2hs_type gint}) 
+    (tsYOrigin_	:: #{gtk2hs_type gint})
 		<- #{peek GdkGCValues, ts_y_origin} ptr
-    (clipXOrigin_:: #{gtk2hs_type gint}) 
+    (clipXOrigin_:: #{gtk2hs_type gint})
 		<- #{peek GdkGCValues, clip_x_origin} ptr
-    (clipYOrigin_:: #{gtk2hs_type gint}) 
+    (clipYOrigin_:: #{gtk2hs_type gint})
 		<- #{peek GdkGCValues, clip_y_origin} ptr
     (graphics_	:: #{gtk2hs_type gint})
 		<- #{peek GdkGCValues, graphics_exposures} ptr
     (lineWidth_	:: #{gtk2hs_type gint})
 		<- #{peek GdkGCValues, line_width} ptr
-    (lineStyle_	:: #{gtk2hs_type GdkLineStyle}) 
+    (lineStyle_	:: #{gtk2hs_type GdkLineStyle})
 		<- #{peek GdkGCValues, line_style} ptr
-    (capStyle_	:: #{gtk2hs_type GdkCapStyle}) 
+    (capStyle_	:: #{gtk2hs_type GdkCapStyle})
 		<- #{peek GdkGCValues, cap_style} ptr
-    (joinStyle_	:: #{gtk2hs_type GdkJoinStyle}) 
+    (joinStyle_	:: #{gtk2hs_type GdkJoinStyle})
 		<- #{peek GdkGCValues, join_style} ptr
     return $ GCValues {
       foreground = foreground_,
@@ -299,6 +300,7 @@
       capStyle   = (toEnum.fromIntegral) capStyle_,
       joinStyle  = (toEnum.fromIntegral) joinStyle_
     }
+  poke = error "GCValues poke undefined (not sure why)"
 
 pokeGCValues :: Ptr GCValues -> GCValues -> IO CInt
 pokeGCValues ptr (GCValues {
@@ -321,17 +323,17 @@
     joinStyle  = joinStyle_
   }) = do
     r <- newIORef 0
-    add r #{const GDK_GC_FOREGROUND } $ 
+    add r #{const GDK_GC_FOREGROUND } $
       poke (#{ptr GdkGCValues, foreground} ptr) foreground_
-    add r #{const GDK_GC_BACKGROUND } $ 
+    add r #{const GDK_GC_BACKGROUND } $
       poke (#{ptr GdkGCValues, background} ptr) background_
-    add r #{const GDK_GC_FUNCTION } $ 
-      #{poke GdkGCValues, function} ptr 
+    add r #{const GDK_GC_FUNCTION } $
+      #{poke GdkGCValues, function} ptr
       (fromIntegral (fromEnum function_):: #{gtk2hs_type GdkFunction})
     add r #{const GDK_GC_FILL } $
-      #{poke GdkGCValues, fill} ptr 
+      #{poke GdkGCValues, fill} ptr
       (fromIntegral (fromEnum fill_):: #{gtk2hs_type GdkFill})
-    case tile_ of 
+    case tile_ of
       Nothing -> return ()
       Just tile_ -> add r #{const GDK_GC_TILE} $
                     withForeignPtr (unPixmap tile_) $
@@ -355,7 +357,7 @@
     add r #{const GDK_GC_TS_Y_ORIGIN } $
       #{poke GdkGCValues, ts_y_origin } ptr
       (fromIntegral tsYOrigin_:: #{gtk2hs_type gint})
-    add r #{const GDK_GC_CLIP_X_ORIGIN } $ 
+    add r #{const GDK_GC_CLIP_X_ORIGIN } $
       #{poke GdkGCValues, clip_x_origin } ptr
       (fromIntegral clipXOrigin_:: #{gtk2hs_type gint})
     add r #{const GDK_GC_CLIP_Y_ORIGIN } $
@@ -370,10 +372,10 @@
     add r #{const GDK_GC_LINE_STYLE } $
       #{poke GdkGCValues, line_style } ptr
       (fromIntegral (fromEnum lineStyle_):: #{gtk2hs_type GdkLineStyle})
-    add r #{const GDK_GC_CAP_STYLE } $ 
+    add r #{const GDK_GC_CAP_STYLE } $
       #{poke GdkGCValues, cap_style } ptr
       (fromIntegral (fromEnum capStyle_):: #{gtk2hs_type GdkCapStyle})
-    add r #{const GDK_GC_JOIN_STYLE } $ 
+    add r #{const GDK_GC_JOIN_STYLE } $
       #{poke GdkGCValues, join_style } ptr
       (fromIntegral (fromEnum joinStyle_):: #{gtk2hs_type GdkJoinStyle})
     readIORef r
@@ -503,7 +505,7 @@
 --
 dialogGetActionArea :: DialogClass dc => dc -> IO HBox
 dialogGetActionArea dc = makeNewObject mkHBox $ liftM castPtr $
-  withForeignPtr ((unDialog.toDialog) dc) #{peek GtkDialog, action_area} 
+  withForeignPtr ((unDialog.toDialog) dc) #{peek GtkDialog, action_area}
 #endif
 
 -- | Some constructors that can be used as response
@@ -635,15 +637,15 @@
 
 #if GTK_MAJOR_VERSION < 3
 #if defined(WIN32)
-foreign import ccall unsafe "gdk_win32_drawable_get_handle" 
+foreign import ccall unsafe "gdk_win32_drawable_get_handle"
   gdk_win32_drawable_get_handle :: (Ptr Drawable) -> IO (Ptr a)
 #elif !defined(HAVE_QUARTZ_GTK)
-foreign import ccall unsafe "gdk_x11_drawable_get_xid" 
+foreign import ccall unsafe "gdk_x11_drawable_get_xid"
   gdk_x11_drawable_get_xid :: (Ptr Drawable) -> IO CInt
 #endif
 #else
 #if !defined(HAVE_QUARTZ_GTK) && !defined(WIN32)
-foreign import ccall unsafe "gdk_x11_window_get_xid" 
+foreign import ccall unsafe "gdk_x11_window_get_xid"
   gdk_x11_drawable_get_xid :: (Ptr DrawWindow) -> IO CInt
 #endif
 #endif
@@ -726,7 +728,7 @@
 
   -- | Icon size for icons next to dialog text.
   | IconSizeDialog
-  
+
   | IconSizeUser Int
   deriving (Eq)
 
@@ -740,14 +742,14 @@
   toEnum #{const GTK_ICON_SIZE_DIALOG} = IconSizeDialog
   toEnum n = IconSizeUser n
   fromEnum IconSizeInvalid = #{const GTK_ICON_SIZE_INVALID}
-  fromEnum IconSizeMenu = #{const GTK_ICON_SIZE_MENU}   
+  fromEnum IconSizeMenu = #{const GTK_ICON_SIZE_MENU}
   fromEnum IconSizeSmallToolbar = #{const GTK_ICON_SIZE_SMALL_TOOLBAR}
   fromEnum IconSizeLargeToolbar = #{const GTK_ICON_SIZE_LARGE_TOOLBAR}
   fromEnum IconSizeButton = #{const GTK_ICON_SIZE_BUTTON}
   fromEnum IconSizeDnd = #{const GTK_ICON_SIZE_DND}
   fromEnum IconSizeDialog = #{const GTK_ICON_SIZE_DIALOG}
   fromEnum (IconSizeUser n) = n
-  
+
 -- entry Widget Combo
 #if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
@@ -764,7 +766,7 @@
 #if GTK_MAJOR_VERSION < 3
 -- | Extract the buttons of a fileselection.
 --
-fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> 
+fileSelectionGetButtons :: FileSelectionClass fsel => fsel ->
 			   IO (Button, Button)
 fileSelectionGetButtons fsel =
     do
@@ -804,7 +806,7 @@
 -- Removed in Gtk3.
 widgetGetSize :: WidgetClass widget => widget -> IO (Int, Int)
 widgetGetSize da = withForeignPtr (unWidget.toWidget $ da) $ \wPtr -> do
-    (width :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, width} 
+    (width :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, width}
 			       (#{ptr GtkWidget, allocation} wPtr)
     (height :: #{gtk2hs_type gint}) <- #{peek GtkAllocation, height}
 				(#{ptr GtkWidget, allocation} wPtr)
@@ -1062,7 +1064,6 @@
 withTargetEntries tags fun = do
   ptrsInfo <- mapM (\(Atom tag, info) -> gdk_atom_name tag >>= \strPtr ->
                      return (TargetEntry strPtr info)) tags
-  let len = length tags
   res <- withArrayLen ptrsInfo (\len ptr -> fun len (castPtr ptr))
   mapM_ (\(TargetEntry ptr _) -> g_free ptr) ptrsInfo
   return res
@@ -1085,20 +1086,20 @@
 -- | A 'KeymapKey' is a hardware key that can be mapped to a keyval.
 data KeymapKey = KeymapKey {
        keycode   :: Int -- ^ @keycode@ the hardware keycode. This is an identifying number for a physical key.
-      ,group     :: Int -- ^ @group@ indicates movement in a horizontal direction. 
-                      -- Usually groups are used for two different languages. 
-                      -- In group  0, a key might have two English characters, 
-                      -- and in group 1 it might have two Hebrew characters. 
-                      -- The Hebrew characters will be printed on the key next to the English characters. 
-                      -- indicates which symbol on the key will be used, 
-                      -- in a vertical direction. So on a standard US keyboard, the                         
-      ,level     :: Int -- ^ @level@ key with the number "1" on it also has the exclamation 
+      ,group     :: Int -- ^ @group@ indicates movement in a horizontal direction.
+                      -- Usually groups are used for two different languages.
+                      -- In group  0, a key might have two English characters,
+                      -- and in group 1 it might have two Hebrew characters.
+                      -- The Hebrew characters will be printed on the key next to the English characters.
+                      -- indicates which symbol on the key will be used,
+                      -- in a vertical direction. So on a standard US keyboard, the
+      ,level     :: Int -- ^ @level@ key with the number "1" on it also has the exclamation
                       -- point ("!") character on it. The level
                       -- indicates whether to use the "1" or the "!" symbol. The letter keys are considered to
                       -- have a lowercase letter at level 0, and an uppercase letter at level 1, though only
                       -- the uppercase letter is printed.
-    } deriving (Eq, Show) 
-               
+    } deriving (Eq, Show)
+
 instance Storable KeymapKey where
   sizeOf _ = #{const sizeof(GdkKeymapKey)}
   alignment _ = alignment (undefined::#gtk2hs_type gint)
@@ -1111,5 +1112,5 @@
     #{poke GdkKeymapKey, keycode} ptr ((fromIntegral keycode)::#gtk2hs_type guint)
     #{poke GdkKeymapKey, group} ptr ((fromIntegral group)::#gtk2hs_type gint)
     #{poke GdkKeymapKey, level} ptr ((fromIntegral level)::#gtk2hs_type gint)
-               
-               
+
+
diff --git a/Graphics/UI/Gtk/General/Style.chs b/Graphics/UI/Gtk/General/Style.chs
--- a/Graphics/UI/Gtk/General/Style.chs
+++ b/Graphics/UI/Gtk/General/Style.chs
@@ -35,7 +35,7 @@
 --
 module Graphics.UI.Gtk.General.Style (
 -- * Description
--- 
+--
 -- | Styles are attached to widgets and determine how particular parts are
 -- drawn and with what color. Thus they are should be seen as mandatory when
 -- one implements a new custom widgets via 'DrawingArea'. Although the
@@ -70,11 +70,15 @@
 
 {# context prefix ="gtk" #}
 
+#if GTK_MAJOR_VERSION < 3
 import System.Glib.FFI
-
-{#import Graphics.UI.Gtk.Types#}
 {#import Graphics.Rendering.Pango.Types#}
 import Graphics.Rendering.Pango.BasicTypes
+import Graphics.UI.Gtk.General.Structs		(Rectangle)
+import Graphics.UI.Gtk.General.Enums (StateType, ShadowType)
+#endif
+
+{#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.General.Structs		(styleGetForeground,
 			 styleGetBackground,
 			 styleGetLight,
@@ -82,9 +86,7 @@
 			 styleGetDark,
 			 styleGetText,
 			 styleGetBase,
-			 styleGetAntiAliasing,
-                         Rectangle)
-import Graphics.UI.Gtk.General.Enums (StateType, ShadowType)
+			 styleGetAntiAliasing)
 
 #if GTK_MAJOR_VERSION < 3
 stylePaintFlatBox :: WidgetClass widget
diff --git a/Graphics/UI/Gtk/General/StyleContext.chs b/Graphics/UI/Gtk/General/StyleContext.chs
--- a/Graphics/UI/Gtk/General/StyleContext.chs
+++ b/Graphics/UI/Gtk/General/StyleContext.chs
@@ -72,6 +72,7 @@
 
   ) where
 
+#if GTK_MAJOR_VERSION >= 3
 {# context prefix ="gtk" #}
 
 import Control.Monad (liftM)
@@ -79,11 +80,8 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
-import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain,
-                           propagateGError)
-import System.Glib.GList      (GList, fromGList)
+import System.Glib.GList (fromGList)
 
-#if GTK_MAJOR_VERSION >= 3
 -- | Creates a standalone @StyleContext@, this style context won't be attached
 -- to any widget, so you may want to call @styleContextSetPath@ yourself.
 --
diff --git a/Graphics/UI/Gtk/General/StyleProvider.chs b/Graphics/UI/Gtk/General/StyleProvider.chs
--- a/Graphics/UI/Gtk/General/StyleProvider.chs
+++ b/Graphics/UI/Gtk/General/StyleProvider.chs
@@ -43,15 +43,9 @@
 
   ) where
 
+#if GTK_MAJOR_VERSION >= 3
 {# context prefix ="gtk" #}
 
-import Control.Monad (liftM)
-
-import System.Glib.FFI
-import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
-import System.Glib.GError (GError(..), GErrorClass(..), GErrorDomain,
-                           propagateGError)
 
-#if GTK_MAJOR_VERSION >= 3
 #endif
diff --git a/Graphics/UI/Gtk/Layout/Alignment.chs b/Graphics/UI/Gtk/Layout/Alignment.chs
--- a/Graphics/UI/Gtk/Layout/Alignment.chs
+++ b/Graphics/UI/Gtk/Layout/Alignment.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.Alignment (
 -- * Detail
--- 
+--
 -- | The 'Alignment' widget controls the alignment and size of its child
 -- widget. It has four settings: xscale, yscale, xalign, and yalign.
 --
@@ -96,7 +96,7 @@
 
 -- | Creates a new 'Alignment'.
 --
-alignmentNew :: 
+alignmentNew ::
     Float        -- ^ @xalign@ - the horizontal alignment of the child widget,
                  -- from 0 (left) to 1 (right).
  -> Float        -- ^ @yalign@ - the vertical alignment of the child widget,
diff --git a/Graphics/UI/Gtk/Layout/AspectFrame.chs b/Graphics/UI/Gtk/Layout/AspectFrame.chs
--- a/Graphics/UI/Gtk/Layout/AspectFrame.chs
+++ b/Graphics/UI/Gtk/Layout/AspectFrame.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.AspectFrame (
 -- * Detail
--- 
+--
 -- | The 'AspectFrame' is useful when you want pack a widget so that it can
 -- resize but always retains the same aspect ratio. For instance, one might be
 -- drawing a small preview of a larger image. 'AspectFrame' derives from
@@ -83,7 +83,7 @@
 --
 -- The frame may be augmented with a label which can be set by @frameSetLabel@.
 --
-aspectFrameNew :: 
+aspectFrameNew ::
     Float          -- ^ @xalign@ - Horizontal alignment of the child within
                    -- the allocation of the 'AspectFrame'. This ranges from 0.0
                    -- (left aligned) to 1.0 (right aligned)
diff --git a/Graphics/UI/Gtk/Layout/Fixed.chs b/Graphics/UI/Gtk/Layout/Fixed.chs
--- a/Graphics/UI/Gtk/Layout/Fixed.chs
+++ b/Graphics/UI/Gtk/Layout/Fixed.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.Fixed (
 -- * Detail
--- 
+--
 -- | The 'Fixed' widget is a container which can place child widgets at fixed
 -- positions and with fixed sizes, given in pixels. 'Fixed' performs no
 -- automatic layout management.
diff --git a/Graphics/UI/Gtk/Layout/HBox.chs b/Graphics/UI/Gtk/Layout/HBox.chs
--- a/Graphics/UI/Gtk/Layout/HBox.chs
+++ b/Graphics/UI/Gtk/Layout/HBox.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.HBox (
 -- * Detail
--- 
+--
 -- | 'HBox' is a container that organizes child widgets into a single row.
 --
 -- Use the 'Box' packing interface to determine the arrangement, spacing,
@@ -72,7 +72,7 @@
 
 -- | Creates a new 'HBox'.
 --
-hBoxNew :: 
+hBoxNew ::
     Bool    -- ^ @homogeneous@ - @True@ if all children are to be given equal
             -- space allotments.
  -> Int     -- ^ @spacing@ - the number of pixels to place by default between
diff --git a/Graphics/UI/Gtk/Layout/HButtonBox.chs b/Graphics/UI/Gtk/Layout/HButtonBox.chs
--- a/Graphics/UI/Gtk/Layout/HButtonBox.chs
+++ b/Graphics/UI/Gtk/Layout/HButtonBox.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.HButtonBox (
 -- * Detail
--- 
+--
 -- | A button box should be used to provide a consistent layout of buttons
 -- throughout your application. The layout\/spacing can be altered by the
 -- programmer, or if desired, by the user to alter the \'feel\' of a program to
diff --git a/Graphics/UI/Gtk/Layout/HPaned.chs b/Graphics/UI/Gtk/Layout/HPaned.chs
--- a/Graphics/UI/Gtk/Layout/HPaned.chs
+++ b/Graphics/UI/Gtk/Layout/HPaned.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.HPaned (
 -- * Detail
--- 
+--
 -- | The HPaned widget is a container widget with two children arranged
 -- horizontally. The division between the two panes is adjustable by the user
 -- by dragging a handle. See 'Paned' for details.
diff --git a/Graphics/UI/Gtk/Layout/Layout.chs b/Graphics/UI/Gtk/Layout/Layout.chs
--- a/Graphics/UI/Gtk/Layout/Layout.chs
+++ b/Graphics/UI/Gtk/Layout/Layout.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.Layout (
 -- * Detail
--- 
+--
 -- | 'Layout' is similar to 'DrawingArea' in that it's a \"blank slate\" and
 -- doesn't do anything but paint a blank background by default. It's different
 -- in that it supports scrolling natively (you can add it to a
@@ -100,7 +100,7 @@
 -- the layout to use for scrolling, pass @Nothing@ for @hadjustment@ and
 -- @vadjustment@.
 --
-layoutNew :: 
+layoutNew ::
     Maybe Adjustment -- ^ @hadjustment@ - horizontal scroll adjustment, or
                      -- @Nothing@
  -> Maybe Adjustment -- ^ @vadjustment@ - vertical scroll adjustment, or
diff --git a/Graphics/UI/Gtk/Layout/Notebook.chs b/Graphics/UI/Gtk/Layout/Notebook.chs
--- a/Graphics/UI/Gtk/Layout/Notebook.chs
+++ b/Graphics/UI/Gtk/Layout/Notebook.chs
@@ -189,7 +189,6 @@
   ) where
 
 import Control.Monad	(liftM)
-import Data.Maybe	(maybe)
 
 import System.Glib.FFI
 import System.Glib.UTFString
@@ -201,12 +200,13 @@
 import Graphics.UI.Gtk.Abstract.ContainerChildProperties
 import Graphics.UI.Gtk.Display.Label	(labelNew)
 import Graphics.UI.Gtk.General.Enums	(Packing(..), toPacking, fromPacking,
-                                         PackType(..), PositionType(..), DirectionType(..))
+                                         PackType(..), PositionType(..))
 
 {# context lib="gtk" prefix="gtk" #}
 
 #if GTK_MAJOR_VERSION < 3
 {#pointer *GtkNotebookPage as NotebookPage foreign newtype #}
+_ignoreNotebookPage = NotebookPage
 #endif
 
 --------------------
diff --git a/Graphics/UI/Gtk/Layout/Overlay.chs b/Graphics/UI/Gtk/Layout/Overlay.chs
--- a/Graphics/UI/Gtk/Layout/Overlay.chs
+++ b/Graphics/UI/Gtk/Layout/Overlay.chs
@@ -28,7 +28,7 @@
 --
 module Graphics.UI.Gtk.Layout.Overlay (
 -- * Detail
--- 
+--
 -- | The Overlay widget is a Bin widget where widgets can be added as overlay of the bin widget.
 
 -- * Class Hierarchy
diff --git a/Graphics/UI/Gtk/Layout/Table.chs b/Graphics/UI/Gtk/Layout/Table.chs
--- a/Graphics/UI/Gtk/Layout/Table.chs
+++ b/Graphics/UI/Gtk/Layout/Table.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.Table (
 -- * Detail
--- 
+--
 -- | The 'Table' functions allow the programmer to arrange widgets in rows and
 -- columns, making it easy to align many widgets next to each other,
 -- horizontally and vertically.
@@ -124,7 +124,7 @@
 -- can be changed later with 'tableResize'. @rows@ and @columns@ must both be
 -- in the range 0 .. 65535.
 --
-tableNew :: 
+tableNew ::
     Int      -- ^ @rows@ - The number of rows the new table should have.
  -> Int      -- ^ @columns@ - The number of columns the new table should have.
  -> Bool     -- ^ @homogeneous@ - If set to @True@, all table cells are
@@ -349,7 +349,7 @@
   rows <- peek rowsPtr
   columns <- peek columnsPtr
   return (fromIntegral rows, fromIntegral columns)
-  
+
 #endif
 
 --------------------
diff --git a/Graphics/UI/Gtk/Layout/VBox.chs b/Graphics/UI/Gtk/Layout/VBox.chs
--- a/Graphics/UI/Gtk/Layout/VBox.chs
+++ b/Graphics/UI/Gtk/Layout/VBox.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.VBox (
 -- * Detail
--- 
+--
 -- | 'VBox' is a container that organizes child widgets into a single column.
 --
 -- Use the 'Box' packing interface to determine the arrangement, spacing,
@@ -72,7 +72,7 @@
 
 -- | Creates a new 'VBox'.
 --
-vBoxNew :: 
+vBoxNew ::
     Bool    -- ^ @homogeneous@ - @True@ if all children are to be given equal
             -- space allotments.
  -> Int     -- ^ @spacing@ - the number of pixels to place by default between
diff --git a/Graphics/UI/Gtk/Layout/VButtonBox.chs b/Graphics/UI/Gtk/Layout/VButtonBox.chs
--- a/Graphics/UI/Gtk/Layout/VButtonBox.chs
+++ b/Graphics/UI/Gtk/Layout/VButtonBox.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.VButtonBox (
 -- * Detail
--- 
+--
 -- | A button box should be used to provide a consistent layout of buttons
 -- throughout your application. The layout\/spacing can be altered by the
 -- programmer, or if desired, by the user to alter the \'feel\' of a program to
diff --git a/Graphics/UI/Gtk/Layout/VPaned.chs b/Graphics/UI/Gtk/Layout/VPaned.chs
--- a/Graphics/UI/Gtk/Layout/VPaned.chs
+++ b/Graphics/UI/Gtk/Layout/VPaned.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Layout.VPaned (
 -- * Detail
--- 
+--
 -- | The VPaned widget is a container widget with two children arranged
 -- vertically. The division between the two panes is adjustable by the user by
 -- dragging a handle. See 'Paned' for details.
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs b/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs
@@ -169,13 +169,8 @@
 import System.Glib.Attributes
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)
-import System.Glib.GObject              (makeNewGObject,
-                                         destroyFunPtr,
-                                         Quark, objectSetAttribute, objectGetAttributeUnsafe )
 {#import Graphics.UI.Gtk.Types#} hiding (ListStore)
-{#import Graphics.UI.Gtk.ModelView.Types#} (TypedTreeModelClass,
-                                            TreeIter,
-                                            receiveTreeIter,
+{#import Graphics.UI.Gtk.ModelView.Types#} (receiveTreeIter,
                                             comboQuark)
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.ModelView.CustomStore#}
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs b/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/Menu.chs
@@ -122,7 +122,6 @@
 import System.Glib.GList
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(makeNewGObject)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.Abstract.ContainerChildProperties
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs b/Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/MenuBar.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.MenuComboToolbar.MenuBar (
 -- * Detail
--- 
+--
 -- | The 'MenuBar' is a subclass of 'MenuShell' which contains one to many
 -- 'MenuItem'. The result is a standard menu bar which can hold many menu
 -- items.
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs b/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/MenuShell.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.MenuComboToolbar.MenuShell (
 -- * Detail
--- 
+--
 -- | A 'MenuShell' is the abstract base class used to derive the 'Menu' and
 -- 'MenuBar' subclasses.
 --
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs b/Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/MenuToolButton.chs
@@ -91,7 +91,6 @@
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 import Graphics.UI.Gtk.General.StockItems
-import Graphics.Rendering.Pango.Markup
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/RadioToolButton.chs b/Graphics/UI/Gtk/MenuComboToolbar/RadioToolButton.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/RadioToolButton.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/RadioToolButton.chs
@@ -29,7 +29,7 @@
 --
 module Graphics.UI.Gtk.MenuComboToolbar.RadioToolButton (
 -- * Detail
--- 
+--
 -- | A 'RadioToolButton' is a 'ToolItem' that contains a radio button, that
 -- is, a button that is part of a group of toggle buttons where only one button
 -- can be active at a time.
@@ -105,7 +105,7 @@
 -- 'RadioToolButton' will contain an icon and label from the stock item
 -- indicated by @stockId@.
 --
-radioToolButtonNewFromStock :: 
+radioToolButtonNewFromStock ::
     StockId            -- ^ @stockId@ - the name of a stock item
  -> IO RadioToolButton
 radioToolButtonNewFromStock stockId =
@@ -116,10 +116,10 @@
     nullPtr
     stockIdPtr
 
--- | Creates a new 'RadioToolButton' adding it to the same group as 
+-- | Creates a new 'RadioToolButton' adding it to the same group as
 -- the group to which @groupMember@ belongs.
 --
-radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember => 
+radioToolButtonNewFromWidget :: RadioToolButtonClass groupMember =>
     groupMember        -- ^ @groupMember@ - a member of an existing radio group,
                        -- to which the new radio tool button will be added.
  -> IO RadioToolButton
@@ -133,7 +133,7 @@
 -- to which @groupMember@ belongs. The new 'RadioToolButton' will contain an
 -- icon and label from the stock item indicated by @stockId@.
 --
-radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember => 
+radioToolButtonNewWithStockFromWidget :: RadioToolButtonClass groupMember =>
     groupMember        -- ^ @groupMember@ - a member of an existing radio group,
                        -- to which the new radio tool button will be added.
  -> StockId            -- ^ @stockId@ - the name of a stock item
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/SeparatorMenuItem.chs b/Graphics/UI/Gtk/MenuComboToolbar/SeparatorMenuItem.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/SeparatorMenuItem.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/SeparatorMenuItem.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.MenuComboToolbar.SeparatorMenuItem (
 -- * Detail
--- 
+--
 -- | The 'SeparatorMenuItem' is a separator used to group items within a menu.
 -- It displays a horizontal line with a shadow to make it appear sunken into
 -- the interface.
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs b/Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/SeparatorToolItem.chs
@@ -29,7 +29,7 @@
 --
 module Graphics.UI.Gtk.MenuComboToolbar.SeparatorToolItem (
 -- * Detail
--- 
+--
 -- | A 'SeparatorToolItem' is a 'ToolItem' that separates groups of other
 -- 'ToolItem's. Depending on the theme, a 'SeparatorToolItem' will often look
 -- like a vertical line on horizontally docked toolbars.
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs b/Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/TearoffMenuItem.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.MenuComboToolbar.TearoffMenuItem (
 -- * Detail
--- 
+--
 -- | A 'TearoffMenuItem' is a special 'MenuItem' which is used to tear off and
 -- reattach its menu.
 --
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/ToggleToolButton.chs b/Graphics/UI/Gtk/MenuComboToolbar/ToggleToolButton.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/ToggleToolButton.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/ToggleToolButton.chs
@@ -29,7 +29,7 @@
 --
 module Graphics.UI.Gtk.MenuComboToolbar.ToggleToolButton (
 -- * Detail
--- 
+--
 -- | A 'ToggleToolButton' is a 'ToolItem' that contains a toggle button.
 --
 -- Use 'toggleToolButtonNew' to create a new 'ToggleToolButton'. Use
@@ -105,7 +105,7 @@
 --
 -- It is an error if @stockId@ is not a name of a stock item.
 --
-toggleToolButtonNewFromStock :: 
+toggleToolButtonNewFromStock ::
     StockId             -- ^ @stockId@ - the name of the stock item
  -> IO ToggleToolButton
 toggleToolButtonNewFromStock stockId =
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs b/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/ToolItemGroup.chs
@@ -82,13 +82,11 @@
 import System.Glib.FFI
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GList
 import System.Glib.UTFString
 import Graphics.Rendering.Pango.Enums   (EllipsizeMode (..))
 import Graphics.UI.Gtk.General.Enums	(ReliefStyle(..))
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
-{#import Graphics.UI.Gtk.Signals#}
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs b/Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs
@@ -23,7 +23,7 @@
 -- Stability   : provisional
 -- Portability : portable (depends on GHC)
 --
--- A tool palette with categories                                                                             
+-- A tool palette with categories
 --
 -- * Module available since Gtk+ version 2.20
 --
@@ -41,9 +41,9 @@
 -- * Detail
 -- | A 'ToolPalette' allows you to add 'ToolItems' to a palette-like container with different
 -- categories and drag and drop support.
--- 
+--
 -- A 'ToolPalette' is created with a call to 'toolPaletteNew'.
--- 
+--
 -- 'ToolItems' cannot be added directly to a 'ToolPalette' - instead they are added to a
 -- 'ToolItemGroup' which can than be added to a 'ToolPalette'. To add a 'ToolItemGroup' to a
 -- 'ToolPalette', use 'containerAdd'.
@@ -64,7 +64,7 @@
 -- @
 
 #if GTK_CHECK_VERSION(2,20,0)
--- * Types  
+-- * Types
   ToolPalette,
   ToolPaletteClass,
   castToToolPalette,
@@ -92,8 +92,8 @@
 -- * Child Attributes
   toolPaletteChildExclusive,
   toolPaletteChildExpand,
-    
--- * Signals    
+
+-- * Signals
   toolPaletteSetScrollAdjustments,
 #endif
 ) where
@@ -103,8 +103,6 @@
 import System.Glib.FFI
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GList
-import System.Glib.UTFString
 import Graphics.UI.Gtk.General.Structs (IconSize (..))
 import Graphics.UI.Gtk.General.Enums (ToolbarStyle (..))
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
@@ -120,7 +118,7 @@
 
 -- | Creates a new tool palette.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteNew :: IO ToolPalette
 toolPaletteNew =
@@ -131,7 +129,7 @@
 -- | Unsets the tool palette icon size set with 'toolPaletteSetIconSize', so that user
 -- preferences will be used to determine the icon size.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteUnsetIconSize :: ToolPaletteClass self => self -> IO ()
 toolPaletteUnsetIconSize palette =
@@ -141,7 +139,7 @@
 -- | Unsets a toolbar style set with 'toolPaletteSetStyle', so that user preferences will be used
 -- to determine the toolbar style.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteUnsetStyle :: ToolPaletteClass self => self -> IO ()
 toolPaletteUnsetStyle palette =
@@ -150,7 +148,7 @@
 
 -- | Gets the horizontal adjustment of the tool palette.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteGetHAdjustment :: ToolPaletteClass self => self
                           -> IO Adjustment
@@ -161,7 +159,7 @@
 
 -- | Gets the vertical adjustment of the tool palette.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteGetVAdjustment :: ToolPaletteClass self => self
                           -> IO Adjustment
@@ -172,12 +170,12 @@
 
 -- | Gets the position of group in palette as index. See 'toolPaletteSetGroupPosition'.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
-toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) 
+toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group)
                               => palette
                               -> group
-                              -> IO Int -- ^ returns the index of group or -1 if group is not a child of palette 
+                              -> IO Int -- ^ returns the index of group or -1 if group is not a child of palette
 toolPaletteGetGroupPosition palette group =
   liftM fromIntegral $
   {#call gtk_tool_palette_get_group_position #}
@@ -187,9 +185,9 @@
 -- | Sets the position of the group as an index of the tool palette. If position is 0 the group will
 -- become the first child, if position is -1 it will become the last child.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
-toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) 
+toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group)
                               => palette
                               -> group
                               -> Int
@@ -202,13 +200,13 @@
 
 -- | The size of the icons in a tool palette is normally determined by the 'toolbarIconSize'
 -- setting. When this property is set, it overrides the setting.
--- 
+--
 -- This should only be used for special-purpose tool palettes, normal application tool palettes should
 -- respect the user preferences for the size of icons.
--- 
+--
 -- Default value: 'IconSizeSmallToolbar'
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteIconSize :: ToolPaletteClass self => Attr self IconSize
 toolPaletteIconSize =
@@ -216,20 +214,20 @@
         {# call pure unsafe gtk_icon_size_get_type #}
 
 -- | Is 'True' if the 'iconSize' property has been set.
--- 
+--
 -- Default value: 'False'
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteIconSizeSet :: ToolPaletteClass self => Attr self Bool
 toolPaletteIconSizeSet =
   newAttrFromBoolProperty "icon-size-set"
 
 -- | The style of items in the tool palette.
--- 
+--
 -- Default value: 'ToolbarIcons'
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteToolbarStyle :: ToolPaletteClass self => Attr self ToolbarStyle
 toolPaletteToolbarStyle =
@@ -237,20 +235,20 @@
     {# call pure unsafe gtk_toolbar_style_get_type #}
 
 -- | Whether the item group should be the only one that is expanded at a given time.
--- 
+--
 -- Default value: 'False'
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteChildExclusive :: ToolPaletteClass self => Attr self Bool
 toolPaletteChildExclusive =
   newAttrFromBoolProperty "exclusive"
 
 -- | Whether the item group should receive extra space when the palette grows. at a given time.
--- 
+--
 -- Default value: 'False'
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteChildExpand :: ToolPaletteClass self => Attr self Bool
 toolPaletteChildExpand =
@@ -260,7 +258,7 @@
 -- emit this signal to connect two instances of 'Scrollbar' to the scroll directions of the
 -- 'Toolpalette'.
 --
--- * Available since Gtk+ version 2.20    
+-- * Available since Gtk+ version 2.20
 --
 toolPaletteSetScrollAdjustments :: ToolPaletteClass self => Signal self (Adjustment -> Adjustment -> IO ())
 toolPaletteSetScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments")
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs b/Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/Toolbar.chs
@@ -162,10 +162,16 @@
   ) where
 
 import Control.Monad	(liftM)
+#if GTK_MAJOR_VERSION < 3
+#ifndef DISABLE_DEPRECATED
 import Data.Maybe	(fromJust)
 import qualified Data.Text as T (filter)
-import System.Glib.FFI
+import Graphics.UI.Gtk.General.StockItems
+import Graphics.UI.Gtk.Display.Image	(imageNewFromStock)
 import System.Glib.UTFString
+#endif
+#endif
+import System.Glib.FFI
 import System.Glib.Attributes
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
@@ -174,7 +180,6 @@
 import Graphics.UI.Gtk.Abstract.ContainerChildProperties
 import Graphics.UI.Gtk.General.Enums	(Orientation(..), ToolbarStyle(..),
 					 ReliefStyle(..))
-import Graphics.UI.Gtk.General.StockItems
 import Graphics.UI.Gtk.General.Structs	(
 #if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
@@ -183,8 +188,6 @@
 #endif
 #endif
 					 IconSize(..))
-import Graphics.UI.Gtk.General.StockItems	(stockLookupItem, siLabel, stockMissingImage)
-import Graphics.UI.Gtk.Display.Image	(imageNewFromStock)
 
 {# context lib="gtk" prefix="gtk" #}
 
@@ -199,6 +202,10 @@
   liftM (castPtr :: Ptr Widget -> Ptr Toolbar) $
   {# call unsafe toolbar_new #}
 
+--------------------
+-- Methods
+#if GTK_MAJOR_VERSION < 3
+#ifndef DISABLE_DEPRECATED
 -- Make tooltips or not?
 --
 mkToolText :: GlibString string => Maybe (string,string) -> (CString -> CString -> IO a) -> IO a
@@ -206,10 +213,6 @@
 mkToolText (Just (text,private)) fun = withUTFString text $ \txtPtr ->
   withUTFString private $ \prvPtr -> fun txtPtr prvPtr
 
---------------------
--- Methods
-#if GTK_MAJOR_VERSION < 3
-#ifndef DISABLE_DEPRECATED
 -- | Insert a new 'Button' into the 'Toolbar'.
 --
 -- The new 'Button' is created at position @pos@, counting from 0.
diff --git a/Graphics/UI/Gtk/Misc/Accessible.chs b/Graphics/UI/Gtk/Misc/Accessible.chs
--- a/Graphics/UI/Gtk/Misc/Accessible.chs
+++ b/Graphics/UI/Gtk/Misc/Accessible.chs
@@ -29,7 +29,7 @@
 -- * Detail
 --
 -- | Accessible accessibility support for widgets.
---  
+--
 
 -- * Class Hierarchy
 -- |
@@ -52,18 +52,14 @@
 #endif
 ) where
 
-import Control.Monad	(liftM)
+#if GTK_CHECK_VERSION(2,22,0)
 
 import System.Glib.FFI
-import System.Glib.Attributes
-import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
-{#import Graphics.UI.Gtk.Signals#}
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if GTK_CHECK_VERSION(2,22,0)
 --------------------
 -- Methods
 
@@ -82,11 +78,11 @@
 --
 -- * Available since Gtk+ version 2.22
 --
-accessibleSetWidget :: (AccessibleClass self, WidgetClass widget) 
-                      => self -- ^ @accessible@ a 'Accessible' 
-                      -> widget -- ^ @widget@     a 'Widget'     
+accessibleSetWidget :: (AccessibleClass self, WidgetClass widget)
+                      => self -- ^ @accessible@ a 'Accessible'
+                      -> widget -- ^ @widget@     a 'Widget'
                       -> IO ()
-accessibleSetWidget self widget =                       
+accessibleSetWidget self widget =
   {#call accessible_set_widget #}
      (toAccessible self)
      (toWidget widget)
diff --git a/Graphics/UI/Gtk/Misc/Adjustment.chs b/Graphics/UI/Gtk/Misc/Adjustment.chs
--- a/Graphics/UI/Gtk/Misc/Adjustment.chs
+++ b/Graphics/UI/Gtk/Misc/Adjustment.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Misc.Adjustment (
 -- * Detail
--- 
+--
 -- | The 'Adjustment' object represents a value which has an associated lower
 -- and upper bound, together with step and page increments, and a page size. It
 -- is used within several Gtk+ widgets, including 'SpinButton', 'Viewport', and
@@ -116,7 +116,7 @@
 -- @pageSize@ is needed to determine if the end of the slider is still in the
 -- range.
 --
-adjustmentNew :: 
+adjustmentNew ::
     Double        -- ^ @value@ - the initial value.
  -> Double        -- ^ @lower@ - the minimum value.
  -> Double        -- ^ @upper@ - the maximum value.
@@ -199,7 +199,7 @@
     self
 
 -- | Updates the 'Adjustment' @value@ to ensure that the range between @lower@
--- and @upper@ is in the current page (i.e. between @value@ and @value + 
+-- and @upper@ is in the current page (i.e. between @value@ and @value +
 -- pageSize@). If the range is larger than the page size, then only the start
 -- of it will be in the current page. A \"changed\" signal will be emitted if
 -- the value is changed.
diff --git a/Graphics/UI/Gtk/Misc/Arrow.chs b/Graphics/UI/Gtk/Misc/Arrow.chs
--- a/Graphics/UI/Gtk/Misc/Arrow.chs
+++ b/Graphics/UI/Gtk/Misc/Arrow.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Misc.Arrow (
 -- * Detail
--- 
+--
 -- | 'Arrow' should be used to draw simple arrows that need to point in one of
 -- the four cardinal directions (up, down, left, or right). The style of the
 -- arrow can be one of shadow in, shadow out, etched in, or etched out. Note
diff --git a/Graphics/UI/Gtk/Misc/Calendar.chs b/Graphics/UI/Gtk/Misc/Calendar.chs
--- a/Graphics/UI/Gtk/Misc/Calendar.chs
+++ b/Graphics/UI/Gtk/Misc/Calendar.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Misc.Calendar (
 -- * Detail
--- 
+--
 -- | 'Calendar' is a widget that displays a calendar, one month at a time. It
 -- can be created with 'calendarNew'.
 --
@@ -364,9 +364,9 @@
 onDaySelectedDoubleClick, afterDaySelectedDoubleClick :: CalendarClass self => self
  -> IO ()
  -> IO (ConnectId self)
-onDaySelectedDoubleClick = 
+onDaySelectedDoubleClick =
   connect_NONE__NONE "day-selected-double-click" False
-afterDaySelectedDoubleClick = 
+afterDaySelectedDoubleClick =
   connect_NONE__NONE "day-selected-double-click" True
 
 -- | The month changed.
diff --git a/Graphics/UI/Gtk/Misc/DrawingArea.chs b/Graphics/UI/Gtk/Misc/DrawingArea.chs
--- a/Graphics/UI/Gtk/Misc/DrawingArea.chs
+++ b/Graphics/UI/Gtk/Misc/DrawingArea.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Misc.DrawingArea (
 -- * Detail
--- 
+--
 -- | The 'DrawingArea' widget is used for creating custom user interface
 -- elements. It's essentially a blank widget; you can draw on
 -- the 'Drawable' returned by 'drawingAreaGetDrawWindow'.
@@ -94,8 +94,6 @@
 #if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.General.Structs	(widgetGetDrawWindow, widgetGetSize)
 #endif
--- to make haddock happy:
-import Graphics.UI.Gtk.Abstract.Widget
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/Misc/EventBox.chs b/Graphics/UI/Gtk/Misc/EventBox.chs
--- a/Graphics/UI/Gtk/Misc/EventBox.chs
+++ b/Graphics/UI/Gtk/Misc/EventBox.chs
@@ -28,7 +28,7 @@
 --
 module Graphics.UI.Gtk.Misc.EventBox (
 -- * Detail
--- 
+--
 -- | The 'EventBox' widget is a subclass of 'Bin' which also has its own
 -- window. It is useful since it allows you to catch events for widgets which
 -- do not have their own window.
diff --git a/Graphics/UI/Gtk/Misc/HandleBox.chs b/Graphics/UI/Gtk/Misc/HandleBox.chs
--- a/Graphics/UI/Gtk/Misc/HandleBox.chs
+++ b/Graphics/UI/Gtk/Misc/HandleBox.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Misc.HandleBox (
 -- * Detail
--- 
+--
 -- | The 'HandleBox' widget allows a portion of a window to be \"torn off\".
 -- It is a bin widget which displays its child and a handle that the user can
 -- drag to tear off a separate window (the float window) containing the child
diff --git a/Graphics/UI/Gtk/Misc/IMMulticontext.chs b/Graphics/UI/Gtk/Misc/IMMulticontext.chs
--- a/Graphics/UI/Gtk/Misc/IMMulticontext.chs
+++ b/Graphics/UI/Gtk/Misc/IMMulticontext.chs
@@ -49,8 +49,6 @@
   imMulticontextAppendMenuitems,
   ) where
 
-import Control.Monad	(liftM)
-
 import System.Glib.FFI
 {#import Graphics.UI.Gtk.Types#}
 
diff --git a/Graphics/UI/Gtk/Misc/SizeGroup.chs b/Graphics/UI/Gtk/Misc/SizeGroup.chs
--- a/Graphics/UI/Gtk/Misc/SizeGroup.chs
+++ b/Graphics/UI/Gtk/Misc/SizeGroup.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Misc.SizeGroup (
 -- * Detail
--- 
+--
 -- | 'SizeGroup' provides a mechanism for grouping a number of widgets
 -- together so they all request the same amount of space. This is typically
 -- useful when you want a column of widgets to have the same size, but you
@@ -91,7 +91,6 @@
 
 import System.Glib.FFI
 import System.Glib.Attributes
-import System.Glib.GObject		(wrapNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
@@ -103,7 +102,7 @@
 
 -- | Create a new 'SizeGroup'.
 --
-sizeGroupNew :: 
+sizeGroupNew ::
     SizeGroupMode -- ^ @mode@ - the mode for the new size group.
  -> IO SizeGroup
 sizeGroupNew mode =
diff --git a/Graphics/UI/Gtk/Misc/Tooltip.chs b/Graphics/UI/Gtk/Misc/Tooltip.chs
--- a/Graphics/UI/Gtk/Misc/Tooltip.chs
+++ b/Graphics/UI/Gtk/Misc/Tooltip.chs
@@ -99,14 +99,13 @@
 #endif
   ) where
 
-import Control.Monad	(liftM)
+#if GTK_CHECK_VERSION(2,12,0)
+
 import Data.Maybe (fromMaybe)
 
 import System.Glib.FFI
 import System.Glib.UTFString
-import System.Glib.GObject		(constructNewGObject,makeNewGObject)
 import Graphics.UI.Gtk.General.Structs	(IconSize(..), Rectangle)
-import Graphics.Rendering.Pango.Markup
 {#import Graphics.UI.Gtk.Types#}
 #ifdef HAVE_GIO
 {#import System.GIO.Types#}
@@ -114,7 +113,6 @@
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if GTK_CHECK_VERSION(2,12,0)
 --------------------
 -- Methods
 
diff --git a/Graphics/UI/Gtk/Misc/Viewport.chs b/Graphics/UI/Gtk/Misc/Viewport.chs
--- a/Graphics/UI/Gtk/Misc/Viewport.chs
+++ b/Graphics/UI/Gtk/Misc/Viewport.chs
@@ -96,7 +96,7 @@
 
 -- | Creates a new 'Viewport' with the given adjustments.
 --
-viewportNew :: 
+viewportNew ::
     Adjustment  -- ^ @hadjustment@ - horizontal adjustment.
  -> Adjustment  -- ^ @vadjustment@ - vertical adjustment.
  -> IO Viewport
diff --git a/Graphics/UI/Gtk/ModelView.chs b/Graphics/UI/Gtk/ModelView.chs
--- a/Graphics/UI/Gtk/ModelView.chs
+++ b/Graphics/UI/Gtk/ModelView.chs
@@ -24,7 +24,7 @@
 -- Portability : portable (depends on GHC)
 --
 -- New model-based tree\/list widget system.
--- 
+--
 -- This just re-exports the Graphics.UI.Gtk.ModelView.* modules.
 --
 -- * Note: From this version of Gtk2Hs this system will be the default
diff --git a/Graphics/UI/Gtk/ModelView/CellEditable.chs b/Graphics/UI/Gtk/ModelView/CellEditable.chs
--- a/Graphics/UI/Gtk/ModelView/CellEditable.chs
+++ b/Graphics/UI/Gtk/ModelView/CellEditable.chs
@@ -54,14 +54,13 @@
 -- * Attributes
 #if GTK_CHECK_VERSION(2,20,0)
   cellEditableEditingCanceled,
-#endif  
+#endif
 
 -- * Signals
   cellEditableEditingDone,
   cellEditableRemoveWidget,
   ) where
 
-import Control.Monad	(liftM)
 import Control.Monad.Reader.Class (ask)
 import Control.Monad.Trans (liftIO)
 
@@ -70,15 +69,14 @@
 import System.Glib.Properties
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
-import Graphics.UI.Gtk.Gdk.EventM (EventM, EKey, EAny)
-import Graphics.UI.Gtk.Gdk.Events (Event, EventKey, marshalEvent)
+import Graphics.UI.Gtk.Gdk.EventM (EventM, EAny)
 
 {# context lib="gtk" prefix="gtk" #}
 
 --------------------
 -- Methods
 
--- | Begins editing on a @cellEditable@. @event@ is the 'Event' that began the editing process. 
+-- | Begins editing on a @cellEditable@. @event@ is the 'Event' that began the editing process.
 --
 cellEditableStartEditing :: CellEditableClass self => self -> EventM EAny ()
 cellEditableStartEditing self = do
@@ -105,9 +103,9 @@
 -- Attributes
 #if GTK_CHECK_VERSION(2,20,0)
 -- | Indicates whether editing on the cell has been canceled.
--- 
+--
 -- Default value: 'False'
--- 
+--
 -- * Available since Gtk+ version 2.20
 --
 cellEditableEditingCanceled :: CellEditableClass self => Attr self Bool
diff --git a/Graphics/UI/Gtk/ModelView/CellLayout.chs b/Graphics/UI/Gtk/ModelView/CellLayout.chs
--- a/Graphics/UI/Gtk/ModelView/CellLayout.chs
+++ b/Graphics/UI/Gtk/ModelView/CellLayout.chs
@@ -29,7 +29,7 @@
 --
 module Graphics.UI.Gtk.ModelView.CellLayout (
 -- * Detail
--- 
+--
 -- | 'CellLayout' is an interface which is implemented by all objects which
 -- provide a 'TreeViewColumn' API for packing cells, setting attributes and data funcs.
 
@@ -68,7 +68,6 @@
 import System.Glib.FFI
 import System.Glib.GList
 import System.Glib.Attributes
-import System.Glib.GObject (destroyFunPtr)
 import System.Glib.GType
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
@@ -171,7 +170,7 @@
 cellLayoutAddColumnAttribute :: (CellLayoutClass self, CellRendererClass cell) => self
  -> cell   -- ^ @cell@ - A 'CellRenderer'.
  -> ReadWriteAttr cell a v  -- ^ @attribute@ - An attribute of a renderer.
- -> ColumnId row v    -- ^ @column@ - The virtual column of the model from which to 
+ -> ColumnId row v    -- ^ @column@ - The virtual column of the model from which to
                       -- retrieve the attribute.
  -> IO ()
 cellLayoutAddColumnAttribute self cell attr column =
@@ -208,7 +207,7 @@
  -> model row -- ^ @model@ - A model containing rows of type @row@.
  -> (row -> [AttrOp cell]) -- ^ Function to set attributes on the cell renderer.
  -> IO ()
-cellLayoutSetAttributes self cell model attributes = 
+cellLayoutSetAttributes self cell model attributes =
   cellLayoutSetAttributeFunc self cell model $ \iter -> do
     row <- treeModelGetRow model iter
     set cell (attributes row)
@@ -226,7 +225,7 @@
  -> IO ()
 cellLayoutSetAttributeFunc self cell model func = do
   fPtr <- mkSetAttributeFunc $ \_ cellPtr' modelPtr' iterPtr _ -> do
-    iter <- convertIterFromParentToChildModel iterPtr modelPtr' 
+    iter <- convertIterFromParentToChildModel iterPtr modelPtr'
       (toTreeModel model)
     let (CellRenderer cellPtr) = toCellRenderer cell
     if unsafeForeignPtrToPtr cellPtr  /= cellPtr' then
@@ -286,14 +285,14 @@
 
 foreign import ccall safe "gtk_tree_model_filter_convert_iter_to_child_iter"
   treeModelFilterConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter ->
-    Ptr TreeIter -> IO () 
+    Ptr TreeIter -> IO ()
 
 foreign import ccall unsafe "gtk_tree_model_sort_get_model"
   treeModelSortGetModel :: Ptr TreeModel -> IO (Ptr TreeModel)
-  
+
 foreign import ccall safe "gtk_tree_model_sort_convert_iter_to_child_iter"
   treeModelSortConvertIterToChildIter :: Ptr TreeModel -> Ptr TreeIter ->
-    Ptr TreeIter -> IO () 
+    Ptr TreeIter -> IO ()
 
 -- | Clears all existing attributes previously set with
 -- 'cellLayoutSetAttributes'.
diff --git a/Graphics/UI/Gtk/ModelView/CellRendererCombo.chs b/Graphics/UI/Gtk/ModelView/CellRendererCombo.chs
--- a/Graphics/UI/Gtk/ModelView/CellRendererCombo.chs
+++ b/Graphics/UI/Gtk/ModelView/CellRendererCombo.chs
@@ -76,7 +76,6 @@
 import System.Glib.UTFString
 import System.Glib.Attributes                   (Attr, WriteAttr, writeAttr)
 import System.Glib.Properties
-import System.Glib.GObject                      (constructNewGObject)
 import Graphics.UI.Gtk.Abstract.Object          (makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
diff --git a/Graphics/UI/Gtk/ModelView/CellRendererSpin.chs b/Graphics/UI/Gtk/ModelView/CellRendererSpin.chs
--- a/Graphics/UI/Gtk/ModelView/CellRendererSpin.chs
+++ b/Graphics/UI/Gtk/ModelView/CellRendererSpin.chs
@@ -99,7 +99,7 @@
 --------------------
 -- Attributes
 
--- | The adjustment that holds the value of the spinbutton. 
+-- | The adjustment that holds the value of the spinbutton.
 --
 -- * Available since Gtk+ version 2.10
 --
@@ -108,9 +108,9 @@
                                {# call pure unsafe gtk_adjustment_get_type #}
 
 -- | The acceleration rate when you hold down a button.
--- 
+--
 -- Allowed values: >= 0
--- 
+--
 -- Default value: 0
 --
 -- * Available since Gtk+ version 2.10
@@ -119,9 +119,9 @@
 cellRendererSpinClimbRate = newAttrFromDoubleProperty "climb-rate"
 
 -- | The number of decimal places to display.
--- 
+--
 -- Allowed values: <= 20
--- 
+--
 -- Default value: 0
 --
 -- * Available since Gtk+ version 2.10
diff --git a/Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs b/Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs
--- a/Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs
+++ b/Graphics/UI/Gtk/ModelView/CellRendererSpinner.chs
@@ -23,7 +23,7 @@
 -- Stability   : provisional
 -- Portability : portable (depends on GHC)
 --
--- Renders a spinning animation in a cell                                                             
+-- Renders a spinning animation in a cell
 --
 -- * Module available since Gtk+ version 2.20
 --
@@ -32,7 +32,7 @@
 -- | 'CellRendererSpinner' renders a spinning animation in a cell, very similar to 'Spinner'. It can
 -- often be used as an alternative to a 'CellRendererProgress' for displaying indefinite activity,
 -- instead of actual progress.
--- 
+--
 -- To start the animation in a cell, set the "active" property to 'True' and increment the "pulse"
 -- property at regular intervals.  The usual way to set the cell renderer properties for each cell is
 -- to bind them to columns in your tree model using e.g.  'treeViewColumnAddAttribute'.
@@ -46,9 +46,9 @@
 -- |         +----'CellRenderer'
 -- |               +----'CellRendererSpinner'
 -- @
-  
+
 #if GTK_CHECK_VERSION(2,20,0)
--- * Types  
+-- * Types
   CellRendererSpinner,
   CellRendererSpinnerClass,
   castToCellRendererSpinner,
@@ -86,7 +86,7 @@
   {#call gtk_cell_renderer_spinner_new #}
 
 -- | Whether the spinner is active (ie. shown) in the cell.
--- 
+--
 -- Default value: 'False'
 --
 -- * Available since Gtk+ version 2.20
@@ -97,11 +97,11 @@
 
 -- | Pulse of the spinner. Increment this value to draw the next frame of the spinner animation. Usually,
 -- you would update this value in a timeout.
--- 
+--
 -- The 'Spinner' widget draws one full cycle of the animation per second by default. You can learn
 -- about the number of frames used by the theme by looking at the 'numSteps' style property and the
 -- duration of the cycle by looking at 'cycleDuration'.
--- 
+--
 -- Default value: 0
 --
 -- * Available since Gtk+ version 2.20
@@ -111,7 +111,7 @@
     newAttrFromIntProperty "pulse"
 
 -- | The 'IconSize' value that specifies the size of the rendered spinner.
--- 
+--
 -- Default value: 'IconSizeMenu'
 --
 -- * Available since Gtk+ version 2.20
diff --git a/Graphics/UI/Gtk/ModelView/CellRendererText.chs b/Graphics/UI/Gtk/ModelView/CellRendererText.chs
--- a/Graphics/UI/Gtk/ModelView/CellRendererText.chs
+++ b/Graphics/UI/Gtk/ModelView/CellRendererText.chs
@@ -128,7 +128,7 @@
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
-import Graphics.UI.Gtk.General.Structs		(Color(..))
+import Graphics.UI.Gtk.General.Structs		()
 import Graphics.Rendering.Pango.Enums
 {#import Graphics.Rendering.Pango.BasicTypes#} ( FontDescription(..),
 					 makeNewFontDescription )
diff --git a/Graphics/UI/Gtk/ModelView/CellView.chs b/Graphics/UI/Gtk/ModelView/CellView.chs
--- a/Graphics/UI/Gtk/ModelView/CellView.chs
+++ b/Graphics/UI/Gtk/ModelView/CellView.chs
@@ -74,7 +74,9 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties			(writeAttrFromStringProperty)
+#if GTK_MAJOR_VERSION < 3
 {#import System.Glib.GList#}
+#endif
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)
 {#import Graphics.UI.Gtk.ModelView.Types#}
diff --git a/Graphics/UI/Gtk/ModelView/CustomStore.chs b/Graphics/UI/Gtk/ModelView/CustomStore.chs
--- a/Graphics/UI/Gtk/ModelView/CustomStore.chs
+++ b/Graphics/UI/Gtk/ModelView/CustomStore.chs
@@ -33,7 +33,7 @@
 -- 'customStoreGetRow' functions.
 --
 module Graphics.UI.Gtk.ModelView.CustomStore (
-  -- * The definition of a row-based store.  
+  -- * The definition of a row-based store.
   CustomStore,
   TreeModelFlags(..),
   TreeModelIface(..),
@@ -50,22 +50,18 @@
   treeModelSetColumn,
   ) where
 
-import Control.Monad	                        (liftM, when)
+import Control.Monad	                        (liftM)
 import Control.Monad.Reader                     (runReaderT)
 import Data.IORef                               (IORef, newIORef, readIORef, writeIORef)
 import Data.Maybe                               (fromMaybe)
 import System.Glib.FFI			hiding	(maybeNull)
 import System.Glib.Flags			(Flags, fromFlags)
-{#import System.Glib.GObject#}			(GObjectClass(..), GObject(..), unGObject,
-                                                 makeNewGObject, objectUnref)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
 import Graphics.UI.Gtk.General.DNDTypes         (SelectionDataM, SelectionData)
 
-import System.Glib.StoreValue			(TMType(..), GenericValue(..), valueSetGenericValue)
-{#import System.Glib.GValue#}			(GValue(GValue), allocaGValue)
+{#import System.Glib.GValue#}			(GValue(GValue))
 {#import System.Glib.GType#}			(GType)
-import System.Glib.GValueTypes                  (valueSetString)
 import qualified System.Glib.GTypeConstants as GConst
 {#import System.Glib.GValueTypes#}
 {#import System.Glib.GValue#}			(valueInit)
@@ -212,7 +208,7 @@
     --   its information be used to insert a new row at the given path.
     treeDragDestDragDataReceived:: model row -> TreePath -> SelectionDataM Bool      -- insert row from selection object
   }
-  
+
 -- | Create a new store that implements the 'TreeModelIface' interface and
 -- optionally the 'DragSourceIface' and the 'DragDestIface'. If the latter two
 -- are set to @Nothing@ a dummy interface is substituted that rejects every
@@ -250,7 +246,7 @@
 -- | Extract a row of the given model at the given 'TreeIter'.
 --
 customStoreGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row
-customStoreGetRow model iter = 
+customStoreGetRow model iter =
   case toTypedTreeModel model of
     TypedTreeModel model -> do
       impl <- withForeignPtr model gtk2hs_store_get_impl >>= deRefStablePtr
@@ -377,7 +373,7 @@
       (CAPixbuf ca) -> valueInit gVal {#call fun unsafe gdk_pixbuf_get_type#} >>
 			valueSetGObject gVal (ca row)
       CAInvalid -> valueInit gVal GConst.int >> valueSetInt gVal 0
-      
+
 foreign export ccall "gtk2hs_store_get_value_impl"
   treeModelIfaceGetValue_static :: StablePtr (CustomStoreImplementation model row) -> Ptr TreeIter -> CInt -> Ptr GValue -> IO ()
 
@@ -531,7 +527,3 @@
 maybeNull marshal ptr
   | ptr == nullPtr = return Nothing
   | otherwise      = liftM Just (marshal ptr)
-
-iterSetStamp :: CInt -> TreeIter -> TreeIter
-iterSetStamp t (TreeIter _ a b c) = (TreeIter t a b c)
-
diff --git a/Graphics/UI/Gtk/ModelView/IconView.chs b/Graphics/UI/Gtk/ModelView/IconView.chs
--- a/Graphics/UI/Gtk/ModelView/IconView.chs
+++ b/Graphics/UI/Gtk/ModelView/IconView.chs
@@ -150,7 +150,6 @@
 import System.Glib.Properties
 import System.Glib.GList                        (fromGList)
 import System.Glib.Flags
-import System.Glib.GObject                      (makeNewGObject, constructNewGObject)
 import Graphics.UI.Gtk.Abstract.Object          (makeNewObject)
 import Graphics.UI.Gtk.Gdk.Enums                (DragAction(..))
 import Graphics.UI.Gtk.Gdk.Events               (Modifier(..))
@@ -158,7 +157,6 @@
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.General.Enums#}        (Orientation, SelectionMode)
 {#import Graphics.UI.Gtk.ModelView.TreeModel#}
-{#import Graphics.UI.Gtk.ModelView.CustomStore#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
 {#import Graphics.UI.Gtk.General.DNDTypes#}     (TargetList(..))
 
diff --git a/Graphics/UI/Gtk/ModelView/ListStore.hs b/Graphics/UI/Gtk/ModelView/ListStore.hs
--- a/Graphics/UI/Gtk/ModelView/ListStore.hs
+++ b/Graphics/UI/Gtk/ModelView/ListStore.hs
@@ -65,8 +65,8 @@
 import Graphics.UI.Gtk.ModelView.Sequence (Seq)
 #endif
 
-import Graphics.UI.Gtk.Types (GObjectClass(..), TreeModelClass)
-import Graphics.UI.Gtk.ModelView.Types (TypedTreeModelClass, TreeIter(..))
+import Graphics.UI.Gtk.Types (GObjectClass(..))
+-- import Graphics.UI.Gtk.ModelView.Types ()
 import Graphics.UI.Gtk.ModelView.CustomStore
 import Graphics.UI.Gtk.ModelView.TreeModel
 import Graphics.UI.Gtk.ModelView.TreeDrag
@@ -234,10 +234,10 @@
   stamp <- customStoreGetStamp model
   treeModelRowInserted model [0] (TreeIter stamp 0 0 0)
 
--- | Prepend a list to the store. Not implemented yet.
-listStorePrependList :: ListStore a -> [a] -> IO ()
-listStorePrependList store list =
-  mapM_ (listStoreInsert store 0) (reverse list)
+---- | Prepend a list to the store. Not implemented yet.
+--listStorePrependList :: ListStore a -> [a] -> IO ()
+--listStorePrependList store list =
+--  mapM_ (listStoreInsert store 0) (reverse list)
 
 -- | Append an element to the store. Returns the index of the inserted
 -- element.
@@ -294,21 +294,21 @@
    in do seq <- readIORef (customStoreGetPrivate model)
          loop (Seq.length seq - 1) (Seq.viewr seq)
 
--- | Permute the rows of the store. Not yet implemented.
-listStoreReorder :: ListStore a -> [Int] -> IO ()
-listStoreReorder store = undefined
-
--- | Swap two rows of the store. Not yet implemented.
-listStoreSwap :: ListStore a -> Int -> Int -> IO ()
-listStoreSwap store = undefined
-
--- | Move the element at the first index in front of the element denoted by
--- the second index. Not yet implemented.
-listStoreMoveBefore :: ListStore a -> Int -> Int -> IO ()
-listStoreMoveBefore store = undefined
-
--- | Move the element at the first index past the element denoted by the
--- second index. Not yet implemented.
-listStoreMoveAfter :: ListStore a -> Int -> Int -> IO ()
-listStoreMoveAfter store = undefined
+---- | Permute the rows of the store. Not yet implemented.
+--listStoreReorder :: ListStore a -> [Int] -> IO ()
+--listStoreReorder store = undefined
+--
+---- | Swap two rows of the store. Not yet implemented.
+--listStoreSwap :: ListStore a -> Int -> Int -> IO ()
+--listStoreSwap store = undefined
+--
+---- | Move the element at the first index in front of the element denoted by
+---- the second index. Not yet implemented.
+--listStoreMoveBefore :: ListStore a -> Int -> Int -> IO ()
+--listStoreMoveBefore store = undefined
+--
+---- | Move the element at the first index past the element denoted by the
+---- second index. Not yet implemented.
+--listStoreMoveAfter :: ListStore a -> Int -> Int -> IO ()
+--listStoreMoveAfter store = undefined
 
diff --git a/Graphics/UI/Gtk/ModelView/TreeDrag.chs b/Graphics/UI/Gtk/ModelView/TreeDrag.chs
--- a/Graphics/UI/Gtk/ModelView/TreeDrag.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeDrag.chs
@@ -62,7 +62,7 @@
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.ModelView.Types#}      (TreePath, fromTreePath, withTreePath,
                                                  NativeTreePath(..))
-import Graphics.UI.Gtk.General.DNDTypes         (SelectionDataM, SelectionData,
+import Graphics.UI.Gtk.General.DNDTypes         (SelectionDataM,
                                                  TargetTag, atomNew)
 import Control.Monad                            (liftM)
 import Control.Monad.Trans                      (liftIO)
@@ -114,6 +114,6 @@
 treeSetRowDragData treeModel path = do
   selPtr <- ask
   liftM toBool $ liftIO $ withTreePath path $ \path ->
-    {# call unsafe gtk_tree_set_row_drag_data #} selPtr 
+    {# call unsafe gtk_tree_set_row_drag_data #} selPtr
     (toTreeModel treeModel)
     path
diff --git a/Graphics/UI/Gtk/ModelView/TreeModel.chs b/Graphics/UI/Gtk/ModelView/TreeModel.chs
--- a/Graphics/UI/Gtk/ModelView/TreeModel.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeModel.chs
@@ -162,11 +162,8 @@
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.Types#}
-import System.Glib.StoreValue		(TMType, GenericValue,
-					 valueGetGenericValue)
 {#import System.Glib.GValue#}		(GValue(GValue), allocaGValue)
-{#import Graphics.UI.Gtk.ModelView.CustomStore#} (TreeModelFlags(..),
-                                                  treeModelGetRow)
+{#import Graphics.UI.Gtk.ModelView.CustomStore#} (TreeModelFlags(..))
 {#import Graphics.UI.Gtk.ModelView.Types#}  (TypedTreeModel,
                                              TypedTreeModelClass,
                                              toTypedTreeModel,
diff --git a/Graphics/UI/Gtk/ModelView/TreeModelFilter.chs b/Graphics/UI/Gtk/ModelView/TreeModelFilter.chs
--- a/Graphics/UI/Gtk/ModelView/TreeModelFilter.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeModelFilter.chs
@@ -84,12 +84,10 @@
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.GObject			(wrapNewGObject)
 import System.Glib.Attributes
 import System.Glib.Properties
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.ModelView.TreeModel#}
-{#import Graphics.UI.Gtk.ModelView.CustomStore#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
@@ -118,14 +116,14 @@
  -> IO (TypedTreeModelFilter row)
 treeModelFilterNew childModel [] =
   liftM unsafeTreeModelFilterToGeneric $
-  wrapNewGObject mkTreeModelFilter $ 
+  wrapNewGObject mkTreeModelFilter $
   liftM (castPtr :: Ptr TreeModel -> Ptr TreeModelFilter) $
   {# call gtk_tree_model_filter_new #}
     (toTreeModel childModel)
     (NativeTreePath nullPtr)
 treeModelFilterNew childModel root =
   liftM unsafeTreeModelFilterToGeneric $
-  wrapNewGObject mkTreeModelFilter $ 
+  wrapNewGObject mkTreeModelFilter $
   liftM (castPtr :: Ptr TreeModel -> Ptr TreeModelFilter) $
   withTreePath root $ \root ->
   {# call gtk_tree_model_filter_new #}
@@ -170,7 +168,7 @@
 --   should look for visibility information. A row containing @True@ means
 --   that this row should be shown.
 --
-treeModelFilterSetVisibleColumn :: 
+treeModelFilterSetVisibleColumn ::
  (TreeModelFilterClass (self row),
   TypedTreeModelClass self)
  => self row
@@ -200,7 +198,7 @@
  -> TreeIter
  -> IO TreeIter
 treeModelFilterConvertChildIterToIter self childIter =
-  with childIter $ \childIterPtr -> 
+  with childIter $ \childIterPtr ->
   alloca $ \filterIterPtr -> do
   {# call tree_model_filter_convert_child_iter_to_iter #}
     (toTreeModelFilter self)
@@ -296,6 +294,6 @@
 --
 treeModelFilterVirtualRoot :: TreeModelFilterClass self => ReadAttr self TreePath
 treeModelFilterVirtualRoot = readAttrFromBoxedOpaqueProperty (peekTreePath . castPtr)
-                             "virtual-root" 
+                             "virtual-root"
                              {#call pure unsafe gtk_tree_path_get_type#}
 #endif
diff --git a/Graphics/UI/Gtk/ModelView/TreeModelSort.chs b/Graphics/UI/Gtk/ModelView/TreeModelSort.chs
--- a/Graphics/UI/Gtk/ModelView/TreeModelSort.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeModelSort.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.ModelView.TreeModelSort (
 -- * Detail
--- 
+--
 -- | The 'TreeModelSort' is a model which implements the 'TreeSortable'
 -- interface. It does not hold any data itself, but rather is created with a
 -- child model and proxies its data. It has identical rows to its
@@ -69,7 +69,6 @@
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.GObject			(wrapNewGObject, makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.ModelView.TreeModel#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
@@ -149,7 +148,7 @@
  -> TreeIter
  -> IO TreeIter
 treeModelSortConvertChildIterToIter self childIter =
-  with childIter $ \childIterPtr -> 
+  with childIter $ \childIterPtr ->
   alloca $ \sortIterPtr -> do
   {# call tree_model_sort_convert_child_iter_to_iter #}
     (toTreeModelSort self)
diff --git a/Graphics/UI/Gtk/ModelView/TreeRowReference.chs b/Graphics/UI/Gtk/ModelView/TreeRowReference.chs
--- a/Graphics/UI/Gtk/ModelView/TreeRowReference.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeRowReference.chs
@@ -68,7 +68,7 @@
  -> TreePath
  -> IO (Maybe TreeRowReference)
 treeRowReferenceNew self path = withTreePath path $ \path -> do
-  rowRefPtr <- 
+  rowRefPtr <-
     {#call gtk_tree_row_reference_new#} (toTreeModel self) path
   if rowRefPtr==nullPtr then return Nothing else
     liftM (Just . TreeRowReference) $
diff --git a/Graphics/UI/Gtk/ModelView/TreeSelection.chs b/Graphics/UI/Gtk/ModelView/TreeSelection.chs
--- a/Graphics/UI/Gtk/ModelView/TreeSelection.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeSelection.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.ModelView.TreeSelection (
 -- * Detail
--- 
+--
 -- | The 'TreeSelection' object is a helper object to manage the selection for
 -- a 'TreeView' widget. The 'TreeSelection' object is automatically created
 -- when a new 'TreeView' widget is created, and cannot exist independentally of
@@ -109,7 +109,6 @@
 import System.Glib.FFI
 import System.Glib.GList                (fromGList)
 import System.Glib.Attributes
-import System.Glib.GObject		(destroyFunPtr)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
diff --git a/Graphics/UI/Gtk/ModelView/TreeSortable.chs b/Graphics/UI/Gtk/ModelView/TreeSortable.chs
--- a/Graphics/UI/Gtk/ModelView/TreeSortable.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeSortable.chs
@@ -44,7 +44,7 @@
 -- 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' or
 -- 'Graphics.UI.Gtk.ModelView.TreeStore.TreeStore' model in a
 -- 'Graphics.UI.Gtk.ModelView.TreeModelSort.TreeModelSort'.
---    
+--
 -- A 'Graphics.UI.Gtk.ModelView.TreeViewColumn' can be sorted by the user
 -- though clicking into the column's header. The rows in the view will then be
 -- sorted by the sorting function set for that column. Specifically, a set of
@@ -88,12 +88,9 @@
   sortColumnChanged
   ) where
 
-import Control.Monad	(liftM, when)
+import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.Flags		(Flags, toFlags)
-import System.Glib.UTFString
-import System.Glib.GObject		(destroyFunPtr)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.General.Enums#}	(SortType(..))
 {#import Graphics.UI.Gtk.Signals#}
@@ -112,7 +109,7 @@
 --   the returned Boolean flag is @False@.
 --
 treeSortableGetSortColumnId :: TreeSortableClass self => self
- -> IO (SortType, Bool, SortColumnId)   -- ^ @(type, columnSet, sortColumnId)@ 
+ -> IO (SortType, Bool, SortColumnId)   -- ^ @(type, columnSet, sortColumnId)@
                      -- returns @True@ in @columnSet@ if @sortColumnId@ is not
                      -- 'treeSortableDefaultSortColumnId'. The @type@ value indicates increasing
                      -- or decreasing ordering.
@@ -183,7 +180,7 @@
 -- 'treeSortableDefaultSortColumnId' then the model will sort using
 -- this function.
 --
--- | If @sortFunc@ is 'Nothing', then there will be no default comparison function. 
+-- | If @sortFunc@ is 'Nothing', then there will be no default comparison function.
 -- This means that once the
 -- model has been sorted, it can't go back to the default state. In this case, when the current sort
 -- column id of sortable is 'TreeSortableDefaultSortColumnId', the model will be unsorted.
diff --git a/Graphics/UI/Gtk/ModelView/TreeStore.hs b/Graphics/UI/Gtk/ModelView/TreeStore.hs
--- a/Graphics/UI/Gtk/ModelView/TreeStore.hs
+++ b/Graphics/UI/Gtk/ModelView/TreeStore.hs
@@ -60,11 +60,11 @@
 import Data.Word (Word)
 import Data.Maybe ( fromMaybe, isJust )
 import Data.Tree
-import Control.Monad ( liftM, when )
+import Control.Monad ( when )
 import Control.Exception (assert)
 import Data.IORef
 import Graphics.UI.Gtk.ModelView.Types
-import Graphics.UI.Gtk.Types (GObjectClass(..), TreeModelClass)
+import Graphics.UI.Gtk.Types (GObjectClass(..))
 import Graphics.UI.Gtk.ModelView.CustomStore
 import Graphics.UI.Gtk.ModelView.TreeModel
 import Graphics.UI.Gtk.ModelView.TreeDrag
@@ -108,7 +108,7 @@
 -- * Additionally, a cache is used to achieve higher performance if operating on
 --   recently used TreePaths.
 --
--- * __Note:__ due to the limited amount of bits available in TreeIter storage, only 
+-- * __Note:__ due to the limited amount of bits available in TreeIter storage, only
 --   limited depth forests can be used with this implementation, the result of too deep
 --   Forests is an undefined behaviour while trying to retrieve the deeply nested nodes.
 --   For example: assuming the average requiement is 8 bits per tree level (max number of
@@ -262,24 +262,24 @@
            in (word .&. complement mask) .|. (value `shiftL` off)
 
 
-iterPrefixEqual :: TreeIter -> TreeIter -> Int -> Bool
-iterPrefixEqual (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) pos
-  | pos>64 = let mask = 1 `shiftL` (pos-64) - 1 in
-             a1==a2 && b1==b2 && (c1 .&. mask) == (c2 .&. mask)
-  | pos>32 = let mask = 1 `shiftL` (pos-32) - 1 in
-             a1==a2 && (b1 .&. mask) == (b2 .&. mask)
-  | otherwise = let mask = 1 `shiftL` pos - 1 in
-                (a1 .&. mask) == (a2 .&. mask)
+--iterPrefixEqual :: TreeIter -> TreeIter -> Int -> Bool
+--iterPrefixEqual (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) pos
+--  | pos>64 = let mask = 1 `shiftL` (pos-64) - 1 in
+--             a1==a2 && b1==b2 && (c1 .&. mask) == (c2 .&. mask)
+--  | pos>32 = let mask = 1 `shiftL` (pos-32) - 1 in
+--             a1==a2 && (b1 .&. mask) == (b2 .&. mask)
+--  | otherwise = let mask = 1 `shiftL` pos - 1 in
+--                (a1 .&. mask) == (a2 .&. mask)
 
 -- | The invalid tree iterator.
 --
 invalidIter :: TreeIter
 invalidIter = TreeIter 0 0 0 0
 
-showIterBits (TreeIter _ a b c) = [showBits a, showBits b, showBits c]
-
-showBits :: Bits a => a -> String
-showBits a = [ if testBit a i then '1' else '0' | i <- [0..bitSize a - 1] ]
+--showIterBits (TreeIter _ a b c) = [showBits a, showBits b, showBits c]
+--
+--showBits :: Bits a => a -> String
+--showBits a = [ if testBit a i then '1' else '0' | i <- [0..bitSize a - 1] ]
 
 -- | Calculate the maximum number of nodes on a per-level basis.
 --
@@ -402,7 +402,6 @@
   where
   cmp (TreeIter _ a1 b1 c1) (TreeIter _ a2 b2 c2) =
       a1==a2 && b1==b2 && c2==c2
-  cache'@((cur,sibs):_) = advanceCache depth iter cache
 
 -- | Get the leaf index of this iterator.
 --
@@ -424,7 +423,7 @@
 --
 iterNext :: Depth -> TreeIter -> Cache a -> (Maybe TreeIter, Cache a)
 iterNext depth iter cache = let
-    (pos,leaf,child) = getTreeIterLeaf depth iter
+    (pos,leaf,_child) = getTreeIterLeaf depth iter
     curIdx = getBitSlice iter pos leaf
     nextIdx = curIdx+1
     nextIter = setBitSlice iter pos leaf nextIdx
@@ -460,7 +459,7 @@
 --
 iterParent :: Depth -> TreeIter -> Maybe TreeIter
 iterParent depth iter = let
-    (pos,leaf,child) = getTreeIterLeaf depth iter
+    (pos,leaf,_child) = getTreeIterLeaf depth iter
   in if pos==0 then Nothing else
      if getBitSlice iter pos leaf==0 then Nothing else
      Just (setBitSlice iter pos leaf 0)
diff --git a/Graphics/UI/Gtk/ModelView/TreeView.chs b/Graphics/UI/Gtk/ModelView/TreeView.chs
--- a/Graphics/UI/Gtk/ModelView/TreeView.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeView.chs
@@ -260,7 +260,7 @@
 #endif
   ) where
 
-import Control.Monad	(liftM, mapM)
+import Control.Monad	(liftM,)
 import Data.Maybe	(fromMaybe)
 
 import System.Glib.FFI
@@ -269,16 +269,13 @@
 import System.Glib.Flags
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(makeNewGObject, wrapNewGObject,
-					 destroyFunPtr)
 import Graphics.UI.Gtk.Gdk.Enums        (DragAction(..))
 import Graphics.UI.Gtk.Gdk.Events       (Modifier(..))
 import Graphics.UI.Gtk.General.Structs	(Point, Rectangle)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
-{#import Graphics.UI.Gtk.ModelView.TreeViewColumn#}
-import Graphics.UI.Gtk.ModelView.TreeModel (ColumnId, columnIdToNumber,
+import Graphics.UI.Gtk.ModelView.TreeModel (columnIdToNumber,
                                             makeColumnIdString)
 {#import Graphics.UI.Gtk.ModelView.Types#}
 {#import Graphics.UI.Gtk.General.DNDTypes#}     (TargetList(..))
diff --git a/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs b/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs
--- a/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs
+++ b/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs
@@ -132,7 +132,9 @@
 
 import System.Glib.FFI
 import System.Glib.UTFString
+#if GTK_MAJOR_VERSION < 3
 {#import System.Glib.GList#}			(fromGList)
+#endif
 import System.Glib.Attributes
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)
diff --git a/Graphics/UI/Gtk/ModelView/Types.chs b/Graphics/UI/Gtk/ModelView/Types.chs
--- a/Graphics/UI/Gtk/ModelView/Types.chs
+++ b/Graphics/UI/Gtk/ModelView/Types.chs
@@ -3,6 +3,7 @@
 {-# LANGUAGE Rank2Types #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# OPTIONS_HADDOCK hide #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
 -- -*-haskell-*-
 --  GIMP Toolkit (GTK) CustomStore TreeModel
 --
diff --git a/Graphics/UI/Gtk/Multiline/TextBuffer.chs b/Graphics/UI/Gtk/Multiline/TextBuffer.chs
--- a/Graphics/UI/Gtk/Multiline/TextBuffer.chs
+++ b/Graphics/UI/Gtk/Multiline/TextBuffer.chs
@@ -201,15 +201,13 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject			(wrapNewGObject,
-						 makeNewGObject)
 import Data.ByteString (ByteString)
 import Data.ByteString.Unsafe (unsafeUseAsCStringLen, unsafePackCStringFinalizer)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.Multiline.Types#}
-import Graphics.UI.Gtk.Multiline.TextMark	(TextMark, MarkName)
-import Graphics.UI.Gtk.Multiline.TextTag	(TextTag, TagName)
+import Graphics.UI.Gtk.Multiline.TextMark	(MarkName)
+import Graphics.UI.Gtk.Multiline.TextTag	(TagName)
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/Multiline/TextIter.chs b/Graphics/UI/Gtk/Multiline/TextIter.chs
--- a/Graphics/UI/Gtk/Multiline/TextIter.chs
+++ b/Graphics/UI/Gtk/Multiline/TextIter.chs
@@ -146,7 +146,6 @@
 import System.Glib.Flags		(fromFlags)
 import System.Glib.UTFString
 import System.Glib.Attributes
-import System.Glib.GObject		(makeNewGObject)
 import System.Glib.GList
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.General.Enums	(TextSearchFlags(..))
@@ -789,10 +788,6 @@
 textIterBackwardToTagToggle ti tt = liftM toBool $
   {#call unsafe text_iter_backward_to_tag_toggle#} ti
     (fromMaybe (TextTag nullForeignPtr) tt)
-
--- Setup a callback for a predicate function.
---
-type TextCharPredicateCB = Char -> Bool
 
 {#pointer TextCharPredicate#}
 
diff --git a/Graphics/UI/Gtk/Multiline/TextMark.chs b/Graphics/UI/Gtk/Multiline/TextMark.chs
--- a/Graphics/UI/Gtk/Multiline/TextMark.chs
+++ b/Graphics/UI/Gtk/Multiline/TextMark.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Multiline.TextMark (
 -- * Detail
--- 
+--
 -- | You may wish to begin by reading the text widget conceptual overview
 -- which gives an overview of all the objects and data types related to the
 -- text widget and how they work together.
@@ -80,7 +80,9 @@
   textMarkGetLeftGravity,
 
 -- * Attributes
+  textMarkName,
   textMarkVisible,
+  textMarkLeftGravity
   ) where
 
 import Control.Monad	(liftM)
@@ -89,7 +91,6 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(makeNewGObject, wrapNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
@@ -113,7 +114,7 @@
 --
 -- * Available since Gtk+ version 2.12
 --
-textMarkNew :: 
+textMarkNew ::
   Maybe MarkName  -- ^ @markName@ - name for mark, or @Nothing@
  -> Bool  -- ^ @leftGravity@ - whether the mark has left gravity
  -> IO TextMark
diff --git a/Graphics/UI/Gtk/Multiline/TextTag.chs b/Graphics/UI/Gtk/Multiline/TextTag.chs
--- a/Graphics/UI/Gtk/Multiline/TextTag.chs
+++ b/Graphics/UI/Gtk/Multiline/TextTag.chs
@@ -160,7 +160,6 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject		(wrapNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 import Graphics.Rendering.Pango.Font
@@ -171,7 +170,9 @@
 					 Justification(..), WrapMode(..))
 import Graphics.UI.Gtk.General.Structs  (Color(..))
 import Graphics.UI.Gtk.Multiline.Types  ( TextIter, mkTextIterCopy )
+#ifndef DISABLE_DEPRECATED
 import Graphics.UI.Gtk.Gdk.Events	(Event, marshalEvent)
+#endif
 import Graphics.UI.Gtk.Gdk.EventM (EventM, EAny)
 import Control.Monad.Reader ( runReaderT )
 
diff --git a/Graphics/UI/Gtk/Multiline/TextTagTable.chs b/Graphics/UI/Gtk/Multiline/TextTagTable.chs
--- a/Graphics/UI/Gtk/Multiline/TextTagTable.chs
+++ b/Graphics/UI/Gtk/Multiline/TextTagTable.chs
@@ -60,7 +60,6 @@
 
 import System.Glib.FFI (withForeignPtr, nullPtr, Ptr(..), CInt(..), CChar(..), FunPtr(..), maybeNull)
 import System.Glib.UTFString
-import System.Glib.GObject	(wrapNewGObject, makeNewGObject)
 {#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
diff --git a/Graphics/UI/Gtk/Multiline/TextView.chs b/Graphics/UI/Gtk/Multiline/TextView.chs
--- a/Graphics/UI/Gtk/Multiline/TextView.chs
+++ b/Graphics/UI/Gtk/Multiline/TextView.chs
@@ -195,14 +195,12 @@
 import System.Glib.Attributes
 import System.Glib.Properties           (newAttrFromStringProperty)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
-import System.Glib.GObject		(wrapNewGObject, makeNewGObject)
 import Graphics.UI.Gtk.Gdk.EventM	(EventM, EKey)
 import Control.Monad.Reader             ( ask )
 import Control.Monad.Trans              ( liftIO )
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.Multiline.Types#}
-{#import Graphics.UI.Gtk.Multiline.TextIter#}
 {#import Graphics.UI.Gtk.Multiline.TextTag#}
 import Graphics.UI.Gtk.General.Enums	(TextWindowType(..), DeleteType(..),
 					 DirectionType(..), Justification(..),
diff --git a/Graphics/UI/Gtk/Ornaments/HSeparator.chs b/Graphics/UI/Gtk/Ornaments/HSeparator.chs
--- a/Graphics/UI/Gtk/Ornaments/HSeparator.chs
+++ b/Graphics/UI/Gtk/Ornaments/HSeparator.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Ornaments.HSeparator (
 -- * Detail
--- 
+--
 -- | The 'HSeparator' widget is a horizontal separator, used to group the
 -- widgets within a window. It displays a horizontal line with a shadow to make
 -- it appear sunken into the interface.
diff --git a/Graphics/UI/Gtk/Ornaments/VSeparator.chs b/Graphics/UI/Gtk/Ornaments/VSeparator.chs
--- a/Graphics/UI/Gtk/Ornaments/VSeparator.chs
+++ b/Graphics/UI/Gtk/Ornaments/VSeparator.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Ornaments.VSeparator (
 -- * Detail
--- 
+--
 -- | The 'VSeparator' widget is a vertical separator, used to group the
 -- widgets within a window. It displays a vertical line with a shadow to make
 -- it appear sunken into the interface.
diff --git a/Graphics/UI/Gtk/Printing/PageSetup.chs b/Graphics/UI/Gtk/Printing/PageSetup.chs
--- a/Graphics/UI/Gtk/Printing/PageSetup.chs
+++ b/Graphics/UI/Gtk/Printing/PageSetup.chs
@@ -103,7 +103,6 @@
 import System.Glib.FFI
 import System.Glib.GError
 import System.Glib.Attributes
-import System.Glib.Properties
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Printing.PaperSize#} (PaperSize(..), mkPaperSize, Unit(..))
diff --git a/Graphics/UI/Gtk/Printing/PaperSize.chs b/Graphics/UI/Gtk/Printing/PaperSize.chs
--- a/Graphics/UI/Gtk/Printing/PaperSize.chs
+++ b/Graphics/UI/Gtk/Printing/PaperSize.chs
@@ -80,7 +80,6 @@
 import System.Glib.FFI
 import System.Glib.UTFString
 import System.Glib.GList
-{#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/Printing/PrintContext.chs b/Graphics/UI/Gtk/Printing/PrintContext.chs
--- a/Graphics/UI/Gtk/Printing/PrintContext.chs
+++ b/Graphics/UI/Gtk/Printing/PrintContext.chs
@@ -94,7 +94,7 @@
 --
 printContextGetCairoContext :: PrintContextClass self => self
  -> IO Cairo -- ^ returns the cairo context of @context@
-printContextGetCairoContext self = 
+printContextGetCairoContext self =
   liftM Cairo $
   {# call gtk_print_context_get_cairo_context #} (toPrintContext self)
 
@@ -197,11 +197,11 @@
 #if GTK_CHECK_VERSION(2,20,0)
 printContextGetHardMargins :: PrintContextClass self => self
                            -> IO (Maybe (Double, Double, Double, Double))
-                             -- ^ returns @(top, bottom, left, right)@ 
-                             -- @top@ top hardware printer margin             
-                             -- @bottom@ bottom hardware printer margin             
-                             -- @left@ left hardware printer margin             
-                             -- @right@ right hardware printer margin             
+                             -- ^ returns @(top, bottom, left, right)@
+                             -- @top@ top hardware printer margin
+                             -- @bottom@ bottom hardware printer margin
+                             -- @left@ left hardware printer margin
+                             -- @right@ right hardware printer margin
 printContextGetHardMargins self =
   alloca $ \ topPtr ->
   alloca $ \ bottomPtr ->
diff --git a/Graphics/UI/Gtk/Printing/PrintOperation.chs b/Graphics/UI/Gtk/Printing/PrintOperation.chs
--- a/Graphics/UI/Gtk/Printing/PrintOperation.chs
+++ b/Graphics/UI/Gtk/Printing/PrintOperation.chs
@@ -91,9 +91,18 @@
 -- * Methods
   printOperationSetAllowAsync,
   printOperationGetError,
+  printOperationSetJobName,
+  printOperationSetNPages,
 #if GTK_CHECK_VERSION(2,18,0)
   printOperationGetNPagesToPrint,
 #endif
+  printOperationSetCurrentPage,
+  printOperationSetUseFullPage,
+  printOperationSetUnit,
+  printOperationSetExportFilename,
+  printOperationSetShowProgress,
+  printOperationSetTrackPrintStatus,
+  printOperationSetCustomTabLabel,
   printOperationRun,
   printOperationCancel,
 #if GTK_CHECK_VERSION(2,16,0)
diff --git a/Graphics/UI/Gtk/Printing/PrintSettings.chs b/Graphics/UI/Gtk/Printing/PrintSettings.chs
--- a/Graphics/UI/Gtk/Printing/PrintSettings.chs
+++ b/Graphics/UI/Gtk/Printing/PrintSettings.chs
@@ -146,7 +146,6 @@
 
 import System.Glib.FFI
 import System.Glib.Attributes
-import System.Glib.Properties
 import System.Glib.UTFString
 import System.Glib.GError
 {#import Graphics.UI.Gtk.Types#}
diff --git a/Graphics/UI/Gtk/Recent/RecentChooser.chs b/Graphics/UI/Gtk/Recent/RecentChooser.chs
--- a/Graphics/UI/Gtk/Recent/RecentChooser.chs
+++ b/Graphics/UI/Gtk/Recent/RecentChooser.chs
@@ -89,6 +89,8 @@
 #endif
   ) where
 
+#if GTK_CHECK_VERSION(2,10,0)
+
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -96,8 +98,7 @@
 import System.Glib.Attributes
 import System.Glib.Properties
 import System.Glib.GList
-import System.Glib.GObject        (Quark, quarkFromString)
-import System.Glib.GError   (GErrorDomain, GErrorClass(..), propagateGError, checkGError)
+import System.Glib.GError   (checkGError)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Recent.RecentInfo#} (RecentInfo, mkRecentInfo)
 {#import Graphics.UI.Gtk.Types#}
@@ -105,7 +106,6 @@
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if GTK_CHECK_VERSION(2,10,0)
 --------------------
 -- Enums
 -- | These identify the various errors that can occur while calling 'RecentChooser' functions.
diff --git a/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs b/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs
--- a/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs
+++ b/Graphics/UI/Gtk/Recent/RecentChooserMenu.chs
@@ -126,9 +126,9 @@
 --
 -- * Available since Gtk+ version 2.10
 --
-recentChooserMenuNewForManager :: RecentManagerClass manager 
+recentChooserMenuNewForManager :: RecentManagerClass manager
                                => manager -- ^ @manager@ - a 'RecentManager'
-                               -> IO RecentChooserMenu -- ^ returns a new 'RecentChooserMenu', bound to manager. 
+                               -> IO RecentChooserMenu -- ^ returns a new 'RecentChooserMenu', bound to manager.
 recentChooserMenuNewForManager manager =
   makeNewObject mkRecentChooserMenu $
   liftM (castPtr :: Ptr Widget -> Ptr RecentChooserMenu) $
@@ -139,7 +139,7 @@
 -- Attributes
 
 -- | Whether the first ten items in the menu should be prepended by a number acting as a unique mnemonic.
--- 
+--
 -- Default value: 'False'
 --
 -- * Available since Gtk+ version 2.10
diff --git a/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs b/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs
--- a/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs
+++ b/Graphics/UI/Gtk/Recent/RecentChooserWidget.chs
@@ -67,18 +67,16 @@
 #endif
   ) where
 
+#if GTK_CHECK_VERSION(2,10,0)
+
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.Attributes
-import System.Glib.Properties
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if GTK_CHECK_VERSION(2,10,0)
-
 --------------------
 -- Constructors
 
@@ -96,9 +94,9 @@
 -- This is useful if you have implemented your own recent manager, or if you
 -- have a customized instance of a 'RecentManager' object.
 --
-recentChooserWidgetNewForManager :: RecentManagerClass manager 
+recentChooserWidgetNewForManager :: RecentManagerClass manager
                                  => manager -- ^ @manager@ - a 'RecentManager'
-                                 -> IO RecentChooserWidget -- ^ returns a new 'RecentChooserWidget' 
+                                 -> IO RecentChooserWidget -- ^ returns a new 'RecentChooserWidget'
 recentChooserWidgetNewForManager manager =
   makeNewObject mkRecentChooserWidget $
   liftM (castPtr :: Ptr Widget -> Ptr RecentChooserWidget) $
diff --git a/Graphics/UI/Gtk/Recent/RecentFilter.chs b/Graphics/UI/Gtk/Recent/RecentFilter.chs
--- a/Graphics/UI/Gtk/Recent/RecentFilter.chs
+++ b/Graphics/UI/Gtk/Recent/RecentFilter.chs
@@ -84,17 +84,15 @@
 #endif
   ) where
 
-import Control.Monad	(liftM)
+#if GTK_CHECK_VERSION(2,10,0)
 
 import System.Glib.FFI
 import System.Glib.UTFString
-import System.Glib.Flags (Flags, toFlags, fromFlags)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if GTK_CHECK_VERSION(2,10,0)
 ---------------------
 -- Enums
 -- | These flags indicate what parts of a 'RecentFilterInfo' struct are filled or need to be filled.
diff --git a/Graphics/UI/Gtk/Recent/RecentInfo.chs b/Graphics/UI/Gtk/Recent/RecentInfo.chs
--- a/Graphics/UI/Gtk/Recent/RecentInfo.chs
+++ b/Graphics/UI/Gtk/Recent/RecentInfo.chs
@@ -56,17 +56,16 @@
 #endif
   ) where
 
+#if GTK_CHECK_VERSION(2,10,0)
+
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.Attributes
-import System.Glib.Properties
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if GTK_CHECK_VERSION(2,10,0)
 --------------------
 -- Types
 {#pointer *RecentInfo foreign newtype#}
diff --git a/Graphics/UI/Gtk/Recent/RecentManager.chs b/Graphics/UI/Gtk/Recent/RecentManager.chs
--- a/Graphics/UI/Gtk/Recent/RecentManager.chs
+++ b/Graphics/UI/Gtk/Recent/RecentManager.chs
@@ -89,6 +89,8 @@
 #endif
   ) where
 
+#if GTK_CHECK_VERSION(2,10,0)
+
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -96,15 +98,12 @@
 import System.Glib.Properties
 import System.Glib.GList
 import System.Glib.UTFString
-import System.Glib.GObject        (Quark, quarkFromString)
-import System.Glib.GError   (GErrorDomain, GErrorClass(..), propagateGError, checkGError)
+import System.Glib.GError   (propagateGError, checkGError)
 {#import Graphics.UI.Gtk.Recent.RecentInfo#} (RecentInfo, mkRecentInfo)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 
 {# context lib="gtk" prefix="gtk" #}
-
-#if GTK_CHECK_VERSION(2,10,0)
 
 --------------------
 -- Constructors
diff --git a/Graphics/UI/Gtk/Scrolling/HScrollbar.chs b/Graphics/UI/Gtk/Scrolling/HScrollbar.chs
--- a/Graphics/UI/Gtk/Scrolling/HScrollbar.chs
+++ b/Graphics/UI/Gtk/Scrolling/HScrollbar.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Scrolling.HScrollbar (
 -- * Detail
--- 
+--
 -- | The 'HScrollbar' widget is a widget arranged horizontally creating a
 -- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment'
 -- may be added to handle the adjustment of the scrollbar using
@@ -71,7 +71,7 @@
 
 -- | Creates a new horizontal scrollbar.
 --
-hScrollbarNew :: 
+hScrollbarNew ::
     Adjustment    -- ^ @adjustment@ - the 'Adjustment' to use.
  -> IO HScrollbar
 hScrollbarNew adjustment =
diff --git a/Graphics/UI/Gtk/Scrolling/VScrollbar.chs b/Graphics/UI/Gtk/Scrolling/VScrollbar.chs
--- a/Graphics/UI/Gtk/Scrolling/VScrollbar.chs
+++ b/Graphics/UI/Gtk/Scrolling/VScrollbar.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Scrolling.VScrollbar (
 -- * Detail
--- 
+--
 -- | The 'VScrollbar' widget is a widget arranged vertically creating a
 -- scrollbar. See 'Scrollbar' for details on scrollbars. An 'Adjustment'
 -- may be added to handle the adjustment of the scrollbar using
@@ -71,7 +71,7 @@
 
 -- | Creates a new vertical scrollbar.
 --
-vScrollbarNew :: 
+vScrollbarNew ::
     Adjustment    -- ^ @adjustment@ - the 'Adjustment' to use.
  -> IO VScrollbar
 vScrollbarNew adjustment =
diff --git a/Graphics/UI/Gtk/Selectors/ColorSelection.chs b/Graphics/UI/Gtk/Selectors/ColorSelection.chs
--- a/Graphics/UI/Gtk/Selectors/ColorSelection.chs
+++ b/Graphics/UI/Gtk/Selectors/ColorSelection.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Selectors.ColorSelection (
 -- * Detail
--- 
+--
 -- | The 'ColorSelection' is a widget that is used to select a color. It
 -- consists of a color wheel and number of sliders and entry boxes for color
 -- parameters such as hue, saturation, value, red, green, blue, and opacity. It
diff --git a/Graphics/UI/Gtk/Selectors/FileChooserDialog.chs b/Graphics/UI/Gtk/Selectors/FileChooserDialog.chs
--- a/Graphics/UI/Gtk/Selectors/FileChooserDialog.chs
+++ b/Graphics/UI/Gtk/Selectors/FileChooserDialog.chs
@@ -80,7 +80,6 @@
 import System.Glib.UTFString
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Selectors.FileChooser#}
-import System.Glib.GObject (objectNew)
 import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
 import Graphics.UI.Gtk.Windows.Window
 import Graphics.UI.Gtk.Windows.Dialog
diff --git a/Graphics/UI/Gtk/Selectors/FileFilter.chs b/Graphics/UI/Gtk/Selectors/FileFilter.chs
--- a/Graphics/UI/Gtk/Selectors/FileFilter.chs
+++ b/Graphics/UI/Gtk/Selectors/FileFilter.chs
@@ -84,9 +84,6 @@
 import System.Glib.Flags		(Flags, fromFlags)
 import System.Glib.UTFString
 import System.Glib.Attributes
--- Back in <X.h> DestroyNotify is defined as 17
-#undef DestroyNotify
-import System.Glib.GObject              (DestroyNotify, destroyFunPtr)
 {#import Graphics.UI.Gtk.Types#}
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 
diff --git a/Graphics/UI/Gtk/Selectors/HSV.chs b/Graphics/UI/Gtk/Selectors/HSV.chs
--- a/Graphics/UI/Gtk/Selectors/HSV.chs
+++ b/Graphics/UI/Gtk/Selectors/HSV.chs
@@ -75,7 +75,6 @@
 
 import System.Glib.FFI
 import System.Glib.Attributes
-import System.Glib.Properties
 import Graphics.UI.Gtk.General.Enums	(DirectionType (..))
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Signals#}
@@ -107,9 +106,9 @@
 --
 hsvSetColor :: HSVClass self => self
  -> (Double, Double, Double)
-   -- ^ @(h, s, v)@ 
-   -- @h@ - value for the hue 
-   -- @s@ value for the saturation 
+   -- ^ @(h, s, v)@
+   -- @h@ - value for the hue
+   -- @s@ value for the saturation
    -- @v@ value for the value
  -> IO ()
 hsvSetColor self (h, s, v) =
@@ -144,7 +143,7 @@
 --
 hsvSetMetrics :: HSVClass self => self
  -> (Int, Int)
- -- ^ @(size, ringWidth)@ 
+ -- ^ @(size, ringWidth)@
  -- ^ @size@ - Diameter for the hue ring
  -- ^ @ringWidth@ - Width of the hue ring
  -> IO ()
@@ -157,7 +156,7 @@
 -- | Queries the size and ring width of an 'HSV' color selector.
 --
 hsvGetMetrics :: HSVClass self => self
- -> IO (Int, Int) -- ^ @(size, ringWidth)@ 
+ -> IO (Int, Int) -- ^ @(size, ringWidth)@
                   -- @size@ - Return value for the diameter of the hue ring
                   -- @ringWidth@ - Return value for the width of the hue ring
 hsvGetMetrics self =
@@ -190,9 +189,9 @@
 --
 hsvToRgb ::
  (Double, Double, Double)
-   -- ^ @(h, s, v)@ 
-   -- @h@ - value for the hue 
-   -- @s@ value for the saturation 
+   -- ^ @(h, s, v)@
+   -- @h@ - value for the hue
+   -- @s@ value for the saturation
    -- @v@ value for the value
  -> (Double, Double, Double) -- ^ @(r, g, b)@  @r@ - Return value for the red
                             -- component @g@ - Return value for the green
@@ -217,15 +216,15 @@
 
 -- | Converts a color from RGB space to 'HSV'. Input values must be in the [0.0, 1.0] range; output values
 -- will be in the same range.
-rgbToHsv :: 
-       (Double, Double, Double) 
-    -- ^ @(r, g, b)@  @r@ value for the red component 
-    -- @g@ value for the green component 
+rgbToHsv ::
+       (Double, Double, Double)
+    -- ^ @(r, g, b)@  @r@ value for the red component
+    -- @g@ value for the green component
     -- @b@ value for the blue component
     -> (Double, Double, Double)
-   -- ^ @(h, s, v)@ 
-   -- @h@ - Return value for the hue 
-   -- @s@ - Return value for the saturation 
+   -- ^ @(h, s, v)@
+   -- @h@ - Return value for the hue
+   -- @s@ - Return value for the saturation
    -- @v@ - Return value for the value
 rgbToHsv (r, g, b) =
   unsafePerformIO $
@@ -246,7 +245,7 @@
 
 --------------------
 -- Attributes
--- | Color in an 'HSV' color selector. 
+-- | Color in an 'HSV' color selector.
 -- Color component values must be in the [0.0, 1.0] range.
 hsvColor :: HSVClass self => Attr self (Double, Double, Double)
 hsvColor = newAttr
@@ -271,5 +270,5 @@
 --
 hsvMove :: HSVClass self => Signal self (DirectionType -> IO ())
 hsvMove = Signal (connect_ENUM__NONE "move")
-        
+
 #endif
diff --git a/Graphics/UI/Gtk/Signals.chs b/Graphics/UI/Gtk/Signals.chs
--- a/Graphics/UI/Gtk/Signals.chs
+++ b/Graphics/UI/Gtk/Signals.chs
@@ -1,4 +1,5 @@
 {-# OPTIONS_HADDOCK hide #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
 -- -*-haskell-*-
 -- -------------------- automatically generated file - do not edit ------------
 --  Callback installers for the GIMP Toolkit (GTK) Binding for Haskell
diff --git a/Graphics/UI/Gtk/Types.chs b/Graphics/UI/Gtk/Types.chs
--- a/Graphics/UI/Gtk/Types.chs
+++ b/Graphics/UI/Gtk/Types.chs
@@ -1,5 +1,6 @@
 {-# LANGUAGE CPP #-}
 {-# OPTIONS_HADDOCK hide #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
 -- -*-haskell-*-
 -- -------------------- automatically generated file - do not edit ----------
 --  Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell
@@ -105,6 +106,10 @@
   toDevice, 
   mkDevice, unDevice,
   castToDevice, gTypeDevice,
+  FrameClock(FrameClock), FrameClockClass,
+  toFrameClock, 
+  mkFrameClock, unFrameClock,
+  castToFrameClock, gTypeFrameClock,
   Settings(Settings), SettingsClass,
   toSettings, 
   mkSettings, unSettings,
@@ -1160,6 +1165,29 @@
 gTypeDevice :: GType
 gTypeDevice =
   {# call fun unsafe gdk_device_get_type #}
+
+-- ***************************************************************** FrameClock
+
+{#pointer *GdkFrameClock as FrameClock foreign newtype #} deriving (Eq,Ord)
+
+mkFrameClock = (FrameClock, objectUnrefFromMainloop)
+unFrameClock (FrameClock o) = o
+
+class GObjectClass o => FrameClockClass o
+toFrameClock :: FrameClockClass o => o -> FrameClock
+toFrameClock = unsafeCastGObject . toGObject
+
+instance FrameClockClass FrameClock
+instance GObjectClass FrameClock where
+  toGObject = GObject . castForeignPtr . unFrameClock
+  unsafeCastGObject = FrameClock . castForeignPtr . unGObject
+
+castToFrameClock :: GObjectClass obj => obj -> FrameClock
+castToFrameClock = castTo gTypeFrameClock "FrameClock"
+
+gTypeFrameClock :: GType
+gTypeFrameClock =
+  {# call fun unsafe gdk_frame_clock_get_type #}
 
 -- ******************************************************************* Settings
 
diff --git a/Graphics/UI/Gtk/Windows/AboutDialog.chs b/Graphics/UI/Gtk/Windows/AboutDialog.chs
--- a/Graphics/UI/Gtk/Windows/AboutDialog.chs
+++ b/Graphics/UI/Gtk/Windows/AboutDialog.chs
@@ -147,7 +147,6 @@
 import System.Glib.UTFString
 import System.Glib.Attributes
 import System.Glib.Properties
-import System.Glib.GObject      	(makeNewGObject, destroyFunPtr)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 
@@ -168,6 +167,7 @@
 --------------------
 -- Methods
 
+#ifndef DISABLE_DEPRECATED
 -- | Returns the program name displayed in the about dialog.
 --
 aboutDialogGetName :: (AboutDialogClass self, GlibString string) => self
@@ -306,6 +306,7 @@
   {# call gtk_about_dialog_set_website_label #}
     (toAboutDialog self)
     websiteLabelPtr
+#endif
 
 -- | Sets the strings which are displayed in the authors tab of the secondary
 -- credits dialog.
@@ -370,6 +371,7 @@
     (toAboutDialog self)
   >>= peekUTFStringArray0
 
+#ifndef DISABLE_DEPRECATED
 -- | Returns the translator credits string which is displayed in the
 -- translators tab of the secondary credits dialog.
 --
@@ -391,6 +393,7 @@
   {# call gtk_about_dialog_set_translator_credits #}
     (toAboutDialog self)
     translatorCreditsPtr
+#endif
 
 -- | Returns the pixbuf displayed as logo in the about dialog.
 --
@@ -478,6 +481,7 @@
   (Ptr AboutDialog -> CString -> Ptr () -> IO ()) -> IO AboutDialogActivateLinkFunc
 #endif
 
+#ifndef DISABLE_DEPRECATED
 #if GTK_CHECK_VERSION(2,8,0)
 -- | Returns whether the license text in @about@ is automatically wrapped.
 --
@@ -501,6 +505,7 @@
   {# call gtk_about_dialog_set_wrap_license #}
     (toAboutDialog self)
     (fromBool wrapLicense)
+#endif
 #endif
 
 --------------------
diff --git a/Graphics/UI/Gtk/Windows/Assistant.chs b/Graphics/UI/Gtk/Windows/Assistant.chs
--- a/Graphics/UI/Gtk/Windows/Assistant.chs
+++ b/Graphics/UI/Gtk/Windows/Assistant.chs
@@ -111,7 +111,7 @@
 #endif
   ) where
 
-import Control.Monad	(liftM, unless)
+import Control.Monad	(liftM)
 
 import System.Glib.FFI
 import System.Glib.UTFString
diff --git a/Graphics/UI/Gtk/Windows/Invisible.chs b/Graphics/UI/Gtk/Windows/Invisible.chs
--- a/Graphics/UI/Gtk/Windows/Invisible.chs
+++ b/Graphics/UI/Gtk/Windows/Invisible.chs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 -- -*-haskell-*-
 --  GIMP Toolkit (GTK) Window
 --
@@ -23,7 +22,7 @@
 -- Stability   : provisional
 -- Portability : portable (depends on GHC)
 --
--- A widget which is not displayed                                                                                                              
+-- A widget which is not displayed
 -- The 'Invisible' widget is used internally in GTK+, and is probably not very useful for application developers.
 -- It is used for reliable pointer grabs and selection handling in the code for drag-and-drop.
 --
@@ -42,7 +41,7 @@
   Invisible,
 
 -- * Constructors
-  invisibleNew,  
+  invisibleNew,
   invisibleNewForScreen,
 
 -- * Methods
@@ -53,16 +52,9 @@
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.UTFString
-import System.Glib.GError
-import System.Glib.Attributes
-import System.Glib.Properties
-import System.Glib.GObject		(makeNewGObject)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
-import Graphics.UI.Gtk.General.Enums
 import Graphics.UI.Gtk.Gdk.Screen
 {#import Graphics.UI.Gtk.Types#}
-{#import Graphics.UI.Gtk.Gdk.Enums#}    (Modifier(..))
 
 {# context lib="gtk" prefix="gtk" #}
 
@@ -80,31 +72,31 @@
 --
 -- * Available since Gdk version 2.2
 --
-invisibleNewForScreen :: 
-   Screen   -- ^ @screen@ - a 'Screen' which identifies on which the new 'Invisible' will be created. 
+invisibleNewForScreen ::
+   Screen   -- ^ @screen@ - a 'Screen' which identifies on which the new 'Invisible' will be created.
  -> IO Invisible
 invisibleNewForScreen screen =
   makeNewObject mkInvisible $
   liftM (castPtr :: Ptr Widget -> Ptr Invisible) $
   {# call invisible_new_for_screen #} screen
-  
+
 -- | Sets the 'Screen' where the 'Invisible' object will be displayed.
 --
 -- * Available since Gdk version 2.2
 --
-invisibleSetScreen :: Invisible 
+invisibleSetScreen :: Invisible
  -> Screen  -- ^ @screen@ - the 'Screen' to set
  -> IO ()
 invisibleSetScreen invisible screen =
   {# call invisible_set_screen #} invisible screen
-  
--- | Returns the 'Screen' object associated with invisible  
+
+-- | Returns the 'Screen' object associated with invisible
 --
 -- * Available since Gdk version 2.2
 --
 invisibleGetScreen :: Invisible
  -> IO Screen
-invisibleGetScreen invisible = 
+invisibleGetScreen invisible =
   makeNewGObject mkScreen $
   {# call invisible_get_screen #} invisible
 
diff --git a/Graphics/UI/Gtk/Windows/OffscreenWindow.chs b/Graphics/UI/Gtk/Windows/OffscreenWindow.chs
--- a/Graphics/UI/Gtk/Windows/OffscreenWindow.chs
+++ b/Graphics/UI/Gtk/Windows/OffscreenWindow.chs
@@ -23,7 +23,7 @@
 -- Stability   : provisional
 -- Portability : portable (depends on GHC)
 --
--- A toplevel container widget used to manage offscreen rendering of child widgets.                       
+-- A toplevel container widget used to manage offscreen rendering of child widgets.
 --
 -- * Module available since Gtk+ version 2.20
 --
@@ -34,16 +34,16 @@
 -- want to get a snapshot of need not be displayed on the user's screen as a part of a widget
 -- hierarchy. However, since 'OffscreenWindow' is a toplevel widget you cannot obtain snapshots of a
 -- full window with it since you cannot pack a toplevel widget in another toplevel.
--- 
+--
 -- The idea is to take a widget and manually set the state of it, add it to a 'OffscreenWindow' and
 -- then retrieve the snapshot as a 'Pixmap' or 'Pixbuf'.
--- 
+--
 -- 'OffscreenWindow' derives from 'Window' only as an implementation detail. Applications should not
 -- use any API specific to 'Window' to operate on this object. It should be treated as a 'Bin' that
 -- has no parent widget.
--- 
+--
 -- When contained offscreen widgets are redrawn, 'OffscreenWindow' will emit a 'damageEvent' signal.
-  
+
 -- * Class Hierarchy
 -- |
 -- @
@@ -77,8 +77,6 @@
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
-import System.Glib.Attributes
-import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object   (makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 
@@ -93,7 +91,7 @@
 --
 offscreenWindowNew :: IO OffscreenWindow
 offscreenWindowNew =
-  makeNewObject mkOffscreenWindow $ 
+  makeNewObject mkOffscreenWindow $
   liftM (castPtr :: Ptr Widget -> Ptr OffscreenWindow) $
   {#call gtk_offscreen_window_new #}
 
@@ -103,9 +101,9 @@
 --
 -- * Available since Gtk+ version 2.20
 --
-offscreenWindowGetPixmap :: OffscreenWindowClass self 
-                           => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget.              
-                           -> IO (Maybe Pixmap) -- ^ returns   A 'Pixmap' pointer to the offscreen pixmap, or 'Nothing'. 
+offscreenWindowGetPixmap :: OffscreenWindowClass self
+                           => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget.
+                           -> IO (Maybe Pixmap) -- ^ returns   A 'Pixmap' pointer to the offscreen pixmap, or 'Nothing'.
 offscreenWindowGetPixmap offscreen =
   maybeNull (makeNewGObject mkPixmap) $
   {#call gtk_offscreen_window_get_pixmap #}
@@ -116,9 +114,9 @@
 --
 -- * Available since Gtk+ version 2.20
 --
-offscreenWindowGetPixbuf :: OffscreenWindowClass self 
-                           => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget.              
-                           -> IO (Maybe Pixbuf) -- ^ returns   A 'Pixbuf' pointer to the offscreen pixbuf, or 'Nothing'. 
+offscreenWindowGetPixbuf :: OffscreenWindowClass self
+                           => self -- ^ @offscreen@ the 'OffscreenWindow' contained widget.
+                           -> IO (Maybe Pixbuf) -- ^ returns   A 'Pixbuf' pointer to the offscreen pixbuf, or 'Nothing'.
 offscreenWindowGetPixbuf offscreen =
   maybeNull (wrapNewGObject mkPixbuf) $
   {#call gtk_offscreen_window_get_pixbuf #}
diff --git a/Graphics/UI/Gtk/Windows/Window.chs b/Graphics/UI/Gtk/Windows/Window.chs
--- a/Graphics/UI/Gtk/Windows/Window.chs
+++ b/Graphics/UI/Gtk/Windows/Window.chs
@@ -286,7 +286,6 @@
 import System.Glib.Attributes
 import System.Glib.Properties
 import System.Glib.GList                (fromGList, withGList)
-import System.Glib.GObject		(makeNewGObject)
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 import Graphics.UI.Gtk.General.Enums	(WindowType(..), WindowPosition(..))
 #if GTK_MAJOR_VERSION < 3
@@ -1067,6 +1066,7 @@
     (toWindow self)
 
 #if GTK_CHECK_VERSION(2,10,0)
+#ifndef DISABLE_DEPRECATED
 -- | By default, windows have a close button in the window frame.
 -- Some window managers allow GTK+ to disable this button.
 -- If you set the deletable property to  @False@ using this function, GTK+ will do its best to convince the window manager not to show a close button.
@@ -1095,6 +1095,7 @@
   {# call window_get_deletable #}
     (toWindow self)
 #endif
+#endif
 
 #if GTK_MAJOR_VERSION < 3
 -- | (Note: this is a special-purpose function intended for the framebuffer
@@ -1175,6 +1176,7 @@
     (toWindow self)
 #endif
 
+#ifndef DISABLE_DEPRECATED
 -- | This function is only useful on X11, not with other Gtk+ targets.
 --
 -- In combination with the window title, the window role allows a window
@@ -1207,6 +1209,7 @@
   {# call gtk_window_get_role #}
     (toWindow self)
   >>= maybePeek peekUTFString
+#endif
 
 -- | Asks to stick @window@, which means that it will appear on all user
 -- desktops. Note that you shouldn't assume the window is definitely stuck
@@ -1358,6 +1361,7 @@
   mapM (makeNewGObject mkPixbuf . return) ptrList
 
 #if GTK_CHECK_VERSION(2,6,0)
+#ifndef DISABLE_DEPRECATED
 -- | Sets the icon for the window from a named themed icon. See the docs for
 -- 'IconTheme' for more details.
 --
@@ -1389,6 +1393,7 @@
   >>= \strPtr -> if strPtr == nullPtr
                 then return ""
                 else peekUTFString strPtr
+#endif
 
 -- | Sets an icon to be used as fallback for windows that haven't had
 -- 'windowSetIconList' called on them from a named themed icon, see
@@ -1935,6 +1940,7 @@
 {# enum GdkWindowHints {underscoreToCase} #}
 
 #if GTK_CHECK_VERSION(2,12,0)
+#ifndef DISABLE_DEPRECATED
 -- | Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque.
 -- (Values of the opacity parameter are clamped to the [0,1] range.)
 -- On X11 this has any effect only on X screens with a compositing manager running.
@@ -1959,6 +1965,7 @@
  -> IO Double  -- ^ return the requested opacity for this window.
 windowGetOpacity self = liftM realToFrac $
  {#call window_get_opacity#} (toWindow self)
+#endif
 #endif
 
 #if GTK_CHECK_VERSION(2,10,0)
diff --git a/Graphics/UI/Gtk/Windows/WindowGroup.chs b/Graphics/UI/Gtk/Windows/WindowGroup.chs
--- a/Graphics/UI/Gtk/Windows/WindowGroup.chs
+++ b/Graphics/UI/Gtk/Windows/WindowGroup.chs
@@ -52,7 +52,6 @@
   ) where
 
 import System.Glib.FFI
-import System.Glib.GObject              (wrapNewGObject)
 import System.Glib.GList                (fromGList)
 {#import Graphics.UI.Gtk.Types#}
 
@@ -95,7 +94,7 @@
 
 #if GTK_CHECK_VERSION(2,14,0)
 -- | Returns a list of the 'Window's that belong to @windowGroup@.
--- 
+--
 -- * Available since Gtk+ version 2.14
 --
 windowGroupListWindows :: WindowGroupClass self
diff --git a/Graphics/UI/GtkInternals.chs b/Graphics/UI/GtkInternals.chs
--- a/Graphics/UI/GtkInternals.chs
+++ b/Graphics/UI/GtkInternals.chs
@@ -34,4 +34,4 @@
 
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.General.DNDTypes#} (mkTargetList)
-{#import Graphics.UI.Gtk.Multiline.Types#} 
+{#import Graphics.UI.Gtk.Multiline.Types#}
diff --git a/Gtk2HsSetup.hs b/Gtk2HsSetup.hs
--- a/Gtk2HsSetup.hs
+++ b/Gtk2HsSetup.hs
@@ -129,7 +129,7 @@
             Just ('.':_)                -> True
             Just ('-':n:_) | isNumber n -> True
             _                           -> False
-        
+
 -- The following code is a big copy-and-paste job from the sources of
 -- Cabal 1.8 just to be able to fix a field in the package file. Yuck.
 
diff --git a/SetupMain.hs b/SetupMain.hs
--- a/SetupMain.hs
+++ b/SetupMain.hs
@@ -10,4 +10,4 @@
 main = do
   checkGtk2hsBuildtools [typeGenProgram, signalGenProgram, c2hsLocal]
   defaultMainWithHooks gtk2hsUserHooks
-  
+
diff --git a/demo/actionMenu/ActionMenu.hs b/demo/actionMenu/ActionMenu.hs
--- a/demo/actionMenu/ActionMenu.hs
+++ b/demo/actionMenu/ActionMenu.hs
@@ -1,7 +1,6 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE OverloadedStrings #-}
 import Graphics.UI.Gtk
-import Control.Monad.IO.Class (liftIO)
 import Data.Text (Text)
 
 -- A function like this can be used to tag string literals for i18n.
diff --git a/demo/buttonbox/ButtonBox.hs b/demo/buttonbox/ButtonBox.hs
--- a/demo/buttonbox/ButtonBox.hs
+++ b/demo/buttonbox/ButtonBox.hs
@@ -1,7 +1,6 @@
 module Main (main) where
 
 import Graphics.UI.Gtk
-import Control.Monad.IO.Class (liftIO)
 
 main :: IO ()
 main = do
diff --git a/demo/fastdraw/FastDraw.hs b/demo/fastdraw/FastDraw.hs
--- a/demo/fastdraw/FastDraw.hs
+++ b/demo/fastdraw/FastDraw.hs
@@ -4,19 +4,11 @@
 -- Example of an drawing graphics onto a canvas.
 import Graphics.UI.Gtk
 
-import Data.Array.MArray
-import Data.Word
 import Data.IORef
-import Control.Monad ( when )
-import Control.Monad.IO.Class ( liftIO )
-import Data.Array.Base ( unsafeWrite )
 import Graphics.Rendering.Cairo
 import Foreign (allocaArray)
 import Graphics.Rendering.Cairo.Types (PixelData)
 import Foreign.Storable (Storable(..))
-import Control.Monad.Trans.Reader (ask, runReaderT)
-import Graphics.Rendering.Cairo.Internal (runRender)
-import Control.Monad.Trans.Class (MonadTrans(..))
 import Foreign.C (CUChar)
 import Control.Applicative ((<$>))
 
diff --git a/demo/gtkbuilder/GtkBuilderTest.hs b/demo/gtkbuilder/GtkBuilderTest.hs
--- a/demo/gtkbuilder/GtkBuilderTest.hs
+++ b/demo/gtkbuilder/GtkBuilderTest.hs
@@ -1,7 +1,6 @@
 module Main where
 
 import Graphics.UI.Gtk
-import Control.Monad.IO.Class (MonadIO(..))
 
 main = do
         initGUI
diff --git a/demo/hello/World.hs b/demo/hello/World.hs
--- a/demo/hello/World.hs
+++ b/demo/hello/World.hs
@@ -2,7 +2,6 @@
 module Main (Main.main) where
 
 import Graphics.UI.Gtk
-import Control.Monad.IO.Class (MonadIO(..))
 
 main :: IO ()
 main = do
diff --git a/demo/menu/ComboDemo.hs b/demo/menu/ComboDemo.hs
--- a/demo/menu/ComboDemo.hs
+++ b/demo/menu/ComboDemo.hs
@@ -2,9 +2,6 @@
 module Main where
 
 import Graphics.UI.Gtk
-import Control.Concurrent.MVar
-import Control.Monad ( liftM )
-import Data.Maybe ( fromMaybe )
 import Data.List ( findIndex )
 import Control.Monad.IO.Class (MonadIO(..))
 import qualified Data.Text as T
diff --git a/demo/menu/MenuDemo.hs b/demo/menu/MenuDemo.hs
--- a/demo/menu/MenuDemo.hs
+++ b/demo/menu/MenuDemo.hs
@@ -1,7 +1,6 @@
 module Main (main) where
 
 import Graphics.UI.Gtk
-import Control.Monad.IO.Class (MonadIO(..))
 
 {-
   widgets that go into making a menubar and submenus:
diff --git a/demo/overlay/Overlay.hs b/demo/overlay/Overlay.hs
--- a/demo/overlay/Overlay.hs
+++ b/demo/overlay/Overlay.hs
@@ -1,7 +1,6 @@
 module Main (main) where
 
 import Graphics.UI.Gtk
-import Control.Monad.IO.Class (liftIO)
 
 main :: IO ()
 main = do
diff --git a/demo/unicode/Arabic.hs b/demo/unicode/Arabic.hs
--- a/demo/unicode/Arabic.hs
+++ b/demo/unicode/Arabic.hs
@@ -3,7 +3,6 @@
 
 import Data.Char
 import qualified Data.Text as T
-import Control.Exception
 import Control.Applicative
 import Data.Text (Text)
 
diff --git a/gtk3.cabal b/gtk3.cabal
--- a/gtk3.cabal
+++ b/gtk3.cabal
@@ -1,5 +1,5 @@
 Name:           gtk3
-Version:        0.13.0.3
+Version:        0.13.1
 License:        LGPL-2.1
 License-file:   COPYING
 Copyright:      (c) 2001-2010 The Gtk2Hs Team
@@ -146,7 +146,7 @@
         if flag(have-quartz-gtk)
           cpp-options:    -DHAVE_QUARTZ_GTK
 
-        build-tools:    gtk2hsC2hs >= 0.13.11,
+        build-tools:    gtk2hsC2hs >= 0.13.12,
                         gtk2hsHookGenerator, gtk2hsTypeGen
 
         exposed-modules:
@@ -396,7 +396,7 @@
     main-is: ActionMenu.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers, text
+    build-depends: gtk3==0.13.1, base, transformers, text
 
 Executable gtk2hs-demo-buttonBox
     default-language: Haskell98
@@ -404,7 +404,7 @@
     main-is: ButtonBox.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers
+    build-depends: gtk3==0.13.1, base, transformers
 
 Executable gtk2hs-demo-carsim
     default-language: Haskell98
@@ -412,7 +412,7 @@
     main-is: CarSim.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers, time, cairo
+    build-depends: gtk3==0.13.1, base, transformers, time, cairo
 
 Executable gtk2hs-demo-progress
     default-language: Haskell98
@@ -420,7 +420,7 @@
     main-is: Progress.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers
+    build-depends: gtk3==0.13.1, base, transformers
 
 Executable gtk2hs-demo-progressThreadedRTS
     default-language: Haskell98
@@ -428,7 +428,7 @@
     main-is: ProgressThreadedRTS.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers
+    build-depends: gtk3==0.13.1, base, transformers
     ghc-options: -threaded
 
 Executable gtk2hs-demo-fastDraw
@@ -437,7 +437,7 @@
     main-is: FastDraw.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers, array, cairo
+    build-depends: gtk3==0.13.1, base, transformers, array, cairo
 
 Executable gtk2hs-demo-fonts
     default-language: Haskell98
@@ -445,7 +445,7 @@
     main-is: Fonts.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base
+    build-depends: gtk3==0.13.1, base
 
 Executable gtk2hs-demo-builder
     default-language: Haskell98
@@ -453,7 +453,7 @@
     main-is: GtkBuilderTest.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers
+    build-depends: gtk3==0.13.1, base, transformers
 
 Executable gtk2hs-demo-helloworld
     default-language: Haskell98
@@ -461,7 +461,7 @@
     main-is: World.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers
+    build-depends: gtk3==0.13.1, base, transformers
 
 Executable gtk2hs-demo-layout
     default-language: Haskell98
@@ -469,7 +469,7 @@
     main-is: Layout.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers, cairo, text
+    build-depends: gtk3==0.13.1, base, transformers, cairo, text
 
 Executable gtk2hs-demo-menudemo
     default-language: Haskell98
@@ -477,7 +477,7 @@
     main-is: MenuDemo.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers, text
+    build-depends: gtk3==0.13.1, base, transformers, text
 
 Executable gtk2hs-demo-combodemo
     default-language: Haskell98
@@ -485,7 +485,7 @@
     main-is: ComboDemo.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, text, base, transformers
+    build-depends: gtk3==0.13.1, text, base, transformers
 
 Executable gtk2hs-demo-notebook
     default-language: Haskell98
@@ -493,7 +493,7 @@
     main-is: Notebook.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers, text
+    build-depends: gtk3==0.13.1, base, transformers, text
 
 Executable gtk2hs-demo-statusIcon
     default-language: Haskell98
@@ -501,7 +501,7 @@
     main-is: StatusIcon.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers
+    build-depends: gtk3==0.13.1, base, transformers
 
 Executable gtk2hs-demo-arabic
     default-language: Haskell98
@@ -509,7 +509,7 @@
     main-is: Arabic.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers, text
+    build-depends: gtk3==0.13.1, base, transformers, text
 
 Executable gtk2hs-demo-overlay
     default-language: Haskell98
@@ -517,4 +517,4 @@
     main-is: Overlay.hs
     if !flag(build-demos)
       buildable: False
-    build-depends: gtk3==0.13.0.3, base, transformers
+    build-depends: gtk3==0.13.1, base, transformers
diff --git a/hierarchy3.list b/hierarchy3.list
--- a/hierarchy3.list
+++ b/hierarchy3.list
@@ -21,7 +21,7 @@
 # * noEq	: do not make this type an instance of Eq; used
 #		  if a different equality instance is manually
 #		  defined later
-    GObject 
+    GObject
 	    AtkObject
 		    GtkAccessible		
 	    GdkKeymap				
@@ -29,11 +29,11 @@
 	    GdkAppLaunchContext		
 	    GtkPrintSettings		
 	    GtkPrintOperation		
-	    GtkPrintOperationPreview 
+	    GtkPrintOperationPreview
 	    GtkPageSetup			
 	    GtkPrintContext			
 	    GtkRecentChooser		
-	    GtkRecentManager	    
+	    GtkRecentManager	
         GdkWindow as DrawWindow, gdk_window_get_type
         GdkGLPixmap		if gtkglext
         GdkGLWindow		if gtkglext
@@ -41,6 +41,7 @@
 	GdkDisplay		
 	GdkVisual
 	GdkDevice
+	GdkFrameClock           if gtk-3.8
         GtkSettings
         GtkTextBuffer
             GtkSourceBuffer	if sourceview
@@ -62,7 +63,7 @@
             GtkSourceMark       if gtksourceview2
         GtkRecentFilter		
         GtkWidget
-				GtkHSV as HSV, gtk_hsv_get_type  
+				GtkHSV as HSV, gtk_hsv_get_type
                 GtkMisc
                     GtkLabel
                         GtkAccelLabel
@@ -71,7 +72,7 @@
                 GtkContainer
 				    GtkToolPalette		
 				    GtkToolItemGroup	
-                    WebKitWebView as WebView, webkit_web_view_get_type            if webkit 
+                    WebKitWebView as WebView, webkit_web_view_get_type            if webkit
                     GtkBin
                         GtkAlignment
                         GtkFrame
@@ -126,7 +127,7 @@
                             GtkFontSelection
 			    GtkFileChooserWidget	
                         GtkHBox
-						    GtkInfoBar 
+						    GtkInfoBar
                             GtkFileChooserButton	
                             GtkStatusbar
                     GtkFixed
@@ -179,8 +180,8 @@
 		    GtkCellRendererSpinner		
 		GtkCellRendererPixbuf
 		GtkCellRendererText
-		    GtkCellRendererAccel    
-		    GtkCellRendererSpin     
+		    GtkCellRendererAccel
+		    GtkCellRendererSpin
 		    GtkCellRendererCombo	
 		GtkCellRendererToggle
 		GtkCellRendererProgress	
@@ -195,7 +196,7 @@
 	GtkTreeSortable			
 	GtkTooltip				
 # These are derived from GObject:
-  	GtkStatusIcon                   
+  	GtkStatusIcon
         GtkTreeSelection
         GtkTreeModel
             GtkTreeStore
@@ -332,7 +333,7 @@
         GstAdapter                      as Adapter,             gst_adapter_get_type                    if gstreamer
         GstController                   as Controller,          gst_controller_get_type                 if gstreamer
 
-        WebKitWebFrame as WebFrame, webkit_web_frame_get_type          if webkit 
+        WebKitWebFrame as WebFrame, webkit_web_frame_get_type          if webkit
         WebKitWebSettings as WebSettings, webkit_web_settings_get_type    if webkit
         WebKitNetworkRequest as NetworkRequest, webkit_network_request_get_type  if webkit
         WebKitNetworkResponse as NetworkResponse, webkit_network_response_get_type    if webkit
