diff --git a/Graphics/UI/Gtk.chs b/Graphics/UI/Gtk.chs
--- a/Graphics/UI/Gtk.chs
+++ b/Graphics/UI/Gtk.chs
@@ -47,6 +47,7 @@
   module Graphics.UI.Gtk.General.IconTheme,
   module Graphics.UI.Gtk.General.StockItems,
   module Graphics.UI.Gtk.General.Selection,
+  module Graphics.UI.Gtk.General.Settings,
   module Graphics.UI.Gtk.General.Drag,
   module Graphics.UI.Gtk.Gdk.Keys,
   module Graphics.UI.Gtk.General.Style,
@@ -56,13 +57,19 @@
   -- * Drawing and other Low-Level Operations
   module Graphics.UI.Gtk.Gdk.AppLaunchContext,
   module Graphics.UI.Gtk.Gdk.Cursor,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.Gdk.Drawable,
+#endif
   module Graphics.UI.Gtk.Gdk.DrawWindow,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.Gdk.Region,
+#endif
 --  module Graphics.UI.Gtk.Gdk.GC,
   module Graphics.UI.Gtk.Gdk.EventM,
   module Graphics.UI.Gtk.Gdk.Pixbuf,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.Gdk.Pixmap,
+#endif
   module Graphics.UI.Gtk.Gdk.Screen,
   module Graphics.UI.Gtk.Gdk.Keymap,
   module Graphics.UI.Gtk.Gdk.Display,
@@ -141,14 +148,20 @@
   module Graphics.UI.Gtk.ModelView.TreeViewColumn,
   -- * Menus, combo box, toolbar
   module Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.MenuComboToolbar.Combo,
+#endif
   module Graphics.UI.Gtk.MenuComboToolbar.ComboBox,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry,
+#endif
   module Graphics.UI.Gtk.MenuComboToolbar.Menu,
   module Graphics.UI.Gtk.MenuComboToolbar.MenuBar,
   module Graphics.UI.Gtk.MenuComboToolbar.MenuItem,
   module Graphics.UI.Gtk.MenuComboToolbar.MenuShell,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.MenuComboToolbar.OptionMenu,
+#endif
   module Graphics.UI.Gtk.MenuComboToolbar.ImageMenuItem,
   module Graphics.UI.Gtk.MenuComboToolbar.RadioMenuItem,
   module Graphics.UI.Gtk.MenuComboToolbar.TearoffMenuItem,
@@ -173,17 +186,21 @@
   module Graphics.UI.Gtk.Selectors.ColorSelection,
   module Graphics.UI.Gtk.Selectors.ColorSelectionDialog,
   module Graphics.UI.Gtk.Selectors.ColorButton,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.Selectors.FileSelection,
+#endif
   module Graphics.UI.Gtk.Selectors.FontSelection,
   module Graphics.UI.Gtk.Selectors.FontSelectionDialog,
   module Graphics.UI.Gtk.Selectors.FontButton,
 #if GTK_CHECK_VERSION(2,14,0)
   module Graphics.UI.Gtk.Selectors.HSV,
 #endif
+#if GTK_MAJOR_VERSION < 3
   -- * Special-purpose features
   module Graphics.UI.Gtk.Special.Ruler,
   module Graphics.UI.Gtk.Special.HRuler,
   module Graphics.UI.Gtk.Special.VRuler,
+#endif
 --  module InputDialog,
   -- ** File chooser
   module Graphics.UI.Gtk.Selectors.FileChooser,
@@ -238,7 +255,9 @@
   module Graphics.UI.Gtk.Misc.IMContextSimple,
   module Graphics.UI.Gtk.Misc.SizeGroup,
   module Graphics.UI.Gtk.Misc.Tooltip,
+#if GTK_MAJOR_VERSION < 3
   module Graphics.UI.Gtk.Misc.Tooltips,
+#endif
   module Graphics.UI.Gtk.Misc.Viewport,
   -- * Abstract base classes
   module Graphics.UI.Gtk.Abstract.Box,
@@ -278,6 +297,7 @@
 import Graphics.UI.Gtk.General.IconTheme
 import Graphics.UI.Gtk.General.StockItems
 import Graphics.UI.Gtk.General.Selection
+import Graphics.UI.Gtk.General.Settings
 import Graphics.UI.Gtk.General.Drag
 import Graphics.UI.Gtk.General.Clipboard
 -- drawing
@@ -286,13 +306,19 @@
 import Graphics.UI.Gtk.General.RcStyle
 import Graphics.UI.Gtk.Gdk.AppLaunchContext
 import Graphics.UI.Gtk.Gdk.Cursor
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Gdk.Drawable
+#endif
 import Graphics.UI.Gtk.Gdk.DrawWindow
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Gdk.Region		hiding (makeNewRegion)
+#endif
 --import Graphics.UI.Gtk.Gdk.GC
 import Graphics.UI.Gtk.Gdk.EventM
 import Graphics.UI.Gtk.Gdk.Pixbuf
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Gdk.Pixmap
+#endif
 import Graphics.UI.Gtk.Gdk.Screen
 import Graphics.UI.Gtk.Gdk.Keymap
 import Graphics.UI.Gtk.Gdk.Display
@@ -375,15 +401,21 @@
 import Graphics.UI.Gtk.ModelView.TreeView
 import Graphics.UI.Gtk.ModelView.TreeViewColumn
 -- menus, combo box, toolbar
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.MenuComboToolbar.Combo
+#endif
 import Graphics.UI.Gtk.MenuComboToolbar.ComboBox
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry
+#endif
 -- import ItemFactory
 import Graphics.UI.Gtk.MenuComboToolbar.Menu
 import Graphics.UI.Gtk.MenuComboToolbar.MenuBar
 import Graphics.UI.Gtk.MenuComboToolbar.MenuItem
 import Graphics.UI.Gtk.MenuComboToolbar.MenuShell
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.MenuComboToolbar.OptionMenu
+#endif
 import Graphics.UI.Gtk.MenuComboToolbar.ImageMenuItem
 import Graphics.UI.Gtk.MenuComboToolbar.RadioMenuItem
 import Graphics.UI.Gtk.MenuComboToolbar.CheckMenuItem
@@ -409,7 +441,9 @@
 import Graphics.UI.Gtk.Selectors.ColorSelection
 import Graphics.UI.Gtk.Selectors.ColorSelectionDialog
 import Graphics.UI.Gtk.Selectors.ColorButton
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Selectors.FileSelection
+#endif
 import Graphics.UI.Gtk.Selectors.FileChooser
 import Graphics.UI.Gtk.Selectors.FileChooserDialog
 import Graphics.UI.Gtk.Selectors.FileChooserWidget
@@ -421,10 +455,12 @@
 #if GTK_CHECK_VERSION(2,14,0)
 import Graphics.UI.Gtk.Selectors.HSV
 #endif
+#if GTK_MAJOR_VERSION < 3
 -- Special-purpose features
 import Graphics.UI.Gtk.Special.Ruler
 import Graphics.UI.Gtk.Special.HRuler
 import Graphics.UI.Gtk.Special.VRuler
+#endif
 --import InputDialog
 -- layout containers
 import Graphics.UI.Gtk.Layout.Alignment
@@ -473,7 +509,9 @@
 import Graphics.UI.Gtk.Misc.IMContextSimple
 import Graphics.UI.Gtk.Misc.SizeGroup
 import Graphics.UI.Gtk.Misc.Tooltip
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Misc.Tooltips
+#endif
 import Graphics.UI.Gtk.Misc.Viewport
 --import Accessible
 -- abstract base classes
@@ -484,11 +522,13 @@
 import Graphics.UI.Gtk.Abstract.Misc
 import Graphics.UI.Gtk.Abstract.IMContext
 import Graphics.UI.Gtk.Abstract.Object (
+#if GTK_MAJOR_VERSION < 3
   Object,
   ObjectClass,
   castToObject,
   gTypeObject,
   toObject,
+#endif
   GWeakNotify,
   objectWeakref,
   objectWeakunref,
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
@@ -52,9 +52,6 @@
 -- Besides adding widgets at the start or the end of a box, you can also
 -- specify the padding around each widget (in pixels) and a 'Packing'
 -- parameter that denotes how to fill up unused space.
--- The functions 'boxPackStartDefaults' or 'boxPackEndDefaults' 
--- are a convenient way to pack widgets into a 'Box' without specifying
--- these extra paramters.
 --
 -- While the right amount of padding around each widget is a matter of
 -- appearance, the 'Packing' paramter specifies the way the widgets in
@@ -66,9 +63,9 @@
 --
 -- Because 'Box' is a 'Container', you may also use
 -- 'Graphics.UI.Gtk.Abstract.Container.containerAdd' to insert widgets into
--- the box, and they will be packed as if with 'boxPackStartDefaults'. Use
--- 'Graphics.UI.Gtk.Abstract.Container.containerRemove' to remove widgets
--- from the 'Box'.
+-- the box, and they will be packed as if with 'boxPackStart' with 'PackRepel'
+-- and 0 padding. Use 'Graphics.UI.Gtk.Abstract.Container.containerRemove' to
+-- remove widgets from the 'Box'.
 --
 -- Use 'boxSetHomogeneous' to specify whether or not all children of the
 -- 'Box' are forced to get the same amount of space. Note that the
@@ -108,8 +105,10 @@
 -- * Methods
   boxPackStart,
   boxPackEnd,
+#if GTK_MAJOR_VERSION < 3
   boxPackStartDefaults,
   boxPackEndDefaults,
+#endif
   boxGetHomogeneous,
   boxSetHomogeneous,
   boxGetSpacing,
@@ -196,9 +195,11 @@
     (fromIntegral padding)
   where (expand, fill) = fromPacking packing
 
+#if GTK_MAJOR_VERSION < 3
 -- | Like 'boxPackStart' but uses the default parameters 'PackRepel' and 0 for
 -- padding.
 --
+-- Removed in Gtk3
 boxPackStartDefaults :: (BoxClass self, WidgetClass widget) => self
  -> widget -- ^ @widget@ - the 'Widget' to be added to the box.
  -> IO ()
@@ -210,6 +211,7 @@
 -- | Like 'boxPackEnd' but uses the default parameters 'PackRepel' and 0 for
 -- padding.
 --
+-- Removed in Gtk3
 boxPackEndDefaults :: (BoxClass self, WidgetClass widget) => self
  -> widget -- ^ @widget@ - the 'Widget' to be added to the box.
  -> IO ()
@@ -217,6 +219,7 @@
   {# call box_pack_end_defaults #}
     (toBox self)
     (toWidget widget)
+#endif
 
 -- | Sets the homogeneous property,
 -- controlling whether or not all children of the box are given equal space
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
@@ -37,6 +37,8 @@
 -- derive from 'Object' rather than 'GObject' do so for backward compatibility
 -- reasons.
 --
+-- Object has been removed in Gt3k, but this module still provides useful
+-- functions.
 
 -- * Class Hierarchy
 -- |
@@ -51,12 +53,13 @@
 -- |         +----'Tooltips'
 -- |         +----'TreeViewColumn'
 -- @
-
+#if GTK_MAJOR_VERSION < 3
 -- * Types
   Object,
   ObjectClass,
   castToObject, gTypeObject,
   toObject,
+#endif
 
 -- * Methods
   makeNewObject,
@@ -70,7 +73,6 @@
   objectDestroy,
   notifyProperty
   ) where
-
 import Control.Monad (when)
 
 import System.Glib.FFI
@@ -104,13 +106,16 @@
 foreign import ccall unsafe "gtk_object_sink"
   objectSink :: Ptr obj -> IO ()
 #endif
-
 -- This is a convenience function to generate a new widget. It adds the
 -- finalizer with the method described under objectSink.
 --
 -- * The constr argument is the contructor of the specific object.
 --
+#if GTK_MAJOR_VERSION < 3
 makeNewObject :: ObjectClass obj => 
+#else
+makeNewObject :: GObjectClass obj => 
+#endif
   (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
 makeNewObject (constr, objectUnref) generator = do
   objPtr <- generator
@@ -132,7 +137,11 @@
 -- | Attach a callback that will be called after the
 -- destroy hooks have been called
 --
+#if GTK_MAJOR_VERSION < 3
 objectWeakref :: ObjectClass o => o -> IO () -> IO GWeakNotify
+#else
+objectWeakref :: GObjectClass o => o -> IO () -> IO GWeakNotify
+#endif
 objectWeakref obj uFun = do
   funPtrContainer <- newIORef nullFunPtr
   uFunPtr <- mkDestructor $ \_ _ -> do
@@ -145,7 +154,11 @@
 
 -- | Detach a weak destroy callback function
 --
+#if GTK_MAJOR_VERSION < 3
 objectWeakunref :: ObjectClass o => o -> GWeakNotify -> IO ()
+#else
+objectWeakunref :: GObjectClass o => o -> GWeakNotify -> IO ()
+#endif
 objectWeakunref obj fun = 
   {#call unsafe g_object_weak_unref#} (toGObject obj) fun nullPtr
 
@@ -157,7 +170,11 @@
 -- the reference that they hold. May result in finalization of the object if
 -- all references are released.
 --
+#if GTK_MAJOR_VERSION < 3
 objectDestroy :: ObjectClass self => Signal self (IO ())
+#else
+objectDestroy :: WidgetClass self => Signal self (IO ())
+#endif
 objectDestroy = Signal (connect_NONE__NONE "destroy")
 
 -- | Register a notify callback that is triggered when the given property
@@ -169,5 +186,9 @@
 --   runtime if the passed-in attribute is not a property of the class
 --   with which it was registered.
 --
+#if GTK_MAJOR_VERSION < 3
 notifyProperty :: ObjectClass self => ReadWriteAttr self a b -> Signal self (IO ())
+#else
+notifyProperty :: GObjectClass self => ReadWriteAttr self a b -> Signal self (IO ())
+#endif
 notifyProperty attr = Signal (\on obj cb -> connect_PTR__NONE ("notify::"++show attr) on obj (const cb))
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
@@ -51,9 +51,10 @@
 -- * Methods
   rangeGetAdjustment,
   rangeSetAdjustment,
-  UpdateType(..),
+#if GTK_MAJOR_VERSION < 3
   rangeGetUpdatePolicy,
   rangeSetUpdatePolicy,
+#endif
   rangeGetInverted,
   rangeSetInverted,
   rangeGetValue,
@@ -78,7 +79,9 @@
 #endif
 
 -- * Attributes
+#if GTK_MAJOR_VERSION < 3
   rangeUpdatePolicy,
+#endif
   rangeAdjustment,
   rangeInverted,
 #if GTK_CHECK_VERSION(2,10,0)
@@ -121,7 +124,10 @@
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
-import Graphics.UI.Gtk.General.Enums	(UpdateType(..), ScrollType(..))
+import Graphics.UI.Gtk.General.Enums	(ScrollType(..))
+#if GTK_MAJOR_VERSION < 3
+import Graphics.UI.Gtk.General.Enums	(UpdateType(..))
+#endif
 import Graphics.UI.Gtk.General.Structs	(Rectangle(..))
 
 {# context lib="gtk" prefix="gtk" #}
@@ -155,8 +161,10 @@
     (toRange self)
     adjustment
 
+#if GTK_MAJOR_VERSION < 3
 -- | Gets the update policy of @range@. See 'rangeSetUpdatePolicy'.
 --
+-- Removed in Gtk3.
 rangeGetUpdatePolicy :: RangeClass self => self
  -> IO UpdateType -- ^ returns the current update policy
 rangeGetUpdatePolicy self =
@@ -164,6 +172,7 @@
   {# call unsafe range_get_update_policy #}
     (toRange self)
 
+
 -- | Sets the update policy for the range. 'UpdateContinuous' means that
 -- anytime the range slider is moved, the range value will change and the
 -- value_changed signal will be emitted. 'UpdateDelayed' means that the value
@@ -172,6 +181,7 @@
 -- 'UpdateDiscontinuous' means that the value will only be updated when the
 -- user releases the button and ends the slider drag operation.
 --
+-- Removed in Gtk3.
 rangeSetUpdatePolicy :: RangeClass self => self
  -> UpdateType -- ^ @policy@ - update policy
  -> IO ()
@@ -179,6 +189,7 @@
   {# call range_set_update_policy #}
     (toRange self)
     ((fromIntegral . fromEnum) policy)
+#endif
 
 -- | Gets the value set by 'rangeSetInverted'.
 --
@@ -398,14 +409,17 @@
 --------------------
 -- Attributes
 
+#if GTK_MAJOR_VERSION < 3
 -- | How the range should be updated on the screen.
 --
 -- Default value: 'UpdateContinuous'
---
+-- 
+-- Removed in Gtk3.
 rangeUpdatePolicy :: RangeClass self => Attr self UpdateType
 rangeUpdatePolicy = newAttr
   rangeGetUpdatePolicy
   rangeSetUpdatePolicy
+#endif
 
 -- | The 'Adjustment' that contains the current value of this range object.
 --
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
@@ -63,11 +63,15 @@
   castToWidget, gTypeWidget,
   toWidget,
   EventMask(..),
+#if GTK_MAJOR_VERSION < 3
   ExtensionMode(..),
+#endif
   GType,
   KeyVal,
+#if GTK_MAJOR_VERSION < 3
   Region,
   Bitmap,
+#endif
   Requisition(..),
   Rectangle(..),
   Color,
@@ -84,7 +88,9 @@
   widgetShowNow,
   widgetHide,
   widgetShowAll,
+#if GTK_MAJOR_VERSION < 3
   widgetHideAll,
+#endif
   widgetDestroy,
   widgetQueueDraw,
   widgetQueueResize,
@@ -111,43 +117,56 @@
   widgetSetSensitive,
   widgetSetSensitivity,
   widgetGetParentWindow,
+#if GTK_MAJOR_VERSION < 3
   widgetGetDrawWindow,
+#endif
+  widgetGetWindow,
   widgetDelEvents,
   widgetAddEvents,
   widgetGetEvents,
   widgetSetEvents,
+#if GTK_MAJOR_VERSION < 3
   widgetSetExtensionEvents,
   widgetGetExtensionEvents,
+#endif
   widgetGetToplevel,
   widgetGetAncestor,
+#if GTK_MAJOR_VERSION < 3
   widgetGetColormap,
   widgetSetColormap,
+#endif
   widgetGetPointer,
   widgetIsAncestor,
   widgetTranslateCoordinates,
   widgetSetStyle,
   widgetGetStyle,
+#if GTK_MAJOR_VERSION < 3
   widgetPushColormap,
   widgetPopColormap,
   widgetSetDefaultColormap,
-  widgetGetDefaultStyle,
   widgetGetDefaultColormap,
+#endif
+  widgetGetDefaultStyle,
   widgetSetDirection,
   widgetGetDirection,
   widgetSetDefaultDirection,
   widgetGetDefaultDirection,
+#if GTK_MAJOR_VERSION < 3
   widgetShapeCombineMask,
 #if GTK_CHECK_VERSION(2,10,0)
   widgetInputShapeCombineMask,
 #endif
+#endif
 #if GTK_CHECK_VERSION(2,12,0)
   widgetGetTooltipWindow,
   widgetSetTooltipWindow,
   widgetTriggerTooltipQuery,
 #endif
+#if GTK_MAJOR_VERSION < 3
 #if GTK_CHECK_VERSION(2,14,0)
   widgetGetSnapshot,
 #endif
+#endif
   widgetPath,
   widgetClassPath,
   widgetGetCompositeName,
@@ -167,13 +186,17 @@
   widgetCreateLayout,
   widgetRenderIcon,
   widgetQueueDrawArea,
+#if GTK_MAJOR_VERSION < 3
   widgetResetShapes,
+#endif
   widgetSetAppPaintable,
   widgetSetDoubleBuffered,
   widgetSetRedrawOnAllocate,
   widgetSetCompositeName,
+#if GTK_MAJOR_VERSION < 3
   widgetSetScrollAdjustments,
   widgetRegionIntersect,
+#endif
   widgetGetAccessible,
   widgetChildFocus,
   widgetGetChildVisible,
@@ -196,7 +219,9 @@
   widgetAddMnemonicLabel,
   widgetRemoveMnemonicLabel,
 #if GTK_CHECK_VERSION(2,10,0)
+#if GTK_MAJOR_VERSION < 3
   widgetGetAction,
+#endif
   widgetIsComposited,
 #endif
 #endif
@@ -206,10 +231,16 @@
   widgetSetCanFocus,
   widgetGetAllocation,
 #endif
+#if GTK_CHECK_VERSION(3,0,0)
+  widgetGetAllocatedWidth,
+  widgetGetAllocatedHeight,
+#endif
   widgetGetState,
   widgetSetState,
+#if GTK_MAJOR_VERSION < 3
   widgetGetSavedState,
   widgetGetSize,
+#endif
   widgetEvent,
 
 -- * Attributes
@@ -230,10 +261,14 @@
   widgetStyle,
   widgetState,
   widgetEvents,
+#if GTK_MAJOR_VERSION < 3
   widgetExtensionEvents,
+#endif
   widgetNoShowAll,
   widgetChildVisible,
+#if GTK_MAJOR_VERSION < 3
   widgetColormap,
+#endif
   widgetCompositeName,
   widgetDirection,
   widgetTooltipMarkup,
@@ -244,6 +279,9 @@
   widgetGetRealized,
   widgetGetMapped,
 #endif
+#if GTK_MAJOR_VERSION >= 3
+  widgetGetStyleContext,
+#endif
 
 -- * Signals
   realize,
@@ -266,6 +304,9 @@
   accelClosuresChanged,
   screenChanged,
   queryTooltip,
+#if GTK_CHECK_VERSION(3,0,0)
+  draw,
+#endif
 
 -- * Events
   buttonPressEvent,
@@ -388,18 +429,27 @@
 import Graphics.UI.Gtk.General.DNDTypes (Atom (Atom), SelectionTag)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
-import Graphics.UI.Gtk.Gdk.Enums	(EventMask(..), ExtensionMode(..))
+import Graphics.UI.Gtk.Gdk.Enums	(EventMask(..)
+#if GTK_MAJOR_VERSION < 3
+    , ExtensionMode(..)
+#endif
+    )
 import Graphics.UI.Gtk.Gdk.Keys         (KeyVal)
+#if GTK_MAJOR_VERSION < 3
 {#import Graphics.UI.Gtk.Gdk.Region#}	(Region(..), makeNewRegion)
 {#import Graphics.UI.Gtk.Gdk.Pixmap#} (Bitmap)
+#endif
 import Graphics.UI.Gtk.General.Structs	(Allocation, Rectangle(..)
 					,Requisition(..), Color, IconSize(..)
                                         ,Point
 #if !GTK_CHECK_VERSION(2,18,0)
                                         ,widgetGetState
 #endif
+#if GTK_MAJOR_VERSION < 3
                                         ,widgetGetSavedState
-					,widgetGetDrawWindow, widgetGetSize)
+					,widgetGetDrawWindow, widgetGetSize
+#endif
+					)
 import Graphics.UI.Gtk.Gdk.Events	(Event(..), marshalEvent,
   marshExposeRect,
   EventButton,
@@ -445,6 +495,10 @@
 import Graphics.UI.Gtk.General.StockItems (StockId)
 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.Internal (Render(..))
+#endif
 
 {# context lib="gtk" prefix="gtk" #}
 
@@ -495,12 +549,15 @@
   {# call widget_show_all #}
     (toWidget self)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Recursively hides a widget and any child widgets.
 --
+-- Removed in Gtk3.
 widgetHideAll :: WidgetClass self => self -> IO ()
 widgetHideAll self =
   {# call widget_hide_all #}
     (toWidget self)
+#endif
 
 -- | Destroys a widget. Equivalent to
 --   'Graphics.UI.Gtk.Abstract.Object.objectDestroy'.
@@ -893,6 +950,7 @@
     (toWidget self)
     (fromIntegral $ fromFlags events)
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:4f2c d:781
 -- | Sets the extension events mask to @mode@. See 'ExtensionMode' and
 -- 'inputSetExtensionEvents'.
@@ -915,6 +973,7 @@
   liftM (toFlags . fromIntegral) $
   {# call widget_get_extension_events #}
     (toWidget self)
+#endif
 
 -- %hash c:270b d:8877
 -- | This function returns the topmost widget in the container hierarchy
@@ -949,7 +1008,7 @@
   if ptr==nullPtr then return Nothing else
     liftM Just $ makeNewObject mkWidget (return ptr)
 
-
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:bd95 d:eb94
 -- | Gets the colormap that will be used to render @widget@.
 --
@@ -972,6 +1031,7 @@
   {# call gtk_widget_set_colormap #}
     (toWidget self)
     colormap
+#endif
 
 -- %hash c:3522 d:5637
 -- | Obtains the location of the mouse pointer in widget coordinates. Widget
@@ -1060,6 +1120,7 @@
   {# call gtk_widget_ensure_style #} (toWidget widget)
   makeNewGObject mkStyle $ {# call gtk_widget_get_style #} (toWidget widget)
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:d5ed d:dc10
 -- | Pushes @cmap@ onto a global stack of colormaps; the topmost colormap on
 -- the stack will be used to create all widgets. Remove @cmap@ with
@@ -1090,6 +1151,7 @@
 widgetSetDefaultColormap colormap =
   {# call gtk_widget_set_default_colormap #}
     colormap
+#endif
 
 -- %hash c:e71b d:72c2
 -- | Returns the default style used by all widgets initially.
@@ -1101,6 +1163,7 @@
   makeNewGObject mkStyle $
   {# call gtk_widget_get_default_style #}
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:d731 d:52bf
 -- | Obtains the default colormap used to create widgets.
 --
@@ -1109,6 +1172,7 @@
 widgetGetDefaultColormap =
   makeNewGObject mkColormap $
   {# call gtk_widget_get_default_colormap #}
+#endif
 
 -- | Sets the reading direction on a particular widget. This direction
 -- controls the primary direction for widgets containing text, and also the
@@ -1157,6 +1221,7 @@
   liftM (toEnum . fromIntegral) $
   {# call gtk_widget_get_default_direction #}
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:c7ba d:3a9c
 -- | Sets a shape for this widget's 'DrawWindow'. This allows for transparent
 -- windows etc., see 'windowShapeCombineMask' for more information.
@@ -1175,7 +1240,9 @@
         (castPtr bitmapPtr)
         (fromIntegral offsetX)
         (fromIntegral offsetY)
+#endif
 
+#if GTK_MAJOR_VERSION < 3
 #if GTK_CHECK_VERSION(2,10,0)
 -- %hash c:3c29 d:68e2
 -- | Sets an input shape for this widget's GDK window. This allows for windows
@@ -1199,6 +1266,7 @@
         (fromIntegral offsetX)
         (fromIntegral offsetY)
 #endif
+#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
@@ -1242,6 +1310,19 @@
 #endif
 
 #if GTK_CHECK_VERSION(2,14,0)
+-- | Returns the widget's window if it is realized, Nothing otherwise
+--
+-- * Available since Gtk+ version 2.14
+--
+widgetGetWindow :: WidgetClass self => self -> IO (Maybe DrawWindow)
+widgetGetWindow self =
+  maybeNull (makeNewGObject mkDrawWindow) $
+  {# call gtk_widget_get_window #}
+    (toWidget self)
+#endif
+
+#if GTK_MAJOR_VERSION < 3
+#if GTK_CHECK_VERSION(2,14,0)
 -- | Create a 'Pixmap' of the contents of the widget and its children.
 -- 
 -- Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on
@@ -1272,6 +1353,7 @@
      (toWidget widget)
      (castPtr clipRectPtr)
 #endif
+#endif
 
 -- %hash c:7e36 d:616f
 -- | Obtains the full path to @widget@. The path is simply the name of a
@@ -1657,6 +1739,7 @@
     (fromIntegral width)
     (fromIntegral height)
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:5ffb d:3e1a
 -- | Recursively resets the shape on this widget and its descendants.
 --
@@ -1664,6 +1747,7 @@
 widgetResetShapes self =
   {# call gtk_widget_reset_shapes #}
     (toWidget self)
+#endif
 
 -- | Sets whether the application intends to draw on the widget in response
 --   to an 'onExpose' signal.
@@ -1752,12 +1836,14 @@
     (toWidget self)
     namePtr
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:5c58 d:6895
 -- | For widgets that support scrolling, sets the scroll adjustments and
 -- returns @True@. For widgets that don't support scrolling, does nothing and
 -- returns @False@. Widgets that don't support scrolling can be scrolled by
 -- placing them in a 'Viewport', which does support scrolling.
 --
+-- Removed in Gtk3. 
 widgetSetScrollAdjustments :: WidgetClass self => self
  -> Maybe Adjustment -- ^ @hadjustment@ - an adjustment for horizontal scrolling, or
                -- @Nothing@
@@ -1770,7 +1856,10 @@
     (toWidget self)
     (fromMaybe (Adjustment nullForeignPtr) hadjustment)
     (fromMaybe (Adjustment nullForeignPtr) vadjustment)
+#endif
 
+
+#if GTK_MAJOR_VERSION < 3
 -- | Computes the intersection of a widget's area and @region@, returning
 -- the intersection. The result may be empty, use
 -- 'Graphics.UI.Gtk.Gdk.Region.regionEmpty' to check.
@@ -1790,6 +1879,7 @@
     (toWidget self)
     region
   makeNewRegion intersectionPtr
+#endif
 
 -- %hash c:3c94 d:cdb6
 -- | Returns the accessible object that describes the widget to an assistive
@@ -1805,10 +1895,19 @@
 -- The documentation of the ATK library contains more information about
 -- accessible objects and their uses.
 --
+-- Returns a GObject in Gtk3.
 widgetGetAccessible :: WidgetClass self => self
+#if GTK_MAJOR_VERSION < 3
  -> IO Object -- ^ returns the 'Object' associated with @widget@
+#else
+ -> IO GObject -- ^ returns the 'GObject' associated with @widget@
+#endif
 widgetGetAccessible self =
+#if GTK_MAJOR_VERSION < 3
   makeNewGObject mkObject $
+#else
+  makeNewGObject mkGObject $
+#endif
   liftM castPtr $
   {# call gtk_widget_get_accessible #}
     (toWidget self)
@@ -2136,12 +2235,14 @@
     (toWidget label)
 
 #if GTK_CHECK_VERSION(2,10,0)
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:5c70 d:cbf9
 -- | Returns the 'Action' that @widget@ is a proxy for. See also
 -- 'actionGetProxies'.
 --
 -- * Available since Gtk+ version 2.10
 --
+-- Removed in Gtk3.
 widgetGetAction :: WidgetClass self => self
  -> IO (Maybe Action)
    -- ^ returns the action that a widget is a proxy for, or
@@ -2150,6 +2251,7 @@
   ptr <- {# call gtk_widget_get_action #} (toWidget self)
   if ptr==nullPtr then return Nothing else liftM Just $
     makeNewGObject mkAction (return ptr)
+#endif
 
 -- %hash c:7ea0 d:2560
 -- | Whether @widget@ can rely on having its alpha channel drawn correctly. On
@@ -2204,6 +2306,20 @@
      peek allocationPtr
 #endif
 
+#if GTK_CHECK_VERSION(3,0,0)
+-- | Returns the width that has currently been allocated to widget. This function is intended
+-- | to be used when implementing handlers for the "draw" function.
+widgetGetAllocatedWidth :: WidgetClass self => self -> IO Int
+widgetGetAllocatedWidth widget =
+     liftM fromIntegral $ {#call widget_get_allocated_width#} (toWidget widget)
+
+-- | Returns the height that has currently been allocated to widget. This function is intended
+-- | to be used when implementing handlers for the "draw" function.
+widgetGetAllocatedHeight :: WidgetClass self => self -> IO Int
+widgetGetAllocatedHeight widget =
+     liftM fromIntegral $ {#call widget_get_allocated_height#} (toWidget widget)
+#endif
+
 #if GTK_CHECK_VERSION(2,18,0)
 -- | Retrieve the current state of the widget.
 --
@@ -2380,15 +2496,18 @@
 widgetEvents = newAttrFromFlagsProperty "events"
                  {# call pure unsafe gdk_event_mask_get_type #}
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:ba80
 -- | The mask that decides what kind of extension events this widget gets.
 --
 -- Default value: 'ExtensionEventsNone'
 --
+-- Removed in Gtk3.
 widgetExtensionEvents :: WidgetClass self => Attr self [ExtensionMode]
 widgetExtensionEvents = newAttr
   widgetGetExtensionEvents
   widgetSetExtensionEvents
+#endif
 
 -- %hash c:1605 d:48ea
 -- | Whether 'widgetShowAll' should not affect this widget.
@@ -2407,13 +2526,16 @@
   widgetGetChildVisible
   widgetSetChildVisible
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:a20a d:646f
 -- | \'colormap\' property. See 'widgetGetColormap' and 'widgetSetColormap'
 --
+-- Removed in Gtk3.
 widgetColormap :: WidgetClass self => Attr self Colormap
 widgetColormap = newAttr
   widgetGetColormap
   widgetSetColormap
+#endif
 
 -- %hash c:a7fd d:55b8
 -- | \'compositeName\' property. See 'widgetGetCompositeName' and
@@ -2500,9 +2622,20 @@
   liftM toBool $
   {#call gtk_widget_get_mapped #}
     (toWidget self)
-  
+
 #endif
 
+#if GTK_MAJOR_VERSION >= 3
+-- | Returns the style context associated to @widget@.
+widgetGetStyleContext :: WidgetClass widget
+                      => widget          -- ^ @widget@ : a @Widget@
+                      -> IO StyleContext -- ^ a @StyleContext@
+widgetGetStyleContext widget =
+  makeNewGObject mkStyleContext $
+  {# call gtk_widget_get_style_context #}
+  (toWidget widget)
+#endif
+
 --------------------
 -- Signals
 
@@ -2672,6 +2805,13 @@
            connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL "query-tooltip" 
              after model (\widget x y keyb tooltip -> 
                               user widget (if keyb then Nothing else Just (x, y)) tooltip))
+
+#if GTK_CHECK_VERSION(3,0,0)
+draw :: WidgetClass self => Signal self (Render ())
+draw =
+  Signal (\after model (Render user) ->
+           connect_PTR__NONE "draw" after model (\ptr -> runReaderT user (Cairo ptr)))
+#endif
 
 -- * Events
 --
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
@@ -100,8 +100,10 @@
   actionActivate,
   actionCreateMenuItem,
   actionCreateToolItem,
+#if GTK_MAJOR_VERSION < 3
   actionConnectProxy,
   actionDisconnectProxy,
+#endif
   actionGetProxies,
   actionConnectAccelerator,
   actionDisconnectAccelerator,
@@ -299,7 +301,8 @@
   makeNewObject mkWidget $
   {# call gtk_action_create_tool_item #}
     (toAction self)
-
+    
+#if GTK_MAJOR_VERSION < 3
 -- | Connects a widget to an action object as a proxy. Synchronises various
 -- properties of the action with the widget (such as label text, icon, tooltip,
 -- etc), and attaches a callback so that the action gets activated when the
@@ -308,6 +311,7 @@
 -- If the widget is already connected to an action, it is disconnected
 -- first.
 --
+-- Removed in Gtk3.
 actionConnectProxy :: (ActionClass self, WidgetClass proxy) => self
  -> proxy -- ^ @proxy@ - the proxy widget
  -> IO ()
@@ -318,6 +322,7 @@
 
 -- | Disconnects a proxy widget from an action.
 --
+-- Removed in Gtk3.
 actionDisconnectProxy :: (ActionClass self, WidgetClass proxy) => self
  -> proxy -- ^ @proxy@ - the proxy widget
  -> IO ()
@@ -325,6 +330,7 @@
   {# call gtk_action_disconnect_proxy #}
     (toAction self)
     (toWidget proxy)
+#endif
 
 -- | Returns the proxy widgets for an action.
 --
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
@@ -449,7 +449,7 @@
   liftM MergeId $
   propagateGError $ \errorPtr ->
   withUTFString filename $ \filenamePtr ->
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_ui_manager_add_ui_from_file_utf8 #}
 #else
   {# call gtk_ui_manager_add_ui_from_file #}
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
@@ -72,7 +72,9 @@
   linkButtonNewWithLabel,
 
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
   linkButtonSetUriHook,
+#endif
 
 -- * Attributes
   linkButtonURI,
@@ -128,13 +130,14 @@
 
 --------------------
 -- Methods
-
+#if GTK_MAJOR_VERSION < 3
 -- | Sets @func@ as the function that should be invoked every time a user
 -- clicks a 'LinkButton'. This function is called before every callback
 -- registered for the 'buttonClicked' signal.
 --
 -- If no uri hook has been set, Gtk+ defaults to calling 'showURI'.
 --
+-- Removed in Gtk3.
 linkButtonSetUriHook :: (String -> IO ()) -> IO ()
 linkButtonSetUriHook func = do
   pfPtr <- mkLinkButtonUriFunc $ \_ cstr _  -> do
@@ -148,6 +151,7 @@
 foreign import ccall "wrapper" mkLinkButtonUriFunc ::
   (Ptr LinkButton -> CString -> Ptr () -> IO ())
   -> IO LinkButtonUriFunc
+#endif
 
 --------------------
 -- Attributes
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
@@ -50,10 +50,14 @@
   cairoContextSetFontOptions,
   cairoContextGetFontOptions,
   -- * Functions for the 'Render' monad.
+#if GTK_MAJOR_VERSION < 3
   renderWithDrawable,
+  region,
+#else
+  renderWithDrawWindow,
+#endif
   setSourceColor,
   setSourcePixbuf,
-  region,
   updateContext,
   createLayout,
   updateLayout,
@@ -70,15 +74,22 @@
 
 import System.Glib.FFI
 {#import Graphics.UI.Gtk.Types#}
+#if GTK_MAJOR_VERSION < 3
 {#import Graphics.UI.Gtk.Gdk.Region#} (Region(..))
+#endif
 {#import Graphics.Rendering.Pango.Cairo#}
 
 #if GTK_CHECK_VERSION(2,8,0)
+#if GTK_MAJOR_VERSION < 3
+{#import Graphics.Rendering.Cairo.Types#} as Cairo hiding (Region)
+#else
 {#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(..))
 #endif
 
 {# context lib="gdk" prefix="gdk" #}
@@ -87,8 +98,10 @@
 -- Methods
 
 #if GTK_CHECK_VERSION(2,8,0)
+#if GTK_MAJOR_VERSION < 3
 -- | Creates a Cairo context for drawing to a 'Drawable'.
 --
+-- Removed in Gtk3.
 renderWithDrawable :: DrawableClass drawable =>
     drawable -- ^ @drawable@ - a 'Drawable'
  -> Render a -- ^ A newly created Cairo context.
@@ -100,7 +113,23 @@
                           unless (status == Cairo.StatusSuccess) $
                             fail =<< Cairo.Internal.statusToString status)
           (\context -> runReaderT (Cairo.Internal.runRender m) context)
+#endif
 
+#if GTK_MAJOR_VERSION >= 3
+-- | Creates a Cairo context for drawing to a 'DrawWindow'.
+renderWithDrawWindow :: DrawWindowClass drawWindow =>
+    drawWindow -- ^ @drawWindow@ - a 'DrawWindow'
+ -> Render a -- ^ A newly created Cairo context.
+ -> IO a
+renderWithDrawWindow drawWindow m =
+  bracket (liftM Cairo.Cairo $ {#call unsafe gdk_cairo_create#} (toDrawWindow drawWindow))
+          (\context -> do status <- Cairo.Internal.status context
+                          Cairo.Internal.destroy context
+                          unless (status == Cairo.StatusSuccess) $
+                            fail =<< Cairo.Internal.statusToString status)
+          (\context -> runReaderT (Cairo.Internal.runRender m) context)
+#endif
+
 -- | Sets the given pixbuf as the source pattern for the Cairo context. The
 -- pattern has an extend mode of 'ExtendNone' and is aligned so that the
 -- origin of pixbuf is @(x, y)@.
@@ -119,11 +148,24 @@
     (realToFrac pixbufY)
 
 -- | Adds the given region to the current path of the 'Render' context.
+rectangle :: Rectangle -> Render ()
+rectangle rect = Render $ do
+  cr <- ask
+  liftIO $ with rect $ \ rectPtr ->
+    {# call unsafe gdk_cairo_rectangle #}
+      cr
+      (castPtr rectPtr)
+
+#if GTK_MAJOR_VERSION < 3
+-- | Adds the given region to the current path of the 'Render' context.
 --
+-- Removed in Gtk3.
 region :: Region -> Render ()
 region region = Render $ do
   cr <- ask
   liftIO $ {# call unsafe gdk_cairo_region #}
     cr
     region
+#endif
+
 #endif
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
@@ -123,10 +123,12 @@
 
 -- * Attributes
   imagePixbuf,
+#if GTK_MAJOR_VERSION < 3
   imagePixmap,
+  imageMask,
+#endif
   imageAnimation,
   imageImage,
-  imageMask,
   imageFile,
   imageStock,
   imageIconSize,
@@ -188,7 +190,7 @@
   makeNewObject mkImage $
   liftM (castPtr :: Ptr Widget -> Ptr Image) $
   withUTFString filename $ \filenamePtr ->
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call unsafe gtk_image_new_from_file_utf8 #}
 #else
   {# call unsafe gtk_image_new_from_file #}
@@ -291,7 +293,7 @@
 imageSetFromFile :: Image -> FilePath -> IO ()
 imageSetFromFile self filename =
   withUTFString filename $ \filenamePtr ->
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_image_set_from_file_utf8 #}
 #else
   {# call gtk_image_set_from_file #}
@@ -378,23 +380,25 @@
 imageAnimation = newAttrFromObjectProperty "pixbuf-animation"
   {# call pure unsafe gdk_pixbuf_get_type #}
 
+#if GTK_MAJOR_VERSION < 3
 -- | A 'Pixmap' to display.
 --
 imagePixmap :: PixmapClass pixmap => ReadWriteAttr Image Pixmap pixmap
 imagePixmap = newAttrFromObjectProperty "pixmap"
   {# call pure unsafe gdk_pixmap_get_type #}
 
--- | A 'Image' to display.
---
-imageImage :: ImageClass image => ReadWriteAttr Image Image image
-imageImage = newAttrFromObjectProperty "image"
-  {# call pure unsafe gtk_image_get_type #}
-
 -- | Mask bitmap to use with 'Image' or 'Pixmap'.
 --
 imageMask :: PixmapClass pixmap => ReadWriteAttr Image Pixmap pixmap
 imageMask = newAttrFromObjectProperty "mask"
   {# call pure unsafe gdk_pixmap_get_type #}
+#endif
+
+-- | A 'Image' to display.
+--
+imageImage :: ImageClass image => ReadWriteAttr Image Image image
+imageImage = newAttrFromObjectProperty "image"
+  {# call pure unsafe gtk_image_get_type #}
 
 -- | Filename to load and display.
 --
diff --git a/Graphics/UI/Gtk/Display/ProgressBar.chs b/Graphics/UI/Gtk/Display/ProgressBar.chs
--- a/Graphics/UI/Gtk/Display/ProgressBar.chs
+++ b/Graphics/UI/Gtk/Display/ProgressBar.chs
@@ -77,16 +77,20 @@
   progressBarGetFraction,
   progressBarGetPulseStep,
   progressBarGetText,
+#if GTK_MAJOR_VERSION < 3
   ProgressBarOrientation(..),
   progressBarSetOrientation,
   progressBarGetOrientation,
+#endif
 #if GTK_CHECK_VERSION(2,6,0)
   progressBarSetEllipsize,
   progressBarGetEllipsize,
 #endif
 
 -- * Attributes
+#if GTK_MAJOR_VERSION < 3
   progressBarOrientation,
+#endif
   progressBarDiscreteBlocks,
   progressBarFraction,
   progressBarPulseStep,
@@ -104,7 +108,9 @@
 import System.Glib.Properties
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.General.Enums	(ProgressBarOrientation(..))
+#endif
 #if GTK_CHECK_VERSION(2,6,0)
 import Graphics.Rendering.Pango.Enums	(EllipsizeMode(..))
 #endif
@@ -195,6 +201,7 @@
     (toProgressBar self)
   >>= maybePeek peekUTFString
 
+#if GTK_MAJOR_VERSION < 3
 -- | Causes the progress bar to switch to a different orientation
 -- (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
 --
@@ -211,6 +218,7 @@
   liftM (toEnum . fromIntegral) $
   {# call unsafe progress_bar_get_orientation #}
     (toProgressBar self)
+#endif
 
 #if GTK_CHECK_VERSION(2,6,0)
 -- | Sets the mode used to ellipsize (add an ellipsis: \"...\") the text if
@@ -238,15 +246,17 @@
 
 --------------------
 -- Attributes
-
+#if GTK_MAJOR_VERSION < 3
 -- | Orientation and growth direction of the progress bar.
 --
 -- Default value: 'ProgressLeftToRight'
 --
+-- Removed in Gtk3.
 progressBarOrientation :: ProgressBarClass self => Attr self ProgressBarOrientation
 progressBarOrientation = newAttr
   progressBarGetOrientation
   progressBarSetOrientation
+#endif
 
 -- | The number of discrete blocks in a progress bar (when shown in the
 -- discrete style).
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
@@ -86,14 +86,34 @@
   statusIconGetStock,
   statusIconGetIconName,
   statusIconGetSize,
+#if GTK_MAJOR_VERSION < 3
   statusIconSetTooltip,
+#endif
   statusIconSetVisible,
   statusIconGetVisible,
+#if GTK_MAJOR_VERSION < 3
   statusIconSetBlinking,
   statusIconGetBlinking,
+#endif
   statusIconIsEmbedded,
   statusIconPositionMenu,
   statusIconGetGeometry,
+#if GTK_CHECK_VERSION(2,12,0)
+  statusIconSetScreen,
+  statusIconGetScreen,
+#endif
+#if GTK_CHECK_VERSION(2,16,0)
+  statusIconSetTooltipText,
+  statusIconGetTooltipText,
+  statusIconSetTooltipMarkup,
+  statusIconGetTooltipMarkup,
+  statusIconSetHasTooltip,
+  statusIconGetHasTooltip,
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+  statusIconSetTitle,
+  statusIconGetTitle,
+#endif
 #if GTK_CHECK_VERSION(2,20,0)
   statusIconSetName,
 #endif
@@ -105,11 +125,25 @@
   statusIconIconName,
   statusIconStorageType,
   statusIconSize,
+#if GTK_MAJOR_VERSION < 3
   statusIconBlinking,
+#endif
   statusIconVisible,
+#if GTK_CHECK_VERSION(2,12,0)
+  statusIconScreen,
+#endif
+#if GTK_CHECK_VERSION(2,16,0)
+  statusIconTooltipText,
+  statusIconTooltipMarkup,
+  statusIconHasTooltip,
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+  statusIconTitle,
+#endif
 
 -- * Signals
   statusIconSizeChanged,
+  statusIconActivated,
   statusIconActivate,
   statusIconPopupMenu,
 
@@ -292,8 +326,8 @@
   ptr <- {# call gtk_status_icon_get_pixbuf #}
        (toStatusIcon self)
   maybePeek (makeNewGObject mkPixbuf . return) ptr
-  
 
+
 -- %hash c:ecce d:448 | Gets the id of the stock icon being displayed
 -- by the 'StatusIcon'. The storage type of the status icon must be
 -- 'Graphics.UI.Gtk.Display.Image.ImageEmpty' or
@@ -337,9 +371,11 @@
   {# call gtk_status_icon_get_size #}
     (toStatusIcon self)
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:7644 d:d87b
 -- | Sets the tooltip of the status icon.
 --
+-- Removed in Gtk3.
 statusIconSetTooltip :: StatusIconClass self => self
  -> String -- ^ @tooltipText@ - the tooltip text
  -> IO ()
@@ -348,6 +384,7 @@
   {# call gtk_status_icon_set_tooltip #}
     (toStatusIcon self)
     tooltipTextPtr
+#endif
 
 -- %hash c:7bd8 d:74fd
 -- | Shows or hides a status icon.
@@ -372,11 +409,13 @@
   {# call gtk_status_icon_get_visible #}
     (toStatusIcon self)
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:aa47 d:3980
 -- | Makes the status icon start or stop blinking. Note that blinking user
 -- interface elements may be problematic for some users, and thus may be turned
 -- off, in which case this setting has no effect.
 --
+-- Removed in Gtk3.
 statusIconSetBlinking :: StatusIconClass self => self
  -> Bool -- ^ @blinking@ - @True@ to turn blinking on, @False@ to turn it off
  -> IO ()
@@ -388,12 +427,14 @@
 -- %hash c:2168 d:3189
 -- | Returns whether the icon is blinking, see 'statusIconSetBlinking'.
 --
+-- Removed in Gtk3.
 statusIconGetBlinking :: StatusIconClass self => self
  -> IO Bool -- ^ returns @True@ if the icon is blinking
 statusIconGetBlinking self =
   liftM toBool $
   {# call gtk_status_icon_get_blinking #}
     (toStatusIcon self)
+#endif
 
 -- %hash c:ffa d:8c83
 -- | Returns whether the status icon is embedded in a notification area.
@@ -430,7 +471,7 @@
     yPtr
     pushInPtr
     (castPtr . unsafeForeignPtrToPtr . unStatusIcon $ toStatusIcon userData)
-  x <- peek xPtr 
+  x <- peek xPtr
   y <- peek yPtr
   pushIn <- peek pushInPtr
   return (fromIntegral x, fromIntegral y, toBool pushIn)
@@ -448,22 +489,141 @@
 statusIconGetGeometry :: StatusIconClass self => self -> IO (Maybe (Rectangle,Orientation))
 statusIconGetGeometry self =
   alloca $ \recPtr ->
-  alloca $ \orPtr -> 
+  alloca $ \orPtr ->
         (liftM toBool $ {# call gtk_status_icon_get_geometry #}
          (toStatusIcon self) nullPtr (castPtr recPtr) orPtr) >>= \b ->
-        if b 
+        if b
           then do
             rec_ <- peek recPtr
             or <- peek orPtr
             return $ Just (rec_,toEnum $ fromIntegral or)
         else return Nothing
 
+#if GTK_CHECK_VERSION(2,12,0)
+-- | Sets the 'Screen' where status icon is displayed; if the icon is already
+--   mapped, it will be unmapped, and then remapped on the new screen.
+--
+statusIconSetScreen :: (StatusIconClass self, ScreenClass screen) => self
+ -> Maybe screen
+ -> IO ()
+statusIconSetScreen self screen =
+  {# call gtk_status_icon_set_screen #}
+    (toStatusIcon self)
+    (maybe (Screen nullForeignPtr) toScreen screen)
+
+-- | Returns the 'Screen' associated with the status icon.
+--
+statusIconGetScreen :: StatusIconClass self => self
+ -> IO (Maybe Screen)
+statusIconGetScreen self =
+  maybeNull (makeNewGObject mkScreen) $
+  {# call gtk_status_icon_get_screen #}
+    (toStatusIcon self)
+#endif
+
+#if GTK_CHECK_VERSION(2,16,0)
+-- | Sets text as the contents of the tooltip.
+--
+--   This function will take care of setting "has-tooltip" to 'True' and of the default
+--   handler for the "query-tooltip" signal.
+--
+--   See also the "tooltip-text" property and 'tooltipSetText'.
+--
+statusIconSetTooltipText :: StatusIconClass self => self
+ -> Maybe String
+ -> IO ()
+statusIconSetTooltipText self text =
+  maybeWith withUTFString text $ \textPtr ->
+  {# call gtk_status_icon_set_tooltip_text #}
+    (toStatusIcon self)
+    textPtr
+
+-- | Gets the contents of the tooltip for status icon.
+--
+statusIconGetTooltipText :: StatusIconClass self => self
+ -> IO (Maybe String)
+statusIconGetTooltipText self =
+  {# call gtk_status_icon_get_tooltip_text #}
+    (toStatusIcon self)
+  >>= maybePeek peekUTFString
+
+-- | Sets markup as the contents of the tooltip, which is marked up with the
+--   Pango text markup language.
+--
+--   This function will take care of setting 'statusIconHasTooltip' to 'True' and of the default
+--   handler for the 'queryTooltip' signal.
+--
+--   See also the 'tooltipMarkup' property and 'tooltipSetMarkup'.
+--
+statusIconSetTooltipMarkup :: StatusIconClass self => self
+ -> Maybe String
+ -> IO ()
+statusIconSetTooltipMarkup self markup =
+  maybeWith withUTFString markup $ \markupPtr ->
+  {# call gtk_status_icon_set_tooltip_markup #}
+    (toStatusIcon self)
+    markupPtr
+
+-- | Gets the contents of the tooltip for status icon.
+--
+statusIconGetTooltipMarkup :: StatusIconClass self => self
+ -> IO (Maybe String)
+statusIconGetTooltipMarkup self =
+  {# call gtk_status_icon_get_tooltip_markup #}
+    (toStatusIcon self)
+  >>= maybePeek peekUTFString
+
+-- | Sets the has-tooltip property on the status icon to @hasTooltip@.
+--   See 'statusIconHasTooltip' for more information.
+--
+statusIconSetHasTooltip :: StatusIconClass self => self
+ -> Bool
+ -> IO ()
+statusIconSetHasTooltip self hasTooltip =
+  {# call gtk_status_icon_set_has_tooltip #}
+    (toStatusIcon self)
+    (fromBool hasTooltip)
+
+-- | Returns the current value of the has-tooltip property. See 'statusIconHasTooltip' for more information.
+--
+statusIconGetHasTooltip :: StatusIconClass self => self
+ -> IO Bool
+statusIconGetHasTooltip self =
+  liftM toBool $
+  {# call gtk_status_icon_get_has_tooltip #}
+    (toStatusIcon self)
+#endif
+
+#if GTK_CHECK_VERSION(2,18,0)
+-- | Sets the title of this tray icon. This should be a short, human-readable, localized
+--   string describing the tray icon. It may be used by tools like screen readers to
+--   render the tray icon.
+--
+statusIconSetTitle :: StatusIconClass self => self
+ -> Maybe String
+ -> IO ()
+statusIconSetTitle self title =
+  maybeWith withUTFString title $ \titlePtr ->
+  {# call gtk_status_icon_set_title #}
+    (toStatusIcon self)
+    titlePtr
+
+-- | Gets the title of this tray icon. See 'statusIconSetTitle'.
+--
+statusIconGetTitle :: StatusIconClass self => self
+ -> IO (Maybe String)
+statusIconGetTitle self =
+  {# call gtk_status_icon_get_title #}
+    (toStatusIcon self)
+  >>= maybePeek peekUTFString
+#endif
+
 #if GTK_CHECK_VERSION(2,20,0)
 -- | Sets the name of this tray icon. This should be a string identifying this icon. It is may be used
 -- for sorting the icons in the tray and will not be shown to the user.
 statusIconSetName :: StatusIconClass self => self -> String -> IO ()
 statusIconSetName self name =
-  withUTFString name $ \ namePtr -> 
+  withUTFString name $ \ namePtr ->
   {#call gtk_status_icon_set_name #}
     (toStatusIcon self)
     namePtr
@@ -522,13 +682,16 @@
 statusIconSize :: StatusIconClass self => ReadAttr self Int
 statusIconSize = readAttrFromIntProperty "size"
 
+#if GTK_MAJOR_VERSION < 3
 -- %hash c:eb d:655d
 -- | Whether or not the status icon is blinking.
 --
 -- Default value: @False@
 --
+-- Removed in Gtk3.
 statusIconBlinking :: StatusIconClass self => Attr self Bool
 statusIconBlinking = newAttrFromBoolProperty "blinking"
+#endif
 
 -- %hash c:4e2b d:7712
 -- | Whether or not the status icon is visible.
@@ -538,6 +701,72 @@
 statusIconVisible :: StatusIconClass self => Attr self Bool
 statusIconVisible = newAttrFromBoolProperty "visible"
 
+#if GTK_CHECK_VERSION(2,12,0)
+-- | The screen where this status icon will be displayed.
+statusIconScreen :: StatusIconClass self => Attr self Screen
+statusIconScreen = newAttrFromObjectProperty "screen"
+                          {# call pure unsafe gdk_screen_get_type #}
+#endif
+
+#if GTK_CHECK_VERSION(2,16,0)
+-- | Sets the text of tooltip to be the given string.
+--
+--   Also see 'tooltipSetText'.
+--
+--   This is a convenience property which will take care of getting the tooltip
+--   shown if the given value is not 'Nothing'. "has-tooltip" will automatically
+--   be set to 'True' and the default handler for the "query-tooltip" signal will
+--   take care of displaying the tooltip.
+--
+--   Note that some platforms have limitations on the length of tooltips that
+--   they allow on status icons, e.g. Windows only shows the first 64 characters.
+--
+--   Default value: 'Nothing'
+statusIconTooltipText :: StatusIconClass self => Attr self (Maybe String)
+statusIconTooltipText = newAttrFromMaybeStringProperty "tooltip-text"
+
+-- | Sets the text of tooltip to be the given string, which is marked up with the
+--   Pango text markup language. Also see 'tooltipSetMarkup'.
+--
+--   This is a convenience property which will take care of getting the tooltip
+--   shown if the given value is not 'Nothing'. "has-tooltip" will automatically
+--   be set to 'True' and the default handler for the "query-tooltip" signal will
+--   take care of displaying the tooltip.
+--
+--   On some platforms, embedded markup will be ignored.
+--
+--   Default value: 'Nothing'
+statusIconTooltipMarkup :: StatusIconClass self => Attr self (Maybe String)
+statusIconTooltipMarkup = newAttrFromMaybeStringProperty "tooltip-markup"
+
+-- | Enables or disables the emission of "query-tooltip" on status_icon. A value
+--   of 'True' indicates that status_icon can have a tooltip, in this case the status
+--   icon will be queried using "query-tooltip" to determine whether it will provide
+--   a tooltip or not.
+--
+--   Note that setting this property to 'True' for the first time will change the
+--   event masks of the windows of this status icon to include leave-notify and
+--   motion-notify events. This will not be undone when the property is set to
+--   'False' again.
+--
+--   Whether this property is respected is platform dependent. For plain text
+--   tooltips, use "tooltip-text" in preference.
+--
+--   Default value: 'False'
+statusIconHasTooltip :: StatusIconClass self => Attr self Bool
+statusIconHasTooltip = newAttrFromBoolProperty "has-tooltip"
+#endif
+
+#if GTK_CHECK_VERSION(2,18,0)
+-- | The title of this tray icon. This should be a short, human-readable,
+--   localized string describing the tray icon. It may be used by tools
+--   like screen readers to render the tray icon.
+--
+--   Default value: 'Nothing'
+statusIconTitle :: StatusIconClass self => Attr self (Maybe String)
+statusIconTitle = newAttrFromMaybeStringProperty "title"
+#endif
+
 --------------------
 -- Signals
 
@@ -548,16 +777,20 @@
 statusIconSizeChanged :: StatusIconClass self => Signal self (Int -> IO Bool)
 statusIconSizeChanged = Signal (connect_INT__BOOL "size-changed")
 
--- | Gets emitted when the user activates the status icon. 
+-- | Gets emitted when the user activates the status icon.
 -- If and how status icons can activated is platform-dependent.
+statusIconActivated :: StatusIconClass self => Signal self (IO ())
+statusIconActivated = Signal (connect_NONE__NONE "activate")
+
+-- | Deprecated. See 'statusIconActivated'.
 statusIconActivate :: StatusIconClass self => Signal self (IO ())
-statusIconActivate = Signal (connect_NONE__NONE "activate")
- 
+statusIconActivate = statusIconActivated
+
 -- | Gets emitted when the user brings up the context menu
--- of the status icon. Whether status icons can have context 
+-- of the status icon. Whether status icons can have context
 -- menus and how these are activated is platform-dependent.
 --
--- The 'MouseButton' and 'TimeStamp' parameters should be 
+-- The 'MouseButton' and 'TimeStamp' parameters should be
 -- passed as the last to arguments to 'Graphics.UI.Gtk.menuPopup'.
 statusIconPopupMenu :: StatusIconClass self => Signal self (Maybe MouseButton -> TimeStamp -> IO ())
 statusIconPopupMenu = Signal wrap
@@ -588,7 +821,7 @@
 onPopupMenu :: StatusIconClass self => self
  -> (Maybe MouseButton -> TimeStamp -> IO ())
  -> IO (ConnectId self)
-onPopupMenu = wrap False 
+onPopupMenu = wrap False
 {-# DEPRECATED onPopupMenu "instead of 'onPopupMenu obj' use 'on obj popupMenu'" #-}
 
 -- %hash c:1904
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
@@ -83,8 +83,10 @@
   statusbarPush,
   statusbarPop,
   statusbarRemove,
+#if GTK_MAJOR_VERSION < 3
   statusbarSetHasResizeGrip,
   statusbarGetHasResizeGrip,
+#endif
 #if GTK_CHECK_VERSION(2,20,0)
   statusbarGetMessageArea,
 #endif
@@ -93,7 +95,9 @@
 #endif
 
 -- * Attributes
+#if GTK_MAJOR_VERSION < 3
   statusbarHasResizeGrip,
+#endif
 
 -- * Signals
   textPopped,
@@ -193,6 +197,7 @@
     contextId
     messageId
 
+#if GTK_MAJOR_VERSION < 3
 -- | Sets whether the statusbar has a resize grip. @True@ by default.
 --
 statusbarSetHasResizeGrip :: StatusbarClass self => self -> Bool -> IO ()
@@ -208,6 +213,7 @@
   liftM toBool $
   {# call unsafe statusbar_get_has_resize_grip #}
     (toStatusbar self)
+#endif
 
 #if GTK_CHECK_VERSION(2,20,0)
 -- | Retrieves the box containing the label widget.
@@ -237,14 +243,17 @@
 --------------------
 -- Attributes
 
+#if GTK_MAJOR_VERSION < 3
 -- | Whether the statusbar has a grip for resizing the toplevel window.
 --
 -- Default value: @True@
 --
+-- Removed in Gtk3.
 statusbarHasResizeGrip :: StatusbarClass self => Attr self Bool
 statusbarHasResizeGrip = newAttr
   statusbarGetHasResizeGrip
   statusbarSetHasResizeGrip
+#endif
 
 --------------------
 -- Signals
diff --git a/Graphics/UI/Gtk/Embedding/Embedding.hsc b/Graphics/UI/Gtk/Embedding/Embedding.hsc
--- a/Graphics/UI/Gtk/Embedding/Embedding.hsc
+++ b/Graphics/UI/Gtk/Embedding/Embedding.hsc
@@ -27,7 +27,7 @@
 -- Portability : portable (depends on GHC)
 --
 module Graphics.UI.Gtk.Embedding.Embedding (
-#if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0)
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) && GTK_MAJOR_VERSION < 3
   socketHasPlug,
 #endif
   ) where
@@ -35,7 +35,7 @@
 import System.Glib.FFI
 import Graphics.UI.Gtk.Types
 
-#if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0)
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0)) && GTK_MAJOR_VERSION < 3
 -- | Test if a Plug is connected to the socket.
 -- 
 socketHasPlug :: SocketClass s => s -> IO Bool
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
@@ -48,7 +48,7 @@
 -- |                                 +----Plug
 -- @
 
-#if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0)
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
 -- * Types
   Plug,
   PlugClass,
@@ -87,12 +87,14 @@
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Embedding.Embedding
+#endif
 import Graphics.UI.Gtk.General.Structs
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0)
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
 
 --------------------
 -- Constructors
@@ -190,7 +192,11 @@
 -- 
 plugAttrSocketWindow :: PlugClass self => ReadAttr self (Maybe DrawWindow)
 plugAttrSocketWindow = readAttrFromMaybeObjectProperty "socket-window"
+#if GTK_MAJOR_VERSION < 3
                        {# call pure unsafe gdk_window_object_get_type #}
+#else
+                       {# call pure unsafe gdk_window_get_type #}
+#endif
 
 --------------------
 -- Signals
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
@@ -82,7 +82,7 @@
 -- |                     +----Socket
 -- @
 
-#if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0)
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
 -- * Types
   Socket,
   SocketClass,
@@ -116,6 +116,7 @@
   ) where
 
 import Control.Monad	(liftM)
+import Data.Maybe (isJust)
 
 import System.Glib.FFI
 import System.Glib.Attributes
@@ -123,12 +124,14 @@
 import Graphics.UI.Gtk.Abstract.Object		(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Embedding.Embedding
+#endif
 import Graphics.UI.Gtk.General.Structs
 
 {# context lib="gtk" prefix="gtk" #}
 
-#if !defined(WIN32) || GTK_CHECK_VERSION(2,8,0)
+#if defined(HAVE_PLUG_AND_SOCKET) && (!defined(WIN32) || GTK_CHECK_VERSION(2,8,0))
 
 --------------------
 -- Constructors
@@ -190,13 +193,18 @@
 -- * Available since Gtk+ version 2.14
 --
 socketGetPlugWindow :: SocketClass self => self
- -> IO DrawWindow -- ^ returns the window of the plug if available, or
-                  -- {@NULL@, FIXME: this should probably be converted to a
-                  -- Maybe data type}
+ -> IO (Maybe DrawWindow) -- ^ returns the window of the plug if available,
+                          -- or Nothing
 socketGetPlugWindow self =
-  makeNewGObject mkDrawWindow $
+  maybeNull (makeNewGObject mkDrawWindow) $
   {# call gtk_socket_get_plug_window #}
     (toSocket self)
+
+#if GTK_MAJOR_VERSION >= 3
+socketHasPlug :: SocketClass s => s -> IO Bool
+socketHasPlug = liftM isJust . socketGetPlugWindow
+#endif
+
 #endif
 
 --------------------
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
@@ -52,14 +52,19 @@
 
 -- * Constructors
   entryNew,
+#if GTK_CHECK_VERSION(2,18,0)
+  entryNewWithBuffer,
+#endif
 
 -- * Methods
   entrySetText,
   entryGetText,
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   entryAppendText,
   entryPrependText,
 #endif
+#endif
   entrySetVisibility,
   entryGetVisibility,
   entrySetInvisibleChar,
@@ -82,10 +87,12 @@
   entryGetBuffer,
   entrySetBuffer,
 #endif
+#if GTK_MAJOR_VERSION < 3
 #if GTK_CHECK_VERSION(2,20,0)
   entryGetIconWindow,
   entryGetTextWindow,
 #endif
+#endif
 #if GTK_CHECK_VERSION(2,22,0)
   entryImContextFilterKeypress,
   entryResetImContext,
@@ -113,6 +120,7 @@
 #endif
 
 -- * Signals
+  entryActivated,
   entryActivate,
   entryBackspace,
   entryCopyClipboard,
@@ -188,9 +196,41 @@
   liftM (castPtr :: Ptr Widget -> Ptr Entry) $
   {# call unsafe entry_new #}
 
+#if GTK_CHECK_VERSION(2,18,0)
+-- | Creates a new 'Entry' widget backed by a particular 'EntryBuffer'. One
+-- buffer can be shared among many widgets.
+--
+entryNewWithBuffer :: EntryBufferClass buffer => buffer -> IO Entry
+entryNewWithBuffer buffer =
+  makeNewObject mkEntry $
+  liftM (castPtr :: Ptr Widget -> Ptr Entry) $
+  {# call unsafe entry_new_with_buffer #}
+    (toEntryBuffer buffer)
+
 --------------------
 -- Methods
 
+-- Although the documentation doesn't say one way or the other, a look at the
+-- source indicates that gtk_entry_get_buffer doesn't increment the reference
+-- count of the GtkEntryBuffer it returns, so, like textViewGetBuffer, we must
+-- increment it ourselves.
+
+-- | Get the 'EntryBuffer' object which holds the text for this widget.
+entryGetBuffer :: EntryClass self => self
+  -> IO EntryBuffer
+entryGetBuffer self =
+  makeNewGObject mkEntryBuffer $
+  {# call gtk_entry_get_buffer #}
+    (toEntry self)
+
+-- | Set the 'EntryBuffer' object which holds the text for this widget.
+entrySetBuffer :: (EntryClass self, EntryBufferClass buffer) => self
+  -> buffer -> IO ()
+entrySetBuffer self =
+  {# call gtk_entry_set_buffer #}
+    (toEntry self) . toEntryBuffer
+#endif
+
 -- | Sets the text in the widget to the given value, replacing the current
 -- contents.
 --
@@ -209,13 +249,14 @@
   {# call entry_get_text #}
     (toEntry self)
   >>= peekUTFString
-
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Appends the given text to the contents of the widget.
 --
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 entryAppendText :: EntryClass self => self -> String -> IO ()
 entryAppendText self text =
   withUTFString text $ \textPtr ->
@@ -228,6 +269,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 entryPrependText :: EntryClass self => self -> String -> IO ()
 entryPrependText self text =
   withUTFString text $ \textPtr ->
@@ -235,6 +277,7 @@
     (toEntry self)
     textPtr
 #endif
+#endif
 
 -- | Sets whether the contents of the entry are visible or not. When
 -- visibility is set to @False@, characters are displayed as the invisible
@@ -439,29 +482,14 @@
     (toEntry self)
 #endif
 
-#if GTK_CHECK_VERSION(2,18,0)
--- | Get the 'EntryBuffer' object which holds the text for this widget.
-entryGetBuffer :: EntryClass self => self
-  -> IO EntryBuffer
-entryGetBuffer self =
-  makeNewGObject mkEntryBuffer $
-  {# call gtk_entry_get_buffer #}
-    (toEntry self)
-
--- | Set the 'EntryBuffer' object which holds the text for this widget.
-entrySetBuffer :: (EntryClass self, EntryBufferClass buffer) => self
-  -> buffer -> IO ()
-entrySetBuffer self =
-  {# call gtk_entry_set_buffer #}
-    (toEntry self) . toEntryBuffer
-#endif
-
+#if GTK_MAJOR_VERSION < 3
 #if GTK_CHECK_VERSION(2,20,0)
 -- | Returns the 'Window' which contains the entry's icon at @iconPos@. This function is useful when
 -- drawing something to the entry in an 'eventExpose' callback because it enables the callback to
 -- distinguish between the text window and entry's icon windows.
 -- 
 -- See also 'entryGetTextWindow'.
+-- Removed in Gtk3.
 entryGetIconWindow :: EntryClass self => self
                    -> EntryIconPosition  -- ^ @iconPos@ Icon position                        
                    -> IO DrawWindow -- ^ returns  the entry's icon window at @iconPos@. 
@@ -476,6 +504,7 @@
 -- window and entry's icon windows.
 -- 
 -- See also 'entryGetIconWindow'.
+-- Removed in Gtk3.
 entryGetTextWindow :: EntryClass self => self
                    -> IO DrawWindow  -- ^ returns the entry's text window. 
 entryGetTextWindow entry =
@@ -483,6 +512,7 @@
     {#call gtk_entry_get_text_window #}
       (toEntry entry)
 #endif
+#endif
 
 #if GTK_CHECK_VERSION(2,22,0)
 -- | Allow the 'Entry' input method to internally handle key press and release events. If this function
@@ -651,6 +681,8 @@
 #endif
 
 #if GTK_CHECK_VERSION(2,18,0)
+-- | The buffer being displayed.
+--
 entryBuffer :: (EntryClass self, EntryBufferClass buffer) =>
   ReadWriteAttr self EntryBuffer buffer
 entryBuffer = newAttr
@@ -666,8 +698,12 @@
 -- 
 -- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to
 -- control activation programmatically.
+entryActivated :: EntryClass ec => Signal ec (IO ())
+entryActivated = Signal (connect_NONE__NONE "activate")
+
+-- | Deprecated. See 'entryActivated'.
 entryActivate :: EntryClass ec => Signal ec (IO ())
-entryActivate = Signal (connect_NONE__NONE "activate")
+entryActivate = entryActivated
 
 -- | The 'entryBackspace' signal is a keybinding signal which gets emitted when the user asks for it.
 -- 
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
@@ -37,8 +37,10 @@
 -- * Constructors  
   cursorNew,
   
--- * Methods  
+-- * Methods
+#if GTK_MAJOR_VERSION < 3
   cursorNewFromPixmap,
+#endif
   cursorNewFromPixbuf,
   cursorNewFromName,
   cursorNewForDisplay,
@@ -50,7 +52,12 @@
 
 import System.Glib.FFI
 import System.Glib.UTFString
-import Foreign.ForeignPtr (ForeignPtr, castForeignPtr, unsafeForeignPtrToPtr)
+import Foreign.ForeignPtr (ForeignPtr, castForeignPtr)
+#if __GLASGOW_HASKELL__ >= 707
+import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
+#else
+import Foreign.ForeignPtr (unsafeForeignPtrToPtr)
+#endif
 import Graphics.UI.Gtk.General.Structs
 
 {#import Graphics.UI.Gtk.Types#} hiding (Arrow)
@@ -59,7 +66,7 @@
 
 --------------------
 -- Types
-{#pointer *Cursor foreign newtype #}
+{#pointer *GdkCursor as Cursor foreign newtype #}
 
 --------------------
 -- Enums
@@ -90,10 +97,12 @@
 
 --------------------
 -- Methods
+#if GTK_MAJOR_VERSION < 3
 -- | Creates a new cursor from a given pixmap and mask. Both the pixmap and
 -- mask must have a depth of 1 (i.e. each pixel has only 2 values - on or off).
 -- The standard cursor size is 16 by 16 pixels.
 --
+-- Removed in Gtk3.
 cursorNewFromPixmap ::
      Pixmap -- ^ @source@ - the pixmap specifying the cursor.
   -> Pixmap -- ^ @mask@ - the pixmap specifying the mask, which must be the
@@ -110,6 +119,7 @@
     with bg $ \bgPtr -> do
       rPtr <- {# call unsafe cursor_new_from_pixmap #} source mask (castPtr fgPtr) (castPtr bgPtr) (fromIntegral x) (fromIntegral y)
       makeNewCursor rPtr
+#endif
 
 -- | Creates a new cursor from a pixbuf.
 -- Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. 
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
@@ -54,33 +54,47 @@
 -- * Methods
   drawWindowGetState,
   drawWindowScroll,
+#if GTK_MAJOR_VERSION < 3
   drawWindowClear,
   drawWindowClearArea,
   drawWindowClearAreaExpose,
+#endif
   drawWindowRaise,
   drawWindowLower,
   drawWindowBeginPaintRect,
+#if GTK_MAJOR_VERSION < 3
   drawWindowBeginPaintRegion,
+#endif
   drawWindowEndPaint,
   drawWindowInvalidateRect,
+#if GTK_MAJOR_VERSION < 3
   drawWindowInvalidateRegion,
   drawWindowGetUpdateArea,
+#endif
   drawWindowFreezeUpdates,
   drawWindowThawUpdates,
   drawWindowProcessUpdates,
 #if GTK_CHECK_VERSION(2,4,0)
   drawWindowSetAcceptFocus,
 #endif
+#if GTK_MAJOR_VERSION < 3
   drawWindowShapeCombineMask,
   drawWindowShapeCombineRegion,
+#endif
   drawWindowSetChildShapes,
   drawWindowMergeChildShapes,
   drawWindowGetPointer,
   drawWindowGetPointerPos,
   drawWindowGetOrigin,
   drawWindowSetCursor,
+#if GTK_MAJOR_VERSION < 3
   drawWindowForeignNew,
+#endif
   drawWindowGetDefaultRootWindow,
+#if GTK_CHECK_VERSION(2,24,0)
+  drawWindowGetWidth,
+  drawWindowGetHeight,
+#endif
   ) where
 
 import Control.Monad    (liftM)
@@ -91,9 +105,15 @@
 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, eventRegion)
+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)
 
@@ -130,9 +150,10 @@
      (fromIntegral dx)
      (fromIntegral dy)
 
-
+#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 =
   {# call gdk_window_clear #}
@@ -140,6 +161,7 @@
 
 -- | Clears an area of @DrawWindow@ to the background color or background pixmap.
 -- 
+-- Removed in Gtk3. 
 drawWindowClearArea :: DrawWindowClass self => self
  -> Int   -- ^ @x@ - x coordinate of rectangle to clear
  -> Int   -- ^ @y@ - y coordinate of rectangle to clear
@@ -157,6 +179,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
  -> Int   -- ^ @y@ - y coordinate of rectangle to clear
@@ -170,6 +193,7 @@
      (fromIntegral y)
      (fromIntegral width)
      (fromIntegral height)
+#endif
 
 -- | Raises @DrawWindow@ to the top of the Z-order (stacking order), so that other
 -- drawWindows with the same parent drawWindow appear below @DrawWindow@. This is true
@@ -220,6 +244,7 @@
 drawWindowBeginPaintRect self rectangle = with rectangle $ \rectPtr ->
   {#call gdk_window_begin_paint_rect#} (toDrawWindow self) (castPtr rectPtr)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Indicate that you are beginning the process of redrawing @region@.
 --
 -- * A
@@ -257,6 +282,7 @@
 -- 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
  -> IO ()
@@ -264,6 +290,7 @@
   {# call gdk_window_begin_paint_region #}
      (toDrawWindow self)
      region
+#endif
 
 -- | Signal that drawing has finished.
 --
@@ -293,6 +320,7 @@
      (castPtr rectPtr)
      (fromBool invalidateChildren)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Adds @region@ to the update area for @DrawWindow@. The update area is the
 -- region that needs to be redrawn, or \"dirty region.\". During the
 -- next idle period of the main look, an expose even for this region
@@ -313,7 +341,9 @@
      (toDrawWindow self)
      region
      (fromBool invalidateChildren)
+#endif
 
+#if GTK_MAJOR_VERSION < 3
 -- | Ask for the dirty region of this window.
 --
 -- * Transfers ownership of the update area from @DrawWindow@ to the caller of the
@@ -321,11 +351,13 @@
 -- 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@
 drawWindowGetUpdateArea self = do
   reg <- {# call gdk_window_get_update_area #} (toDrawWindow self)
   if reg==nullPtr then return Nothing else liftM Just (makeNewRegion reg)
+#endif
 
 -- | Temporarily freezes a drawWindow such that it won\'t receive expose events.
 --  * The drawWindow will begin receiving expose events again when 
@@ -384,6 +416,7 @@
      (fromBool acceptFocus)
 #endif
 
+#if GTK_MAJOR_VERSION < 3
 -- | Applies a shape mask to window. Pixels in window corresponding to set
 --   bits in the mask will be visible; pixels in window corresponding to
 --   unset bits in the mask will be transparent. This gives a non-rectangular
@@ -421,8 +454,9 @@
      nullPtr
      (fromIntegral offsetX)
      (fromIntegral offsetY)
-
+#endif
 
+#if GTK_MAJOR_VERSION < 3
 -- | Makes pixels in @DrawWindow@ outside @shapeRegion@ transparent.
 --
 -- * Makes pixels in @DrawWindow@ outside @shapeRegion@ transparent, so that
@@ -458,6 +492,7 @@
      (Region nullForeignPtr)
      (fromIntegral offsetX)
      (fromIntegral offsetY)
+#endif
 
 -- | Sets the shape mask of @DrawWindow@ to the union of shape masks for all
 -- children of @DrawWindow@, ignoring the shape mask of @DrawWindow@ itself. Contrast
@@ -566,12 +601,16 @@
     self
     (fromMaybe (Cursor nullForeignPtr) cursor)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Get the handle to an exising window of the windowing system. The
 -- passed-in handle is a reference to a native window, that is, an Xlib XID
 -- for X windows and a HWND for Win32.
+--
+-- Removed in Gtk3.
 drawWindowForeignNew :: NativeWindowId -> IO (Maybe DrawWindow)
 drawWindowForeignNew anid = maybeNull (wrapNewGObject mkDrawWindow) $
   liftM castPtr $ {#call gdk_window_foreign_new#} (fromNativeWindowId anid)
+#endif
 
 -- | Obtains the root window (parent all other windows are inside) for the default display and screen.
 drawWindowGetDefaultRootWindow :: 
@@ -579,3 +618,25 @@
 drawWindowGetDefaultRootWindow =
   makeNewGObject mkDrawWindow $
   {#call gdk_get_default_root_window #}
+
+#if GTK_CHECK_VERSION(2,24,0)
+-- | Returns the width of the window.
+--
+-- On the X11 platform the returned size is the size reported in the
+-- most-recently-processed configure event, rather than the current
+-- size on the X server.
+--
+drawWindowGetWidth :: DrawWindow -> IO Int
+drawWindowGetWidth self =
+  liftM fromIntegral $ {# call gdk_window_get_width #} (toDrawWindow self)
+
+-- | Returns the height of the window.
+--
+-- On the X11 platform the returned size is the size reported in the
+-- most-recently-processed configure event, rather than the current
+-- size on the X server.
+--
+drawWindowGetHeight :: DrawWindow -> IO Int
+drawWindowGetHeight self =
+  liftM fromIntegral $ {# call gdk_window_get_height #} (toDrawWindow self)
+#endif
diff --git a/Graphics/UI/Gtk/Gdk/Drawable.chs b/Graphics/UI/Gtk/Gdk/Drawable.chs
--- a/Graphics/UI/Gtk/Gdk/Drawable.chs
+++ b/Graphics/UI/Gtk/Gdk/Drawable.chs
@@ -34,7 +34,10 @@
 -- This module defines drawing primitives that can operate on 'DrawWindow's
 -- and 'Pixmap's.
 --
+-- This module is empty when built with Gtk3 because GTKDrawable has been
+-- removed.
 module Graphics.UI.Gtk.Gdk.Drawable (
+#if GTK_MAJOR_VERSION < 3
   Drawable,
   DrawableClass,
   castToDrawable, gTypeDrawable,
@@ -63,8 +66,10 @@
   drawLayout,
   drawLayoutWithColors,
   drawDrawable,
+#endif
 ) where
 
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -73,7 +78,9 @@
 {#import Graphics.Rendering.Pango.Types#}
 {#import Graphics.Rendering.Pango.BasicTypes#}
 {#import Graphics.UI.Gtk.Types#}
+#if GTK_MAJOR_VERSION < 3
 {#import Graphics.UI.Gtk.Gdk.Region#}	(Region, makeNewRegion)
+#endif
 import Graphics.UI.Gtk.Gdk.Enums	(Dither(..))
 
 {# context lib="gtk" prefix="gdk" #}
@@ -378,4 +385,4 @@
   (fromIntegral xSrc) (fromIntegral ySrc) (fromIntegral xDest)
   (fromIntegral yDest) (fromIntegral width) (fromIntegral height)
 
-
+#endif /* GTK_MAJOR_VERSION < 3 */
diff --git a/Graphics/UI/Gtk/Gdk/Enums.chs b/Graphics/UI/Gtk/Gdk/Enums.chs
--- a/Graphics/UI/Gtk/Gdk/Enums.chs
+++ b/Graphics/UI/Gtk/Gdk/Enums.chs
@@ -26,22 +26,13 @@
 -- General enumeration types.
 --
 module Graphics.UI.Gtk.Gdk.Enums (
-  CapStyle(..),
   CrossingMode(..),
-  Dither(..),
   DragProtocol(..),
   DragAction(..),
   EventMask(..),
   Modifier(..),
-  ExtensionMode(..),
-  Fill(..),
-  Function(..),
-  InputCondition(..),
-  JoinStyle(..),
-  LineStyle(..),
   NotifyType(..),
   ScrollDirection(..),
-  SubwindowMode(..),
   VisibilityState(..),
   WindowState(..),
   WindowEdge(..),
@@ -51,15 +42,29 @@
 #if GTK_CHECK_VERSION(2,6,0)
   OwnerChange(..),
 #endif
+#if GTK_MAJOR_VERSION < 3
+  ExtensionMode(..),
+  CapStyle(..),
+  Dither(..),
+  Fill(..),
+  Function(..),
+  InputCondition(..),
+  JoinStyle(..),
+  LineStyle(..),
+  SubwindowMode(..),
+#endif
   ) where
 
 import System.Glib.Flags	(Flags)
 
 {#context lib="gdk" prefix ="gdk"#}
 
+#if GTK_MAJOR_VERSION < 3
 -- | Specify the how the ends of a line is drawn.
 --
+-- Removed in Gtk3.
 {#enum CapStyle {underscoreToCase} deriving(Eq,Show)#}
+#endif
 
 -- | How focus is crossing the widget.
 --
@@ -91,9 +96,12 @@
 
 instance Flags DragAction
 
+#if GTK_MAJOR_VERSION < 3
 -- | Specify how to dither colors onto the screen.
 --
+-- Removed in Gtk3.
 {#enum RgbDither as Dither {underscoreToCase} deriving(Eq,Show) #}
+#endif
 
 -- | Specify which events a widget will emit signals on.
 --
@@ -158,6 +166,7 @@
 
 instance Flags Modifier
 
+#if GTK_MAJOR_VERSION < 3
 -- | specify which input extension a widget desires
 --
 {#enum ExtensionMode {underscoreToCase} deriving(Eq,Bounded,Show)#}
@@ -166,27 +175,32 @@
 
 -- | How objects are filled.
 --
+-- Removed in Gtk3.
 {#enum Fill {underscoreToCase} deriving(Eq,Show) #}
 
 -- | Determine how bitmap operations are carried out.
 --
+-- Removed in Gtk3.
 {#enum Function {underscoreToCase} deriving(Eq,Show) #}
 
 -- | Specify on what file condition a callback should be
 -- done.
 --
+-- Removed in Gtk3.
 {#enum InputCondition {underscoreToCase} deriving(Eq,Bounded) #}
 
 instance Flags InputCondition
 
 -- | Determines how adjacent line ends are drawn.
 --
+-- Removed in Gtk3.
 {#enum JoinStyle {underscoreToCase} deriving(Eq,Show)#}
 
 -- | Determines if a line is solid or dashed.
 --
+-- Removed in Gtk3.
 {#enum LineStyle {underscoreToCase} deriving(Eq,Show)#}
-
+#endif
 -- | Information on from what level of the widget hierarchy the mouse
 --   cursor came.
 --
@@ -215,9 +229,13 @@
 --
 {#enum ScrollDirection {underscoreToCase} deriving(Eq,Show) #}
 
+
+#if GTK_MAJOR_VERSION < 3
 -- | Determine if child widget may be overdrawn.
 --
+-- Removed in Gtk3.
 {#enum SubwindowMode {underscoreToCase} deriving(Eq,Show) #}
+#endif
 
 -- | visibility of a 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
@@ -139,7 +139,9 @@
   eventRequestMotions,
 #endif
   eventArea,
+#if GTK_MAJOR_VERSION < 3
   eventRegion,
+#endif
   VisibilityState(..),
   eventVisibilityState,
   CrossingMode(..),
@@ -179,7 +181,9 @@
 import System.Glib.Flags
 import System.Glib.GObject ( makeNewGObject )
 import Graphics.UI.Gtk.Gdk.Keys		(KeyVal, KeyCode, keyName)
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Gdk.Region       (Region, makeNewRegion)
+#endif
 import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..), VisibilityState(..),
   CrossingMode(..), NotifyType(..), WindowState(..), ScrollDirection(..),
 #if GTK_CHECK_VERSION(2,6,0)
@@ -537,7 +541,9 @@
 eventArea = ask >>= \ptr -> liftIO $
   (#{peek GdkEventExpose, area} ptr :: IO Rectangle)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Query the region that needs to be updated.
+-- Removed in Gtk3.
 eventRegion :: EventM EExpose Region
 eventRegion = ask >>= \ptr -> liftIO $ do
   (reg_   :: Ptr Region)	<- #{peek GdkEventExpose, region} ptr
@@ -546,6 +552,7 @@
 
 foreign import ccall "gdk_region_copy"
   gdk_region_copy :: Ptr Region -> IO (Ptr Region)
+#endif
 
 -- | Get the visibility status of a window.
 eventVisibilityState :: EventM EVisibility VisibilityState
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
@@ -71,7 +71,9 @@
 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)
+#endif
 import Graphics.UI.Gtk.Gdk.Enums	(Modifier(..),
                                          VisibilityState(..),
 					 CrossingMode(..),
@@ -200,8 +202,10 @@
     -- detailed information on the area that needs redrawing, use the
     -- next field.
     eventArea	:: Rectangle,
+#if GTK_MAJOR_VERSION < 3
     -- | A set of horizontal stripes that denote the invalid area.
     eventRegion      :: Region,
+#endif
 
     -- | The number of contiguous 'Expose' events following this
     --   one. The only use for this is \"exposure compression\", i.e. 
@@ -427,18 +431,24 @@
   (#{const GDK_EXPOSE}::#gtk2hs_type GdkEventType) <- #{peek GdkEventAny,type} ptr
   (sent_   ::#gtk2hs_type gint8)	<- #{peek GdkEventExpose, send_event} ptr
   (area_   ::Rectangle)		<- #{peek GdkEventExpose, area} ptr
+#if GTK_MAJOR_VERSION < 3
   (reg_   :: Ptr Region)	<- #{peek GdkEventExpose, region} ptr
   reg_ <- gdk_region_copy reg_
   region_ <- makeNewRegion reg_
+#endif
   (count_  ::#gtk2hs_type gint)	<- #{peek GdkEventExpose, count} ptr
   return $ Expose {
     eventSent   = toBool sent_,
     eventArea   = area_,
+#if GTK_MAJOR_VERSION < 3
     eventRegion = region_,
+#endif
     eventCount  = fromIntegral count_}
 
+#if GTK_MAJOR_VERSION < 3
 foreign import ccall "gdk_region_copy"
   gdk_region_copy :: Ptr Region -> IO (Ptr Region)
+#endif
 
 marshExposeRect :: Ptr Event -> IO Rectangle
 marshExposeRect ptr = do
diff --git a/Graphics/UI/Gtk/Gdk/GC.chs b/Graphics/UI/Gtk/Gdk/GC.chs
--- a/Graphics/UI/Gtk/Gdk/GC.chs
+++ b/Graphics/UI/Gtk/Gdk/GC.chs
@@ -38,7 +38,10 @@
 -- Most values of a graphics context can be set at creation time by using
 -- 'gcNewWithValues'. A few of the values in the GC, such as the dash
 -- pattern, can only be set by the latter method.
+--
+-- Graphics Contexts are removed in Gtk3, so this module is empty.
 
+#if GTK_MAJOR_VERSION < 3
   GC,
   GCClass,
   castToGC, gTypeGC,
@@ -74,8 +77,11 @@
   gcGetValues,
   gcSetClipRectangle,
   gcSetClipRegion,
-  gcSetDashes) where
+  gcSetDashes
+#endif
+  ) where
 
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad	(when)
 import Data.Maybe	(fromJust, isJust)
 import Control.Exception (handle, ErrorCall(..))
@@ -86,7 +92,9 @@
 import Graphics.UI.Gtk.General.Structs
 import Graphics.UI.Gtk.General.Enums	(Function(..), Fill(..), SubwindowMode(..), LineStyle(..), 
 					 CapStyle(..), JoinStyle(..))
+#if GTK_MAJOR_VERSION < 3
 {#import Graphics.UI.Gtk.Gdk.Region#}	(Region(Region))
+#endif
 
 {# context lib="gtk" prefix="gdk" #}
 
@@ -168,3 +176,4 @@
   withArray onOff $ \aPtr ->
     {#call unsafe gc_set_dashes#} gc (fromIntegral phase) aPtr
     (fromIntegral (length onOff))
+#endif
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
@@ -111,10 +111,12 @@
   pixbufAddAlpha,
   pixbufCopyArea,
   pixbufFill,
+#if GTK_MAJOR_VERSION < 3
   pixbufGetFromDrawable,
 
   pixbufRenderThresholdAlpha,
   pixbufRenderPixmapAndMaskForColormap
+#endif
   ) where
 
 import Control.Monad (liftM)
@@ -128,7 +130,9 @@
 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
 
 {# context prefix="gdk" #}
 
@@ -709,6 +713,7 @@
    (fromIntegral blue)  `shiftL`  8 .|.
    (fromIntegral alpha))
 
+#if GTK_MAJOR_VERSION < 3
 -- | Take a screenshot of a 'Drawable'.
 --
 -- * This function creates a 'Pixbuf' and fills it with the image
@@ -721,6 +726,7 @@
 --   rectangle. The function will return @Nothing@ if the window
 --   is not currently visible.
 --
+-- Removed in Gtk3.
 pixbufGetFromDrawable :: DrawableClass d => d -> Rectangle -> IO (Maybe Pixbuf)
 pixbufGetFromDrawable d (Rectangle x y width height) =
   maybeNull (wrapNewGObject mkPixbuf) $
@@ -730,10 +736,11 @@
     (fromIntegral width) (fromIntegral height)
 
 
-
 -- | Takes the opacity values in a rectangular portion of a pixbuf and
 -- thresholds them to produce a bi-level alpha mask that can be used
 -- as a clipping mask for a drawable.
+--
+-- Removed in Gtk3.
 pixbufRenderThresholdAlpha ::
     Pixbuf -- ^ A pixbuf.
  -> Bitmap -- ^ Bitmap where the bilevel mask will be painted to.
@@ -775,6 +782,7 @@
 -- If the pixbuf does not have an alpha channel, then the returned
 -- mask will be @Nothing@.
 --
+-- Removed in Gtk3.
 pixbufRenderPixmapAndMaskForColormap ::
     Pixbuf                    -- ^ A pixbuf.
  -> Colormap                  -- ^ A Colormap
@@ -791,5 +799,4 @@
       pm <- wrapNewGObject mkPixmap (peek pmRetPtr :: IO (Ptr Pixmap))
       bm <- maybeNull (wrapNewGObject mkPixmap) (peek bmRetPtr :: IO (Ptr Bitmap))
       return (pm, bm)
-
-
+#endif
diff --git a/Graphics/UI/Gtk/Gdk/Pixmap.chs b/Graphics/UI/Gtk/Gdk/Pixmap.chs
--- a/Graphics/UI/Gtk/Gdk/Pixmap.chs
+++ b/Graphics/UI/Gtk/Gdk/Pixmap.chs
@@ -29,6 +29,8 @@
 --
 -- Pixmaps -- Offscreen drawables 
 --
+-- This module is empty when built with Gtk3 because Pixmap has been
+-- removed.
 module Graphics.UI.Gtk.Gdk.Pixmap (
 -- * Detail
 -- Pixmaps are offscreen drawables. They can be drawn upon with the
@@ -42,15 +44,18 @@
 -- |   +----'Drawable'
 -- |         +----Pixmap
 -- @
-
+#if GTK_MAJOR_VERSION < 3
 -- * Types
   Pixmap, PixmapClass, 
   Bitmap,
 
 -- * Constructors
   pixmapNew
+#endif
   ) where
 
+#if GTK_MAJOR_VERSION < 3
+
 import Data.Maybe
 import System.Glib.FFI
 import System.Glib.GObject           (wrapNewGObject)
@@ -103,3 +108,5 @@
       (fromIntegral width) (fromIntegral height)
       (fromIntegral $ fromMaybe (negate 1) depth)
 #endif
+
+#endif /* GTK_MAJOR_VERSION < 3 */
diff --git a/Graphics/UI/Gtk/Gdk/Region.chs b/Graphics/UI/Gtk/Gdk/Region.chs
--- a/Graphics/UI/Gtk/Gdk/Region.chs
+++ b/Graphics/UI/Gtk/Gdk/Region.chs
@@ -33,7 +33,10 @@
 -- * Regions consist of a set of non-overlapping rectangles. They are used to
 --   specify the area of a window which needs updating.
 --
+-- This module is empty when built with Gtk3 because Pixmap has been
+-- removed.
 module Graphics.UI.Gtk.Gdk.Region (
+#if GTK_MAJOR_VERSION < 3
   makeNewRegion,
   Region(Region),
   regionNew,
@@ -54,8 +57,12 @@
   regionIntersect,
   regionUnion,
   regionSubtract,
-  regionXor) where
+  regionXor
+#endif
+  ) where
 
+#if GTK_MAJOR_VERSION < 3
+
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -217,4 +224,4 @@
 regionXor :: Region -> Region -> IO ()
 regionXor reg1 reg2 = {#call unsafe region_xor#} reg1 reg2
 
-
+#endif
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
@@ -57,6 +57,7 @@
 
 -- * Methods
   screenGetDefault,
+#if GTK_MAJOR_VERSION <3
   screenGetSystemColormap,
 #if GTK_CHECK_VERSION(2,8,0)
   screenGetRGBAColormap,
@@ -65,6 +66,7 @@
   screenGetDefaultColormap,
   screenSetDefaultColormap,
 #endif
+#endif
 
 --  screenGetSystemVisual,
 #if GTK_CHECK_VERSION(2,10,0)
@@ -100,7 +102,9 @@
 -- * Attributes
   screenFontOptions,
   screenResolution,
+#if GTK_MAJOR_VERSION < 3
   screenDefaultColormap,
+#endif
 
 -- * Signals
   screenSizeChanged,
@@ -144,6 +148,7 @@
   maybeNull (makeNewGObject mkScreen) $
   {# call gdk_screen_get_default #}
 
+#if GTK_MAJOR_VERSION < 3
 screenGetDefaultColormap :: Screen
  -> IO Colormap -- ^ returns the default 'Colormap'.
 screenGetDefaultColormap self =
@@ -163,6 +168,7 @@
 
 -- | Gets the system default colormap for @screen@
 --
+-- Removed in Gtk3.
 screenGetSystemColormap :: Screen
  -> IO Colormap -- ^ returns the default colormap for @screen@.
 screenGetSystemColormap self =
@@ -181,6 +187,7 @@
 --
 -- * Available since Gdk version 2.8
 --
+-- Removed in Gtk3.
 screenGetRGBAColormap :: Screen
  -> IO (Maybe Colormap) -- ^ returns a colormap to use for windows with an
                         -- alpha channel or @Nothing@ if the capability is not
@@ -190,6 +197,7 @@
   {# call gdk_screen_get_rgba_colormap #}
     self
 #endif
+#endif
 
 -- | Get the system's default visual for @screen@. This is the visual for the
 -- root window of the display.
@@ -523,14 +531,17 @@
 screenResolution :: Attr Screen Double
 screenResolution = newAttrFromDoubleProperty "resolution"
 
+#if GTK_MAJOR_VERSION < 3
 -- | Sets the default @colormap@ for @screen@.
 --
 -- Gets the default colormap for @screen@.
 --
+-- Removed in Gtk3.
 screenDefaultColormap :: Attr Screen Colormap
 screenDefaultColormap = newAttr
   screenGetDefaultColormap
   screenSetDefaultColormap
+#endif
 
 --------------------
 -- Signals
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
@@ -70,9 +70,11 @@
   toDragContext,
   
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
   dragContextActions,
   dragContextSuggestedAction,
   dragContextAction,
+#endif
   
   dragDestSet,
   dragDestSetProxy,
@@ -150,9 +152,12 @@
                                      )
 import Graphics.UI.Gtk.Gdk.Events ( TimeStamp, Modifier )
 import Graphics.UI.Gtk.General.Structs ( Point, 
+#if GTK_MAJOR_VERSION < 3
   dragContextGetActions, dragContextSetActions,
   dragContextGetSuggestedAction, dragContextSetSuggestedAction,
-  dragContextGetAction, dragContextSetAction )
+  dragContextGetAction, dragContextSetAction
+#endif
+  )
 import Graphics.UI.Gtk.Signals
 import Control.Monad.Reader (runReaderT)
 
@@ -162,9 +167,11 @@
 --------------------
 -- Methods
 
+#if GTK_MAJOR_VERSION < 3
 -- | A set of actions that the source recommends to be taken. Only valid if
 --   'dragContextSuggestedAction' is set to 'ActionAsk'.
 --
+-- Removed in Gtk3.
 dragContextActions :: Attr DragContext [DragAction]
 dragContextActions = newAttr (liftM toFlags . dragContextGetActions)
                              (\o -> dragContextSetActions o . fromFlags)
@@ -178,6 +185,7 @@
 dragContextAction :: Attr DragContext DragAction
 dragContextAction = newAttr (liftM toEnum . dragContextGetAction)
                             (\o -> dragContextSetAction o . fromEnum)
+#endif
 
 -- %hash c:4ff5 d:af3f
 
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
@@ -41,13 +41,17 @@
 #endif
   DirectionType(..),
   Justification(..),
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   MatchType(..),
 #endif
+#endif
   MenuDirectionType(..),
+#if GTK_MAJOR_VERSION < 3
 #if GTK_CHECK_VERSION(2,8,0)
   MetricType(..),
 #endif
+#endif
   MovementStep(..),
   Orientation(..),
   Packing(..), toPacking, fromPacking,
@@ -56,7 +60,9 @@
   PathType(..),
   PolicyType(..),
   PositionType(..),
+#if GTK_MAJOR_VERSION < 3
   ProgressBarOrientation(..),
+#endif
   ReliefStyle(..),
   ResizeMode(..),
   ScrollType(..),
@@ -65,10 +71,12 @@
   ShadowType(..),
   SortType(..),
   StateType(..),
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   SubmenuDirection(..),
   SubmenuPlacement(..),
 #endif
+#endif
   SpinButtonUpdatePolicy(..),
   SpinType(..),
   TargetFlags(..),
@@ -78,15 +86,19 @@
   ToolbarStyle(..),
   TreeViewColumnSizing(..),
   --TroughType(..),
+#if GTK_MAJOR_VERSION < 3
   UpdateType(..),
   Visibility(..),
+#endif
   WindowPosition(..),
   WindowType(..),
   WrapMode(..), 
 #if GTK_CHECK_VERSION(2,16,0)
   EntryIconPosition(..),
 #endif
+#if GTK_MAJOR_VERSION < 3
   AnchorType (..),
+#endif
 
 module Graphics.UI.Gtk.Gdk.Enums
   ) where
@@ -212,19 +224,25 @@
 --
 {#enum Justification {underscoreToCase} deriving (Eq,Show)#}
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Some kind of string search options
 --
+-- Removed in Gtk3.
 {#enum MatchType {underscoreToCase} deriving (Eq,Show)#}
 #endif
+#endif
 
 -- | From where was a menu item entered?
 --
 {#enum MenuDirectionType {underscoreToCase} deriving (Eq,Show)#}
 
+#if GTK_MAJOR_VERSION < 3
 -- | Units of measure
 --
+-- Removed in Gtk3.
 {#enum MetricType {underscoreToCase} deriving (Eq,Show)#}
+#endif
 
 -- | Movement in text widget
 --
@@ -294,10 +312,13 @@
 --
 {#enum PositionType {underscoreToCase} deriving (Eq,Show)#}
 
+#if GTK_MAJOR_VERSION < 3
 -- | Is the ProgressBar horizontally or vertically
 -- directed?
 --
+-- Removed in Gtk3.
 {#enum ProgressBarOrientation {underscoreToCase} deriving (Eq,Show)#}
+#endif
 
 -- | I don't have a clue.
 --
@@ -346,15 +367,19 @@
 --
 {#enum StateType {underscoreToCase} deriving (Eq,Show)#}
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Submenu direction policies
 --
+-- Removed in Gtk3.
 {#enum SubmenuDirection {underscoreToCase} deriving (Eq,Show)#}
 
 -- | Submenu placement policies
 --
+-- Removed in Gtk3.
 {#enum SubmenuPlacement {underscoreToCase} deriving (Eq,Show)#}
 #endif
+#endif
 
 -- | Whether to clamp or ignore illegal values.
 --
@@ -404,15 +429,18 @@
 -- hm... text editing?
 --{#enum TroughType {underscoreToCase} deriving (Eq,Show)#}
 
-
+#if GTK_MAJOR_VERSION < 3
 -- | Updating types for range widgets (determines when the
 -- @\"connectToValueChanged\"@ signal is emitted by the widget)
 --
+-- Removed in Gtk3.
 {#enum UpdateType {underscoreToCase} deriving (Eq,Show)#}
 
 -- | Visibility
 --
+-- Removed in Gtk3.
 {#enum Visibility {underscoreToCase} deriving (Eq,Show)#}
+#endif
 
 -- | Window position types
 --
@@ -432,7 +460,9 @@
 {#enum EntryIconPosition {underscoreToCase} deriving (Eq,Show)#}
 #endif
 
+#if GTK_MAJOR_VERSION < 3
 -- |
 --
+-- Removed in Gtk3.
 {#enum AnchorType {underscoreToCase} deriving (Eq,Show)#}
-
+#endif
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
@@ -49,9 +49,11 @@
   mainDoEvent,
 
   -- ** Call when mainloop is left
+#if GTK_MAJOR_VERSION < 3
   quitAddDestroy,
   quitAdd,
   quitRemove,
+#endif
   
   -- * Grab widgets
   grabAdd,
@@ -139,6 +141,7 @@
 --
 initGUI :: IO [String]
 initGUI = do
+  initialise
   when rtsSupportsBoundThreads initialiseGThreads
   -- note: initizliseGThreads calls 'threadsEnter'
   prog <- getProgName
@@ -162,6 +165,9 @@
 foreign import ccall "hsgthread.h gtk2hs_threads_initialise"
   initialiseGThreads :: IO ()
 
+foreign import ccall "hsgthread.h gtk2hs_initialise"
+  initialise :: IO ()
+
 -- | Post an action to be run in the main GUI thread.
 --
 -- The current thread blocks until the action completes and the result is
@@ -292,7 +298,10 @@
   ptr <- ask
   liftIO $ {#call main_do_event #} (castPtr ptr)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Trigger destruction of object in case the mainloop at level @mainLevel@ is quit.
+--
+-- Removed in Gtk3.
 quitAddDestroy :: ObjectClass obj 
                  => Int -- ^ @mainLevel@ Level of the mainloop which shall trigger the destruction. 
                  -> obj -- ^ @object@     Object to be destroyed.                                    
@@ -303,6 +312,8 @@
      (toObject obj)
 
 -- | Registers a function to be called when an instance of the mainloop is left.
+--
+-- Removed in Gtk3.
 quitAdd :: Int -- ^ @mainLevel@ Level at which termination the function shall be called. You can pass 0 here to have the function run at the current mainloop.                                                                           
         -> (IO Bool) -- ^ @function@   The function to call. This should return 'False' to be removed from the list of quit handlers. Otherwise the function might be called again.
         -> IO Int -- ^ returns    A handle for this quit handler (you need this for 'quitRemove')
@@ -321,10 +332,13 @@
   (Ptr () -> IO {#type gboolean#}) -> IO GtkFunction
 
 -- | Removes a quit handler by its identifier.
+--
+-- Removed in Gtk3.
 quitRemove :: Int -- ^ @quitHandlerId@ Identifier for the handler returned when installing it.  
            -> IO ()
 quitRemove quitHandlerId =
   {#call quit_remove #} (fromIntegral quitHandlerId)
+#endif
 
 -- | add a grab widget
 --
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
@@ -319,7 +319,7 @@
 --
 iconSourceGetFilename :: IconSource -> IO (Maybe String)
 iconSourceGetFilename is = do
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) 
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   strPtr <- {#call unsafe icon_source_get_filename_utf8#} is
 #else
   strPtr <- {#call unsafe icon_source_get_filename#} is
@@ -383,7 +383,7 @@
 --
 iconSourceSetFilename :: IconSource -> FilePath -> IO ()
 iconSourceSetFilename is name = 
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) 
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   withUTFString name $ {# call unsafe icon_source_set_filename_utf8 #} is
 #else
   withUTFString name $ {# call unsafe icon_source_set_filename #} is
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
@@ -70,7 +70,9 @@
   selectionRemoveAll,
 
   selectionDataSet,
+#if GTK_MAJOR_VERSION < 3
   selectionDataGet,
+#endif
   selectionDataIsValid,
   selectionDataSetText,
   selectionDataGetText,
@@ -82,7 +84,9 @@
   selectionDataTargetsIncludeImage,
 #endif
   selectionDataGetTarget,
+#if GTK_MAJOR_VERSION < 3
   selectionDataSetTarget,
+#endif
   selectionDataGetTargets,
   selectionDataTargetsIncludeText,
 #if GTK_CHECK_VERSION(2,10,0)
@@ -109,7 +113,10 @@
   selectionTypeAtom,
   selectionTypeInteger,
   selectionTypeString,
-  selectionDataGetType)
+#if GTK_MAJOR_VERSION < 3
+  selectionDataGetType
+#endif
+  )
 
 import Graphics.UI.Gtk.Signals
 import System.Glib.UTFString ( peekUTFString, withUTFStringLen,
@@ -258,10 +265,26 @@
   {#call unsafe gtk_selection_data_set #} selPtr tagPtr (fromIntegral (8*sizeOf v))
     (castPtr arrayPtr) (fromIntegral (arrayLen*sizeOf v))
 
+-- The GtkSelectionData struct was made opaque in Gtk3, but the accessor routines
+-- where introduced in 2.14.
+#if GTK_CHECK_VERSION(2,14,0)
+selectionDataGet_format selPtr = {#call gtk_selection_data_get_format#} selPtr
+selectionDataGet_length selPtr = {#call gtk_selection_data_get_length#} selPtr
+selectionDataGet_data selPtr = {#call gtk_selection_data_get_data#} selPtr
+selectionDataGet_target selPtr = {#call gtk_selection_data_get_target#} selPtr
+#else
+selectionDataGet_format selPtr = {#get SelectionData -> format#} selPtr
+selectionDataGet_length selPtr = {#get SelectionData -> length#} selPtr
+selectionDataGet_data selPtr = {#get SelectionData -> data#} selPtr
+selectionDataGet_target selPtr = {#get SelectionData -> target#} selPtr
+#endif
+
+#if GTK_MAJOR_VERSION < 3
 -- | Retreives the data in the 'SelectionDataM' monad. The returned array
 --   must have elements of the size that were used to set this data. If
 --   the size or the type tag does not match, @Nothing@ is returned.
 --
+-- Removed in Gtk3.
 selectionDataGet :: (Integral a, Storable a) => 
                     SelectionTypeTag -> SelectionDataM (Maybe [a])
 selectionDataGet tagPtr = do
@@ -269,18 +292,19 @@
   liftIO $ do
     typeTag <- selectionDataGetType selPtr
     if typeTag/=tagPtr then return Nothing else do
-    bitSize <- liftM fromIntegral $ {#get SelectionData -> format#} selPtr
-    lenBytes <- liftM fromIntegral $ {#get SelectionData -> length#} selPtr
-    dataPtr <- liftM castPtr $ {#get SelectionData -> data#} selPtr
+    bitSize <- liftM fromIntegral $ selectionDataGet_format selPtr
+    lenBytes <- liftM fromIntegral $ selectionDataGet_length selPtr
+    dataPtr <- liftM castPtr $ selectionDataGet_data selPtr
     if lenBytes<=0 || bitSize/=sizeOf (unsafePerformIO (peek dataPtr))*8
       then return Nothing
       else liftM Just $ do
         peekArray (fromIntegral (lenBytes `quot` (bitSize `quot` 8))) dataPtr
+#endif
 
 selectionDataGetLength :: SelectionDataM Int
 selectionDataGetLength = do
   selPtr <- ask
-  liftIO $ liftM fromIntegral $ {#get SelectionData -> length#} selPtr    
+  liftIO $ liftM fromIntegral $ selectionDataGet_length selPtr    
 
 -- | Check if the currently stored data is valid.
 --
@@ -376,13 +400,17 @@
 selectionDataGetTarget :: SelectionDataM TargetTag
 selectionDataGetTarget = do
   selPtr <- ask
-  liftM Atom $ liftIO $ {#get SelectionData -> target#} selPtr
+  liftM Atom $ liftIO $ selectionDataGet_target selPtr
 
+#if GTK_MAJOR_VERSION < 3
 -- | Set the selection to the given 'TargetTag'.
+--
+-- Removed in Gtk3.
 selectionDataSetTarget :: TargetTag -> SelectionDataM ()
 selectionDataSetTarget (Atom targetTag) = do
   selPtr <- ask
   liftIO $ {#set SelectionData -> target#} selPtr targetTag
+#endif
 
 -- %hash c:e659 d:af3f
 -- | Queries the content type of the selection data as a list of targets.
diff --git a/Graphics/UI/Gtk/General/Settings.chs b/Graphics/UI/Gtk/General/Settings.chs
new file mode 100644
--- /dev/null
+++ b/Graphics/UI/Gtk/General/Settings.chs
@@ -0,0 +1,134 @@
+{-# LANGUAGE CPP #-}
+-- -*-haskell-*-
+--  GIMP Toolkit (GTK) Clipboard
+--
+--  Author : Axel Simon
+--
+--  Created: 26 March 2007
+--
+--  Copyright (C) 2007 Axel Simon
+--
+--  This library is free software; you can redistribute it and/or
+--  modify it under the terms of the GNU Lesser General Public
+--  License as published by the Free Software Foundation; either
+--  version 2.1 of the License, or (at your option) any later version.
+--
+--  This library is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+--  Lesser General Public License for more details.
+--
+-- I removed all definitions for the clipboard by Juergen Nicklisch since
+-- the way the clipboards were selected didn't tie in with the Selection
+-- module.
+--
+-- |
+-- Maintainer  : gtk2hs-users@lists.sourceforge.net
+-- Stability   : provisional
+-- Portability : portable (depends on GHC)
+--
+-- Storing data on clipboards
+--
+module Graphics.UI.Gtk.General.Settings (
+
+-- * Class Hierarchy
+--
+-- |
+-- @
+-- |  'GObject'
+-- |   +----Settings
+-- @
+
+-- * Types
+  Settings,
+  SettingsClass,
+  castToSettings, gTypeSettings,
+  toSettings,
+
+-- * Methods
+  settingsGetDefault,
+#if GTK_CHECK_VERSION(2,2,0)
+  settingsGetForScreen,
+#endif
+  settingsSetLongProperty,
+  settingsSetStringProperty
+  ) where
+
+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" #}
+
+
+--------------------
+-- Methods
+
+-- | Gets the Settings object for the default GDK screen, creating
+-- it if necessary. See 'settingsGetForScreen'.
+--
+settingsGetDefault ::
+    IO (Maybe Settings) -- ^ returns a Settings. If there is no default
+                        -- screen, then returns Nothing.
+settingsGetDefault =
+  maybeNull (makeNewGObject mkSettings)
+    {# call gtk_settings_get_default #}
+
+#if GTK_CHECK_VERSION(2,2,0)
+-- | Gets the Settings object for screen, creating it if necessary.
+--
+settingsGetForScreen ::
+    ScreenClass screen
+ => screen
+ -> IO Settings
+settingsGetForScreen screen =
+  makeNewGObject mkSettings $
+    {# call gtk_settings_get_for_screen #}
+      (toScreen screen)
+#endif
+
+settingsSetLongProperty ::
+    SettingsClass settings
+ => settings
+ -> String
+ -> Int
+ -> String
+ -> IO ()
+settingsSetLongProperty settings name value origin =
+  withUTFString name $ \namePtr ->
+  withUTFString origin $ \originPtr ->
+  {# call gtk_settings_set_long_property #}
+    (toSettings settings)
+    namePtr
+    (fromIntegral value)
+    originPtr
+
+settingsSetStringProperty ::
+    SettingsClass settings
+ => settings
+ -> String
+ -> String
+ -> String
+ -> IO ()
+settingsSetStringProperty settings name value origin =
+  withUTFString name $ \namePtr ->
+  withUTFString value $ \valuePtr ->
+  withUTFString origin $ \originPtr ->
+  {# call gtk_settings_set_string_property #}
+    (toSettings settings)
+    namePtr
+    valuePtr
+    originPtr
+
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
@@ -3,9 +3,11 @@
 -- -*-haskell-*-
 
 #include <gtk/gtk.h>
-#include <gdk/gdk.h>         
+#include <gdk/gdk.h>
 #include "template-hsc-gtk2hs.h"
-
+#if GTK_MAJOR_VERSION >= 3
+#include <gtk/gtkx.h>
+#endif
 --  GIMP Toolkit (GTK) Structures
 --
 --  Author : Axel Simon
@@ -35,19 +37,23 @@
   Point,
   Rectangle(..),
   Color(..),
+#if GTK_MAJOR_VERSION < 3
   GCValues(..),
   pokeGCValues,
   newGCValues,
   widgetGetState,
   widgetGetSavedState,
+#endif
   Allocation,
   Requisition(..),
   treeIterSize,
   textIterSize,
   inputError,
+#if GTK_MAJOR_VERSION < 3
   dialogGetUpper,
   dialogGetActionArea,
   fileSelectionGetButtons,
+#endif
   ResponseId(..),
   fromResponse,
   toResponse,
@@ -58,12 +64,15 @@
   nativeWindowIdNone,
 #endif
   drawableGetID,
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   toolbarChildButton,
   toolbarChildToggleButton,
   toolbarChildRadioButton,
 #endif
+#endif
   IconSize(..),
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   comboGetList,
 #endif
@@ -71,6 +80,7 @@
   widgetGetSize,
   layoutGetDrawWindow,
   windowGetFrame,
+#endif
   styleGetForeground,
   styleGetBackground,
   styleGetLight,
@@ -79,6 +89,7 @@
   styleGetText,
   styleGetBase,
   styleGetAntiAliasing,
+#if GTK_MAJOR_VERSION < 3
   colorSelectionDialogGetColor,
   colorSelectionDialogGetOkButton,
   colorSelectionDialogGetCancelButton,
@@ -89,6 +100,7 @@
   dragContextSetSuggestedAction,
   dragContextGetAction,
   dragContextSetAction,
+#endif
   SortColumnId,
   treeSortableDefaultSortColumnId,
   tagInvalid,
@@ -99,7 +111,9 @@
   selectionTypeAtom,
   selectionTypeInteger,
   selectionTypeString,
+#if GTK_MAJOR_VERSION < 3
   selectionDataGetType,
+#endif
   withTargetEntries,
   KeymapKey (..)
   ) where
@@ -113,8 +127,10 @@
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 import System.Glib.GObject		(makeNewGObject)
 import Graphics.UI.Gtk.Types
-import Graphics.UI.Gtk.Gdk.Enums	(Function, Fill, SubwindowMode,
-					 LineStyle, CapStyle, JoinStyle)
+#if GTK_MAJOR_VERSION < 3
+import Graphics.UI.Gtk.Gdk.Enums (Function, Fill, SubwindowMode,
+                                  LineStyle, CapStyle, JoinStyle)
+#endif
 import Graphics.UI.Gtk.General.Enums	(StateType)
 import Graphics.UI.Gtk.General.DNDTypes (InfoId, Atom(Atom) , SelectionTag,
                                          TargetTag, SelectionTypeTag)
@@ -167,10 +183,13 @@
     #{poke GdkColor, red}   ptr red
     #{poke GdkColor, green} ptr green
     #{poke GdkColor, blue}  ptr blue
+#if GTK_MAJOR_VERSION < 3
     cPtr <- gdkColormapGetSystem
     gdkColormapAllocColor cPtr ptr 0 1
+#endif
     return ()
 
+#if GTK_MAJOR_VERSION < 3
 type ColorMap = ()
 
 foreign import ccall unsafe "gdk_colormap_get_system"
@@ -183,13 +202,13 @@
   gdkColormapQueryColor :: Ptr ColorMap -> CULong -> Ptr Color -> IO ()
 
 -- entry GC
-
 -- | Intermediate data structure for 'GC's.
 --
 -- * If @graphicsExposure@ is set then copying portions into a
 --   drawable will generate an @\"exposure\"@ event, even if the
 --   destination area is not currently visible.
 --
+-- Removed in Gtk3.
 data GCValues = GCValues {
   foreground :: Color,
   background :: Color,
@@ -370,6 +389,7 @@
 -- * Use this value instead of the constructor to avoid compiler wanings
 --   about uninitialized fields.
 --
+-- Removed in Gtk3.
 newGCValues :: GCValues
 newGCValues = GCValues {
     foreground = undefined,
@@ -390,14 +410,16 @@
     capStyle   = undefined,
     joinStyle  = undefined
   }
+#endif
 
 -- Widget related methods
-
+#if GTK_MAJOR_VERSION < 3
 -- | Retrieve the current state of the widget.
 --
 -- * The state refers to different modes of user interaction, see
 --   'StateType' for more information.
 --
+-- Removed in Gtk3.
 widgetGetState :: WidgetClass w => w -> IO StateType
 widgetGetState w =
   liftM (\x -> toEnum (fromIntegral (x :: #gtk2hs_type guint8))) $
@@ -408,11 +430,12 @@
 -- * If a widget is turned insensitive, the previous state is stored in
 --   a specific location. This function retrieves this previous state.
 --
+-- Removed in Gtk3.
 widgetGetSavedState :: WidgetClass w => w -> IO StateType
 widgetGetSavedState w =
   liftM (\x -> toEnum (fromIntegral (x :: #gtk2hs_type guint8))) $
   withForeignPtr ((unWidget . toWidget) w) $ #{peek GtkWidget,saved_state}
-
+#endif
 
 -- | Allocation
 --
@@ -463,7 +486,7 @@
 textIterSize = #{const sizeof(GtkTextIter)}
 
 -- Dialog related methods
-
+#if GTK_MAJOR_VERSION < 3
 -- | Get the upper part of a dialog.
 --
 -- * The upper part of a dialog window consists of a 'VBox'.
@@ -482,6 +505,7 @@
 dialogGetActionArea :: DialogClass dc => dc -> IO HBox
 dialogGetActionArea dc = makeNewObject mkHBox $ liftM castPtr $
   withForeignPtr ((unDialog.toDialog) dc) #{peek GtkDialog, action_area} 
+#endif
 
 -- | Some constructors that can be used as response
 -- numbers for dialogs.
@@ -582,8 +606,22 @@
 fromNativeWindowId = castPtr . unNativeWindowId
 nativeWindowIdNone :: NativeWindowId
 nativeWindowIdNone = NativeWindowId nullPtr
+#elif defined(HAVE_QUARTZ_GTK) || (defined(WIN32) && GTK_MAJOR_VERSION >= 3)
+newtype NativeWindowId = NativeWindowId (Maybe DrawWindow) deriving (Eq)
+unNativeWindowId :: NativeWindowId -> Maybe DrawWindow
+unNativeWindowId (NativeWindowId id) = id
+toNativeWindowId :: Maybe DrawWindow -> NativeWindowId
+toNativeWindowId = NativeWindowId
+fromNativeWindowId :: NativeWindowId -> Maybe DrawWindow
+fromNativeWindowId = unNativeWindowId
+nativeWindowIdNone :: NativeWindowId
+nativeWindowIdNone = NativeWindowId Nothing
 #else
+#if GTK_MAJOR_VERSION < 3
 newtype NativeWindowId = NativeWindowId #{gtk2hs_type GdkNativeWindow} deriving (Eq, Show)
+#else
+newtype NativeWindowId = NativeWindowId #{gtk2hs_type Window} deriving (Eq, Show)
+#endif
 unNativeWindowId :: Integral a => NativeWindowId -> a
 unNativeWindowId (NativeWindowId id) = fromIntegral id
 toNativeWindowId :: Integral a => a -> NativeWindowId
@@ -595,20 +633,35 @@
 #endif
 #endif
 
+#if GTK_MAJOR_VERSION < 3
 #if defined(WIN32)
 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" 
   gdk_x11_drawable_get_xid :: (Ptr Drawable) -> IO CInt
-#endif                                                                           
+#endif
+#else
+#if !defined(HAVE_QUARTZ_GTK) && !defined(WIN32)
+foreign import ccall unsafe "gdk_x11_window_get_xid" 
+  gdk_x11_drawable_get_xid :: (Ptr DrawWindow) -> IO CInt
+#endif
+#endif
 
--- | Get 'NativeWindowId' of 'Drawable'.                                  
+-- | Get 'NativeWindowId' of 'Drawable'.
+#if GTK_MAJOR_VERSION < 3
 drawableGetID :: DrawableClass d => d -> IO NativeWindowId
+#else
+drawableGetID :: DrawWindowClass d => d -> IO NativeWindowId
+#endif
 drawableGetID d =
   liftM toNativeWindowId $
+#if GTK_MAJOR_VERSION < 3
   (\(Drawable drawable) ->
-#if defined(WIN32)
+#else
+  (\(DrawWindow drawable) ->
+#endif
+#if defined(WIN32) && GTK_MAJOR_VERSION < 3
 #if GTK_CHECK_VERSION(2,14,0)
 #else
      -- GTK-2.12 is a bit sloppy about the distinction between pointers and
@@ -616,24 +669,32 @@
      liftM unsafeCoerce $
 #endif
      withForeignPtr drawable gdk_win32_drawable_get_handle
-#elif !defined(HAVE_QUARTZ_GTK)
+#elif !defined(HAVE_QUARTZ_GTK) && !defined(WIN32)
      withForeignPtr drawable gdk_x11_drawable_get_xid
 #else
-     error "drawableGetID: not supported with a GTK using a Quartz backend"
+     return $ Just (DrawWindow drawable)
 #endif
+#if GTK_MAJOR_VERSION < 3
   ) (toDrawable d)
+#else
+  ) (toDrawWindow d)
+#endif
 
+
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- Static values for different Toolbar widgets.
 --
 -- * c2hs and hsc should agree on types!
 --
+-- Removed in Gtk3.
 toolbarChildButton, toolbarChildToggleButton, toolbarChildRadioButton ::
   CInt -- \#gtk2hs_type GtkToolbarChildType
 toolbarChildButton       = #const GTK_TOOLBAR_CHILD_BUTTON
 toolbarChildToggleButton = #const GTK_TOOLBAR_CHILD_TOGGLEBUTTON
 toolbarChildRadioButton  = #const GTK_TOOLBAR_CHILD_RADIOBUTTON
 #endif
+#endif
 
 -- | The size of an icon in pixels.
 --
@@ -688,17 +749,19 @@
   fromEnum (IconSizeUser n) = n
   
 -- entry Widget Combo
-
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Extract the List container from a 'Combo' box.
 --
+-- Removed in Gtk3.
 comboGetList :: Combo -> IO List
 comboGetList c = withForeignPtr (unCombo c) $ \cPtr ->
   makeNewObject mkList $ #{peek GtkCombo, list} cPtr
 #endif
+#endif
 
 -- FileSelection related methods
-
+#if GTK_MAJOR_VERSION < 3
 -- | Extract the buttons of a fileselection.
 --
 fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> 
@@ -711,7 +774,9 @@
   where
   butPtrToButton bp = makeNewObject mkButton $ liftM castPtr $
       withForeignPtr ((unFileSelection . toFileSelection) fsel) bp
+#endif
 
+#if GTK_MAJOR_VERSION < 3
 -- DrawingArea related methods
 
 -- | Retrieves the 'DrawWindow' that the widget draws onto.
@@ -723,6 +788,7 @@
 -- opportunity to use a widget's 'DrawWindow' as soon as it has been created
 -- but before the widget is displayed.
 --
+-- Removed in Gtk3.
 widgetGetDrawWindow :: WidgetClass widget => widget -> IO DrawWindow
 widgetGetDrawWindow da =
   withForeignPtr (unWidget.toWidget $ da) $ \da' -> do
@@ -735,6 +801,7 @@
 --
 -- * This information may be out of date if the user is resizing the window.
 --
+-- 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} 
@@ -747,6 +814,7 @@
 
 -- | Retrieves the 'Drawable' part.
 --
+-- Removed in Gtk3.
 layoutGetDrawWindow :: Layout -> IO DrawWindow
 layoutGetDrawWindow lay = makeNewGObject mkDrawWindow $
   withForeignPtr (unLayout lay) $
@@ -756,6 +824,7 @@
 
 -- | Retrieves the frame 'DrawWindow' that contains a 'Window'.
 --
+-- Removed in Gtk3.
 windowGetFrame :: WindowClass widget => widget -> IO (Maybe DrawWindow)
 windowGetFrame da =
   withForeignPtr (unWidget.toWidget $ da) $ \da' -> do
@@ -763,7 +832,7 @@
   if drawWindowPtr == nullPtr
     then return Nothing
     else liftM Just $ makeNewGObject mkDrawWindow (return $ castPtr drawWindowPtr)
-
+#endif
 -- Styles related methods
 
 -- | Retrieve the the foreground color.
@@ -868,7 +937,10 @@
   withForeignPtr (unStyle st) $ \stPtr ->
     peekElemOff (#{ptr GtkStyle, text_aa} stPtr) (fromEnum ty)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Retrieve the ColorSelection object contained within the dialog.
+--
+-- Removed in Gtk3.
 colorSelectionDialogGetColor :: ColorSelectionDialog -> IO ColorSelection
 colorSelectionDialogGetColor cd =
   makeNewObject mkColorSelection $ liftM castPtr $
@@ -876,6 +948,8 @@
       #{peek GtkColorSelectionDialog, colorsel}
 
 -- | Retrieve the OK button widget contained within the dialog.
+--
+-- Removed in Gtk3.
 colorSelectionDialogGetOkButton :: ColorSelectionDialog -> IO Button
 colorSelectionDialogGetOkButton cd =
   makeNewObject mkButton $ liftM castPtr $
@@ -883,6 +957,8 @@
       #{peek GtkColorSelectionDialog, ok_button}
 
 -- | Retrieve the Cancel button widget contained within the dialog.
+--
+-- Removed in Gtk3.
 colorSelectionDialogGetCancelButton :: ColorSelectionDialog -> IO Button
 colorSelectionDialogGetCancelButton cd =
   makeNewObject mkButton $ liftM castPtr $
@@ -890,6 +966,8 @@
       #{peek GtkColorSelectionDialog, cancel_button}
 
 -- | Retrieve the Help button widget contained within the dialog.
+--
+-- Removed in Gtk3.
 colorSelectionDialogGetHelpButton :: ColorSelectionDialog -> IO Button
 colorSelectionDialogGetHelpButton cd =
   makeNewObject mkButton $ liftM castPtr $
@@ -919,6 +997,7 @@
 dragContextSetSuggestedAction :: DragContext -> Int -> IO ()
 dragContextSetSuggestedAction dc val = withForeignPtr (unDragContext dc) $ \ptr ->
   #{poke GdkDragContext, suggested_action} ptr (fromIntegral val :: #{gtk2hs_type int})
+#endif
 
 -- | ID number of a sort column.
 --
@@ -971,11 +1050,13 @@
 selectionTypeString :: SelectionTypeTag
 selectionTypeString = intToAtom #{const GDK_SELECTION_TYPE_STRING}
 
+#if GTK_MAJOR_VERSION < 3
 -- | Extract the type field of SelectionData*. This should be in the
 --   Selection modules but c2hs chokes on the 'type' field.
 selectionDataGetType :: Ptr () -> IO SelectionTypeTag
 selectionDataGetType selPtr =
   liftM intToAtom $ #{peek GtkSelectionData, type} selPtr
+#endif
 
 -- A type that identifies a target. This is needed to marshal arrays of
 -- GtkTargetEntries.
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
@@ -61,8 +61,10 @@
   styleGetBase,
   styleGetAntiAliasing,
 
+#if GTK_MAJOR_VERSION < 3
   stylePaintFlatBox,
   stylePaintLayout,
+#endif
 
   ) where
 
@@ -84,6 +86,7 @@
                          Rectangle)
 import Graphics.UI.Gtk.General.Enums (StateType, ShadowType)
 
+#if GTK_MAJOR_VERSION < 3
 stylePaintFlatBox :: WidgetClass widget
                   => Style
                   -> DrawWindow
@@ -134,3 +137,4 @@
     detailPtr
     (fromIntegral x) (fromIntegral y)
     layout
+#endif
diff --git a/Graphics/UI/Gtk/General/hsgthread.c b/Graphics/UI/Gtk/General/hsgthread.c
deleted file mode 100644
--- a/Graphics/UI/Gtk/General/hsgthread.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/* We would use the g_thread_supported macro here, but unfortunately on
- * windows GHCi's dynamic linker cannot cope with references to global
- * variables imported from dlls.
- *
- * So instead of asking glib if we (or indeed) anyone else has initialised
- * the glib gthread system, we keep track of it ourselves. We still have to
- * do it in C land so the state survives :reload in GHCi. So there is the
- * danger in a mixed language program, of someone else initialising the
- * glib thread system and us not being aware of it. :-(
- *
- * Besides the interaction with ghci, we provide a variant of g_object_unref
- * that is used in all objects of Gtk+ and those libraries that build on Gtk+.
- * This variant enqueues the object to be finalized and adds an idle handler
- * into the main loop of Gtk+ that will call the actual finalizers on the
- * enqueued objects. The aim is to ensure that finalizers for objects that
- * may hold Xlib or Win32 resources are only run from the thread that runs the
- * main Gtk+ loop. If this is not ensured then bad things happen at least on
- * Win32 since that API is making use of thread-local storage that is not
- * present if the finalizers, that are run by the GC in a different thread,
- * call back into Win32 without this thread-local storage.
- *
- * Also g_static_mutex_lock and g_static_mutex_unlock cause linking problems
- * in ghci on Windows 7 (namely: HSgtk-0.10.5.o: unknown symbol
- * `__imp__g_threads_got_initialized'), so we use a Win32 critical section
- * instead.
- */
-
-#include <glib.h>
-#include <gdk/gdk.h>
-#include "hsgthread.h"
-
-#if defined( WIN32 )
-#include <windows.h>
-#endif
-
-#undef DEBUG
-
-static int threads_initialised = 0;
-#if defined( WIN32 )
-static CRITICAL_SECTION gtk2hs_finalizer_mutex;
-#else
-static GStaticMutex gtk2hs_finalizer_mutex;
-#endif
-static GSource* gtk2hs_finalizer_source;
-static guint gtk2hs_finalizer_id;
-static GArray* gtk2hs_finalizers;
-
-gboolean gtk2hs_run_finalizers(gpointer data);
-
-/* Initialize the threads system of Gdk and Gtk. */
-void gtk2hs_threads_initialise (void) {
-
-#ifdef DEBUG
-  printf("gtk2hs_threads_initialise: threads_initialised=%i, g_thread_get_initialized=%i\n",
-		threads_initialised, g_thread_get_initialized());
-#endif
-
-  if (!threads_initialised) {
-    threads_initialised = 1;
-#if defined( WIN32 )
-    InitializeCriticalSection(&gtk2hs_finalizer_mutex);
-#else
-    g_static_mutex_init(&gtk2hs_finalizer_mutex);
-#endif
-    g_thread_init(NULL);
-    gdk_threads_init();
-
-    /* from here onwards, the Gdk lock is held */
-    gdk_threads_enter();
-
-  }
-}
-
-/* Free an object within the Gtk2Hs lock. */
-void gtk2hs_g_object_unref_from_mainloop(gpointer object) {
-
-  int mutex_locked = 0;
-  if (threads_initialised) {
-#ifdef DEBUG
-      printf("acquiring lock to add a %s object at %lx\n",
-             g_type_name(G_OBJECT_TYPE(object)), (unsigned long) object);
-      printf("value of lock function is %lx\n",
-             (unsigned long) g_thread_functions_for_glib_use.mutex_lock);
-#endif
-#if defined( WIN32 )
-    EnterCriticalSection(&gtk2hs_finalizer_mutex);
-#else
-    g_static_mutex_lock(&gtk2hs_finalizer_mutex);
-#endif
-    mutex_locked = 1;
-  }
-
-#ifdef DEBUG
-  if (mutex_locked) printf("within mutex: ");
-  printf("adding finalizer to a %s object!\n", g_type_name(G_OBJECT_TYPE(object)));
-#endif
-
-  /* Ensure that the idle handler is still installed and that
-     the array of objects that are to be finalized exists. */
-  if (gtk2hs_finalizer_id==0) {
-
-    if (gtk2hs_finalizers == NULL)
-      gtk2hs_finalizers = g_array_new(0, 0, sizeof(gpointer));
-#ifdef DEBUG
-    printf("creating finalizer list.\n");
-#endif
-
-    if (gtk2hs_finalizer_source != NULL) {
-#ifdef DEBUG
-      printf("re-initializing finalizer source.\n");
-#endif
-      g_source_destroy(gtk2hs_finalizer_source);
-      g_source_unref(gtk2hs_finalizer_source);
-    };
-
-    gtk2hs_finalizer_source = g_idle_source_new();
-    g_source_set_callback(gtk2hs_finalizer_source, &gtk2hs_run_finalizers, 0, 0);
-    gtk2hs_finalizer_id = g_source_attach(gtk2hs_finalizer_source, NULL);
-
-  };
-
-  /* Add the object to the list. */
-  g_array_append_val(gtk2hs_finalizers, object);
-
-  if (mutex_locked) {
-#ifdef DEBUG
-    printf("releasing lock to add a %s object at %lx\n",
-           g_type_name(G_OBJECT_TYPE(object)), (unsigned long) object);
-#endif
-#if defined( WIN32 )
-    LeaveCriticalSection(&gtk2hs_finalizer_mutex);
-#else
-    g_static_mutex_unlock(&gtk2hs_finalizer_mutex);
-#endif
-  }
-}
-
-/* Run the finalizers that have been accumulated. */
-gboolean gtk2hs_run_finalizers(gpointer data) {
-  gint index;
-  g_assert(gtk2hs_finalizers!=NULL);
-
-  gdk_threads_enter();
-	
-  int mutex_locked = 0;
-  if (threads_initialised) {
-#ifdef DEBUG
-    printf("acquiring lock to kill objects\n");
-#endif
-#if defined( WIN32 )
-    EnterCriticalSection(&gtk2hs_finalizer_mutex);
-#else
-    g_static_mutex_lock(&gtk2hs_finalizer_mutex);
-#endif
-    mutex_locked = 1;
-  }
-
-#ifdef DEBUG
-  printf("running %i finalizers!\n", gtk2hs_finalizers->len);
-#endif
-
-  for (index = 0; index < gtk2hs_finalizers->len; index++)
-    g_object_unref(g_array_index (gtk2hs_finalizers, GObject*, index));
-
-  g_array_set_size(gtk2hs_finalizers, 0);
-
-  gtk2hs_finalizer_id = 0;
-
-  if (mutex_locked) {
-#ifdef DEBUG
-    printf("releasing lock to kill objects\n");
-#endif
-#if defined( WIN32 )
-    LeaveCriticalSection(&gtk2hs_finalizer_mutex);
-#else
-    g_static_mutex_unlock(&gtk2hs_finalizer_mutex);
-#endif
-  }
-
-  gdk_threads_leave();
-
-  return FALSE;
-}
-
diff --git a/Graphics/UI/Gtk/General/hsgthread.cpp b/Graphics/UI/Gtk/General/hsgthread.cpp
new file mode 100644
--- /dev/null
+++ b/Graphics/UI/Gtk/General/hsgthread.cpp
@@ -0,0 +1,202 @@
+/* We would use the g_thread_supported macro here, but unfortunately on
+ * windows GHCi's dynamic linker cannot cope with references to global
+ * variables imported from dlls.
+ *
+ * So instead of asking glib if we (or indeed) anyone else has initialised
+ * the glib gthread system, we keep track of it ourselves. We still have to
+ * do it in C land so the state survives :reload in GHCi. So there is the
+ * danger in a mixed language program, of someone else initialising the
+ * glib thread system and us not being aware of it. :-(
+ *
+ * Besides the interaction with ghci, we provide a variant of g_object_unref
+ * that is used in all objects of Gtk+ and those libraries that build on Gtk+.
+ * This variant enqueues the object to be finalized and adds an idle handler
+ * into the main loop of Gtk+ that will call the actual finalizers on the
+ * enqueued objects. The aim is to ensure that finalizers for objects that
+ * may hold Xlib or Win32 resources are only run from the thread that runs the
+ * main Gtk+ loop. If this is not ensured then bad things happen at least on
+ * Win32 since that API is making use of thread-local storage that is not
+ * present if the finalizers, that are run by the GC in a different thread,
+ * call back into Win32 without this thread-local storage.
+ *
+ * Also g_static_mutex_lock and g_static_mutex_unlock cause linking problems
+ * in ghci on Windows 7 (namely: HSgtk-0.10.5.o: unknown symbol
+ * `__imp__g_threads_got_initialized'), so we use a Win32 critical section
+ * instead.
+ */
+
+extern "C" {
+
+#define DEFINED_LPTYPELIB
+#define DEFINDE_LPTYPEINFO
+#define DEFINED_LPTYPECOMP
+#define DEFINE_LPCREATETYPEINFO
+#define DEFINED_LPDISPATCH
+
+#include <glib.h>
+#include <gdk/gdk.h>
+#include "hsgthread.h"
+
+#if defined( WIN32 )
+#include <windows.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#endif
+
+#undef DEBUG
+
+static int threads_initialised = 0;
+#if defined( WIN32 )
+static CRITICAL_SECTION gtk2hs_finalizer_mutex;
+#else
+static GStaticMutex gtk2hs_finalizer_mutex;
+#endif
+static GSource* gtk2hs_finalizer_source;
+static guint gtk2hs_finalizer_id;
+static GArray* gtk2hs_finalizers;
+
+gboolean gtk2hs_run_finalizers(gpointer data);
+
+/* Initialize the default _fmode on WIN32. */
+void gtk2hs_initialise (void) {
+#if defined( WIN32 )
+    _fmode = _O_BINARY;
+#endif
+}
+
+/* Initialize the threads system of Gdk and Gtk. */
+void gtk2hs_threads_initialise (void) {
+
+#ifdef DEBUG
+  printf("gtk2hs_threads_initialise: threads_initialised=%i, g_thread_get_initialized=%i\n",
+		threads_initialised, g_thread_get_initialized());
+#endif
+
+  if (!threads_initialised) {
+    threads_initialised = 1;
+#if defined( WIN32 )
+    InitializeCriticalSection(&gtk2hs_finalizer_mutex);
+#else
+    g_static_mutex_init(&gtk2hs_finalizer_mutex);
+#endif
+    g_thread_init(NULL);
+    gdk_threads_init();
+
+    /* from here onwards, the Gdk lock is held */
+    gdk_threads_enter();
+
+  }
+}
+
+/* Free an object within the Gtk2Hs lock. */
+void gtk2hs_g_object_unref_from_mainloop(gpointer object) {
+
+  int mutex_locked = 0;
+  if (threads_initialised) {
+#ifdef DEBUG
+      printf("acquiring lock to add a %s object at %lx\n",
+             g_type_name(G_OBJECT_TYPE(object)), (unsigned long) object);
+      printf("value of lock function is %lx\n",
+             (unsigned long) g_thread_functions_for_glib_use.mutex_lock);
+#endif
+#if defined( WIN32 )
+    EnterCriticalSection(&gtk2hs_finalizer_mutex);
+#else
+    g_static_mutex_lock(&gtk2hs_finalizer_mutex);
+#endif
+    mutex_locked = 1;
+  }
+
+#ifdef DEBUG
+  if (mutex_locked) printf("within mutex: ");
+  printf("adding finalizer to a %s object!\n", g_type_name(G_OBJECT_TYPE(object)));
+#endif
+
+  /* Ensure that the idle handler is still installed and that
+     the array of objects that are to be finalized exists. */
+  if (gtk2hs_finalizer_id==0) {
+
+    if (gtk2hs_finalizers == NULL)
+      gtk2hs_finalizers = g_array_new(0, 0, sizeof(gpointer));
+#ifdef DEBUG
+    printf("creating finalizer list.\n");
+#endif
+
+    if (gtk2hs_finalizer_source != NULL) {
+#ifdef DEBUG
+      printf("re-initializing finalizer source.\n");
+#endif
+      g_source_destroy(gtk2hs_finalizer_source);
+      g_source_unref(gtk2hs_finalizer_source);
+    };
+
+    gtk2hs_finalizer_source = g_idle_source_new();
+    g_source_set_callback(gtk2hs_finalizer_source, &gtk2hs_run_finalizers, 0, 0);
+    gtk2hs_finalizer_id = g_source_attach(gtk2hs_finalizer_source, NULL);
+
+  };
+
+  /* Add the object to the list. */
+  g_array_append_val(gtk2hs_finalizers, object);
+
+  if (mutex_locked) {
+#ifdef DEBUG
+    printf("releasing lock to add a %s object at %lx\n",
+           g_type_name(G_OBJECT_TYPE(object)), (unsigned long) object);
+#endif
+#if defined( WIN32 )
+    LeaveCriticalSection(&gtk2hs_finalizer_mutex);
+#else
+    g_static_mutex_unlock(&gtk2hs_finalizer_mutex);
+#endif
+  }
+}
+
+/* Run the finalizers that have been accumulated. */
+gboolean gtk2hs_run_finalizers(gpointer data) {
+  gint index;
+  g_assert(gtk2hs_finalizers!=NULL);
+
+  gdk_threads_enter();
+	
+  int mutex_locked = 0;
+  if (threads_initialised) {
+#ifdef DEBUG
+    printf("acquiring lock to kill objects\n");
+#endif
+#if defined( WIN32 )
+    EnterCriticalSection(&gtk2hs_finalizer_mutex);
+#else
+    g_static_mutex_lock(&gtk2hs_finalizer_mutex);
+#endif
+    mutex_locked = 1;
+  }
+
+#ifdef DEBUG
+  printf("running %i finalizers!\n", gtk2hs_finalizers->len);
+#endif
+
+  for (index = 0; index < gtk2hs_finalizers->len; index++)
+    g_object_unref(g_array_index (gtk2hs_finalizers, GObject*, index));
+
+  g_array_set_size(gtk2hs_finalizers, 0);
+
+  gtk2hs_finalizer_id = 0;
+
+  if (mutex_locked) {
+#ifdef DEBUG
+    printf("releasing lock to kill objects\n");
+#endif
+#if defined( WIN32 )
+    LeaveCriticalSection(&gtk2hs_finalizer_mutex);
+#else
+    g_static_mutex_unlock(&gtk2hs_finalizer_mutex);
+#endif
+  }
+
+  gdk_threads_leave();
+
+  return FALSE;
+}
+
+}
diff --git a/Graphics/UI/Gtk/General/hsgthread.h b/Graphics/UI/Gtk/General/hsgthread.h
--- a/Graphics/UI/Gtk/General/hsgthread.h
+++ b/Graphics/UI/Gtk/General/hsgthread.h
@@ -3,6 +3,9 @@
 #ifndef HSGTHREAD_H
 #define HSGTHREAD_H
 
+/* Initialize the default _fmode on WIN32 systems. */
+void gtk2hs_initialise (void);
+
 /* Initialize the threads system of Gdk and Gtk. */
 void gtk2hs_threads_initialise (void);
 
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
@@ -84,12 +84,13 @@
 -- * Methods
   fixedPut,
   fixedMove,
+#if GTK_MAJOR_VERSION < 3
   fixedSetHasWindow,
   fixedGetHasWindow,
 
 -- * Attributes
   fixedHasWindow,
-
+#endif
 -- * Child Attributes
   fixedChildX,
   fixedChildY,
@@ -147,6 +148,7 @@
     (fromIntegral x)
     (fromIntegral y)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Sets whether the 'Fixed' widget is created with a separate 'DrawWindow' for
 -- its window or not. (By default, it will be created with no separate
 -- 'DrawWindow'). This function must be called while the 'Fixed' is not
@@ -155,6 +157,7 @@
 -- This function was added to provide an easy migration path for older
 -- applications which may expect 'Fixed' to have a separate window.
 --
+-- Removed in Gtk3. Use the Widget version.
 fixedSetHasWindow :: FixedClass self => self -> Bool -> IO ()
 fixedSetHasWindow self hasWindow =
   {# call fixed_set_has_window #}
@@ -164,6 +167,7 @@
 -- | Gets whether the 'Fixed' has its own 'DrawWindow'. See
 -- 'fixedSetHasWindow'.
 --
+-- Removed in Gtk3. Use the Widget version.
 fixedGetHasWindow :: FixedClass self => self -> IO Bool
 fixedGetHasWindow self =
   liftM toBool $
@@ -175,11 +179,12 @@
 
 -- | \'hasWindow\' property. See 'fixedGetHasWindow' and 'fixedSetHasWindow'
 --
+-- Removed in Gtk3. Use the Widget version.
 fixedHasWindow :: FixedClass self => Attr self Bool
 fixedHasWindow = newAttr
   fixedGetHasWindow
   fixedSetHasWindow
-
+#endif
 --------------------
 -- Child Attributes
 
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
@@ -63,7 +63,9 @@
   layoutGetVAdjustment,
   layoutSetHAdjustment,
   layoutSetVAdjustment,
+#if GTK_MAJOR_VERSION < 3
   layoutGetDrawWindow,
+#endif
 
 -- * Attributes
   layoutHAdjustment,
@@ -89,7 +91,9 @@
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.General.Structs	(layoutGetDrawWindow)
+#endif
 import Graphics.UI.Gtk.Abstract.ContainerChildProperties
 
 {# context lib="gtk" prefix="gtk" #}
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
@@ -67,7 +67,9 @@
 -- * Types
   Notebook,
   NotebookClass,
+#if GTK_MAJOR_VERSION < 3
   NotebookPage,
+#endif
   castToNotebook, gTypeNotebook,
   toNotebook,
 
@@ -96,11 +98,13 @@
   notebookGetShowBorder,
   notebookSetScrollable,
   notebookGetScrollable,
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   notebookSetTabBorder,
   notebookSetTabHBorder,
   notebookSetTabVBorder,
 #endif
+#endif
   notebookSetPopup,
   notebookGetCurrentPage,
   notebookSetMenuLabel,
@@ -114,11 +118,13 @@
   notebookGetTabLabel,
   notebookGetTabLabelText,
   Packing(..), PackType(..),
+#if GTK_MAJOR_VERSION < 3
   notebookQueryTabLabelPacking,
   notebookSetTabLabelPacking,
 #ifndef DISABLE_DEPRECATED
   notebookSetHomogeneousTabs,
 #endif
+#endif
   notebookSetTabLabel,
   notebookSetTabLabelText,
 #if GTK_CHECK_VERSION(2,10,0)
@@ -199,7 +205,9 @@
 
 {# context lib="gtk" prefix="gtk" #}
 
+#if GTK_MAJOR_VERSION < 3
 {#pointer *GtkNotebookPage as NotebookPage foreign newtype #}
+#endif
 
 --------------------
 -- Constructors
@@ -672,6 +680,7 @@
   {# call unsafe notebook_get_scrollable #}
     (toNotebook self)
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Sets the width the border around the tab labels in a notebook. This is
 -- equivalent to calling @'notebookSetTabHBorder' notebook borderWidth@
@@ -680,6 +689,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 notebookSetTabBorder :: NotebookClass self => self
  -> Int   -- ^ @borderWidth@ - width of the border around the tab labels.
  -> IO ()
@@ -693,6 +703,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 notebookSetTabHBorder :: NotebookClass self => self
  -> Int   -- ^ @tabHborder@ - width of the horizontal border of tab labels.
  -> IO ()
@@ -706,6 +717,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 notebookSetTabVBorder :: NotebookClass self => self
  -> Int   -- ^ @tabVborder@ - width of the vertical border of tab labels.
  -> IO ()
@@ -714,6 +726,7 @@
     (toNotebook self)
     (fromIntegral tabVborder)
 #endif
+#endif
 
 -- | Enables or disables the popup menu: if the user clicks with the right
 -- mouse button on the bookmarks, a menu with all the pages will be popped up.
@@ -841,9 +854,11 @@
     (toWidget child)
   >>= maybePeek peekUTFString
 
+#if GTK_MAJOR_VERSION < 3
 -- | Query the packing attributes for the tab label of the page containing
 -- @child@.
 --
+-- Removed in Gtk3.
 notebookQueryTabLabelPacking :: (NotebookClass self, WidgetClass child) => self
  -> child            -- ^ @child@ - the page
  -> IO (Packing,PackType)
@@ -866,6 +881,7 @@
 -- @child@. See 'Graphics.UI.Gtk.Abstract.Box.boxPackStart' for the exact
 -- meaning of the parameters.
 --
+-- Removed in Gtk3.
 notebookSetTabLabelPacking :: (NotebookClass self, WidgetClass child) => self
  -> child    -- ^ @child@ - the child widget
  -> Packing
@@ -886,6 +902,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 notebookSetHomogeneousTabs :: NotebookClass self => self
  -> Bool  -- ^ @homogeneous@ - @True@ if all tabs should be the same size.
  -> IO ()
@@ -893,6 +910,7 @@
   {# call notebook_set_homogeneous_tabs #}
     (toNotebook self)
     (fromBool homogeneous)
+#endif
 #endif
 
 -- | Changes the tab label for @child@.
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/Combo.chs b/Graphics/UI/Gtk/MenuComboToolbar/Combo.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/Combo.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/Combo.chs
@@ -31,8 +31,9 @@
 -- A text entry field with a dropdown list
 --
 -- * Warning: this module is deprecated and should not be used in
--- newly-written code.
+-- newly-written code. 
 --
+-- This module is empty in Gtk3 as Combo has been removed.
 module Graphics.UI.Gtk.MenuComboToolbar.Combo (
 -- * Detail
 -- 
@@ -63,6 +64,7 @@
 -- |                                 +----Combo
 -- @
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- * Types
   Combo,
@@ -88,8 +90,10 @@
   comboAllowEmpty,
   comboValueInList,
 #endif
+#endif
   ) where
 
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad	(liftM, mapM_)
 
 import System.Glib.FFI
@@ -231,4 +235,5 @@
 --
 comboValueInList :: ComboClass self => Attr self Bool
 comboValueInList = newAttrFromBoolProperty "value-in-list"
+#endif
 #endif
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
@@ -71,8 +71,14 @@
 
 -- * Constructors
   comboBoxNew,
+#if GTK_CHECK_VERSION(2,24,0)
+  comboBoxNewWithEntry,
+#endif
   comboBoxNewText,
   comboBoxNewWithModel,
+#if GTK_CHECK_VERSION(2,24,0)
+  comboBoxNewWithModelAndEntry,
+#endif
 
 -- * Methods
 
@@ -137,6 +143,12 @@
 #endif
 #endif
 
+#if GTK_CHECK_VERSION(2,24,0)
+  comboBoxGetHasEntry,
+  comboBoxSetEntryTextColumn,
+  comboBoxGetEntryTextColumn,
+#endif
+
 -- * Signals
   changed,
   
@@ -187,6 +199,18 @@
   liftM (castPtr :: Ptr Widget -> Ptr ComboBox) $
   {# call gtk_combo_box_new #}
 
+#if GTK_CHECK_VERSION(2,24,0)
+-- | Creates a new empty 'ComboBox' with an entry.
+--
+-- * Available since Gtk+ version 2.24
+--
+comboBoxNewWithEntry :: IO ComboBox
+comboBoxNewWithEntry =
+  makeNewObject mkComboBox $
+  liftM (castPtr :: Ptr Widget -> Ptr ComboBox) $
+  {# call gtk_combo_box_new_with_entry #}
+#endif
+
 -- | Convenience function which constructs a new text combo box that is a
 -- 'ComboBox' just displaying strings. This function internally calls
 -- 'comboBoxSetModelText' after creating a new combo box.
@@ -209,6 +233,21 @@
   {# call gtk_combo_box_new_with_model #}
     (toTreeModel model)
 
+#if GTK_CHECK_VERSION(2,24,0)
+-- | Creates a new empty 'ComboBox' with an entry and with the model initialized to @model@.
+--
+-- * Available since Gtk+ version 2.24
+--
+comboBoxNewWithModelAndEntry :: TreeModelClass model =>
+    model -- ^ @model@ - A 'TreeModel'.
+ -> IO ComboBox
+comboBoxNewWithModelAndEntry model =
+  makeNewObject mkComboBox $
+  liftM (castPtr :: Ptr Widget -> Ptr ComboBox) $
+  {# call gtk_combo_box_new_with_model_and_entry #}
+    (toTreeModel model)
+#endif
+
 --------------------
 -- Methods
 
@@ -228,12 +267,20 @@
 --
 comboBoxSetModelText :: ComboBoxClass self => self -> IO (ListStore String)
 comboBoxSetModelText combo = do
+#if GTK_CHECK_VERSION(2,24,0)
+  store <- listStoreNew ([] :: [String])
+  comboBoxSetModel combo (Just store)
+  let colId = makeColumnIdString 0
+  customStoreSetColumn store colId id
+  comboBoxSetEntryTextColumn (toComboBox combo) colId
+#else
   cellLayoutClear (toComboBox combo)
   store <- listStoreNew ([] :: [String])
   comboBoxSetModel combo (Just store)
   ren <- cellRendererTextNew
   cellLayoutPackStart (toComboBox combo) ren True
   cellLayoutSetAttributes (toComboBox combo) ren store (\a -> [cellText := a])
+#endif
   objectSetAttribute comboQuark combo (Just store)
   return store
 
@@ -553,6 +600,48 @@
   {# call gtk_combo_box_get_title #}
     (toComboBox self)
   >>= peekUTFString
+#endif
+
+#if GTK_CHECK_VERSION(2,24,0)
+-- | Returns whether the combo box has an entry.
+--
+-- * Available since Gtk+ version 2.24
+--
+comboBoxGetHasEntry :: ComboBoxClass self => self
+ -> IO Bool -- ^ returns whether there is an entry in @self@.
+comboBoxGetHasEntry self =
+  liftM toBool $
+  {# call gtk_combo_box_get_has_entry #}
+    (toComboBox self)
+
+-- | Sets the model column which combo_box should use to get strings from
+--   to be @textColumn@. The column text_column in the model of @comboBox@
+--   must be of type String.
+--
+--   This is only relevant if @comboBox@ has been created with "has-entry"
+--   as True.
+--
+-- * Available since Gtk+ version 2.24
+--
+comboBoxSetEntryTextColumn :: ComboBoxClass comboBox => comboBox
+ -> ColumnId row String -- ^ @textColumn@ - A column in model to get the strings from for the internal entry.
+ -> IO ()
+comboBoxSetEntryTextColumn comboBox textColumn =
+  {# call gtk_combo_box_set_entry_text_column #}
+    (toComboBox comboBox)
+    ((fromIntegral . columnIdToNumber) textColumn)
+
+-- | Returns the column which @comboBox@ is using to get the strings from to
+--   display in the internal entry.
+--
+-- * Available since Gtk+ version 2.24
+--
+comboBoxGetEntryTextColumn :: ComboBoxClass comboBox => comboBox
+ -> IO (ColumnId row String) -- ^ returns a column in the data source model of @comboBox@.
+comboBoxGetEntryTextColumn comboBox =
+  liftM (makeColumnIdString . fromIntegral) $
+  {# call gtk_combo_box_get_entry_text_column #}
+    (toComboBox comboBox)
 #endif
 
 -- %hash c:fe18
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs b/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs
@@ -49,6 +49,8 @@
 -- Connect to the activate signal of the 'Entry' (use 'binGetChild') to detect
 -- when the user actually finishes entering text.
 --
+-- * This module is deprecated and the functionality removed in Gtk3. It is
+--   therefore empty in Gtk3.
 
 -- * Class Hierarchy
 -- |
@@ -62,6 +64,7 @@
 -- |                                 +----ComboBoxEntry
 -- @
 
+#if GTK_MAJOR_VERSION < 3
 #if GTK_CHECK_VERSION(2,4,0)
 -- * Types
   ComboBoxEntry,
@@ -86,8 +89,10 @@
 -- * Attributes
   comboBoxEntryTextColumn,
 #endif
+#endif
   ) where
 
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -153,8 +158,8 @@
 -- Any exisiting model or renderers are removed before setting the new text
 -- model.
 -- In order to respond to new texts that the user enters, it is necessary to
--- connect to the 'Graphics.UI.Gtk.Entry.Entry.entryActivate' signal of the
--- contained 'Graphics.UI.Gtk.Entry.Entry.Entry' an insert the text into the
+-- connect to the 'Graphics.UI.Gtk.Entry.Entry.entryActivated' signal of the
+-- contained 'Graphics.UI.Gtk.Entry.Entry.Entry' and insert the text into the
 -- text model which can be retrieved with
 -- 'Graphics.UI.Gtk.MenuComboToolbar.ComboBox.comboBoxGetModelText'.
 -- Note that the functions 'comboBoxAppendText', 'comboBoxInsertText',
@@ -225,4 +230,5 @@
   comboBoxEntryGetTextColumn
   comboBoxEntrySetTextColumn
 
+#endif
 #endif
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs b/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/MenuItem.chs
@@ -101,12 +101,15 @@
 #endif
 
 -- * Signals
+  menuItemActivatedItem,
+  menuItemActivated,
   menuItemActivateItem,
   menuItemActivate,
   menuItemSelect,
   menuItemDeselect,
   menuItemToggle,
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- * Deprecated
   onActivateItem,
@@ -120,6 +123,7 @@
   onToggle,
   afterToggle
 #endif
+#endif
   ) where
 
 import Control.Monad	(liftM)
@@ -226,8 +230,9 @@
 --
 menuItemRemoveSubmenu :: MenuItemClass self => self -> IO ()
 menuItemRemoveSubmenu self =
-  {# call menu_item_remove_submenu #}
+  {# call menu_item_set_submenu #}
     (toMenuItem self)
+    (Widget $ unsafePerformIO $ newForeignPtr_ nullPtr)
 
 -- | Select the menu item. Emits the \"select\" signal on the item.
 --
@@ -341,32 +346,41 @@
 -- * This is the only function applications normally connect to.
 --   It is not emitted if the item has a submenu.
 --
+menuItemActivated :: MenuItemClass self => Signal self (IO ())
+menuItemActivated = Signal (connect_NONE__NONE "activate")
+
+-- | Deprecated. See 'menuItemActivated'.
 menuItemActivate :: MenuItemClass self => Signal self (IO ())
-menuItemActivate = Signal (connect_NONE__NONE "activate")
+menuItemActivate = menuItemActivated
 
 -- | Emitted when the user chooses a menu item that has a submenu.
 --
 -- * This signal is not emitted if the menu item does not have a
 --   submenu.
 --
+menuItemActivatedItem :: MenuItemClass self => Signal self (IO ())
+menuItemActivatedItem = Signal (connect_NONE__NONE "activate-item")
+
+-- | Deprecated. See 'menuItemActivatedItem'.
 menuItemActivateItem :: MenuItemClass self => Signal self (IO ())
-menuItemActivateItem = Signal (connect_NONE__NONE "activate-item")
+menuItemActivateItem = menuItemActivatedItem
 
 -- | This signal is emitted when the item is selected.
 --
-menuItemSelect :: ItemClass i => Signal i (IO ())
+menuItemSelect :: MenuItemClass i => Signal i (IO ())
 menuItemSelect = Signal (connect_NONE__NONE "select")
 
 -- | This signal is emitted when the item is deselected.
 --
-menuItemDeselect :: ItemClass i => Signal i (IO ())
+menuItemDeselect :: MenuItemClass i => Signal i (IO ())
 menuItemDeselect = Signal (connect_NONE__NONE "deselect")
 
 -- | This signal is emitted when the item is toggled.
 --
-menuItemToggle :: ItemClass i => Signal i (IO ())
+menuItemToggle :: MenuItemClass i => Signal i (IO ())
 menuItemToggle = Signal (connect_NONE__NONE "toggle")
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 --------------------
 -- Deprecated Signals
@@ -400,4 +414,5 @@
  -> IO (ConnectId i)
 onToggle = connect_NONE__NONE "toggle" False
 afterToggle = connect_NONE__NONE "toggle" True
+#endif
 #endif
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
@@ -65,7 +65,9 @@
 -- * Methods
   menuToolButtonSetMenu,
   menuToolButtonGetMenu,
+#if GTK_MAJOR_VERSION < 3
   menuToolButtonSetArrowTooltip,
+#endif
 #if GTK_CHECK_VERSION(2,12,0)
   menuToolButtonSetArrowTooltipText,
   menuToolButtonSetArrowTooltipMarkup,
@@ -150,6 +152,7 @@
   {# call gtk_menu_tool_button_get_menu #}
     (toMenuToolButton self)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Sets the 'Tooltips' object to be used for arrow button which pops up the
 -- menu. See 'Graphics.UI.Gtk.MenuComboToolbar.ToolItem.toolItemSetTooltip'
 -- for setting a tooltip on the whole 'MenuToolButton'.
@@ -167,6 +170,7 @@
     tooltips
     tipTextPtr
     tipPrivatePtr
+#endif
 
 #if GTK_CHECK_VERSION(2,12,0)
 -- | Sets the tooltip text to be used as tooltip for the arrow button which
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/OptionMenu.chs b/Graphics/UI/Gtk/MenuComboToolbar/OptionMenu.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/OptionMenu.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/OptionMenu.chs
@@ -26,7 +26,7 @@
 -- A widget used to choose from a list of valid choices
 --
 -- * Warning: this module is deprecated and should not be used in
--- newly-written code.
+-- newly-written code. It is empty in Gtk3.
 --
 module Graphics.UI.Gtk.MenuComboToolbar.OptionMenu (
 -- * Detail
@@ -58,6 +58,7 @@
 -- |                                 +----OptionMenu
 -- @
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- * Types
   OptionMenu,
@@ -82,6 +83,7 @@
   onOMChanged,
   afterOMChanged
 #endif
+#endif
   ) where
 
 import Control.Monad	(liftM)
@@ -95,6 +97,7 @@
 
 {# context lib="gtk" prefix="gtk" #}
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 --------------------
 -- Constructors
@@ -179,4 +182,5 @@
  -> IO (ConnectId self)
 onOMChanged = connect_NONE__NONE "changed" False
 afterOMChanged = connect_NONE__NONE "changed" True
+#endif
 #endif
diff --git a/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs b/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs
--- a/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs
+++ b/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs
@@ -65,7 +65,9 @@
   toolItemGetHomogeneous,
   toolItemSetExpand,
   toolItemGetExpand,
+#if GTK_MAJOR_VERSION < 3
   toolItemSetTooltip,
+#endif
   toolItemSetUseDragWindow,
   toolItemGetUseDragWindow,
   toolItemSetVisibleHorizontal,
@@ -173,10 +175,12 @@
   {# call unsafe tool_item_get_expand #}
     (toToolItem self)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Sets the 'Tooltips' object to be used for the tool item, the text to be
 -- displayed as tooltip on the item and the private text to be used. See
 -- 'tooltipsSetTip'.
 --
+-- Removed in Gtk3.
 toolItemSetTooltip :: ToolItemClass self => self
  -> Tooltips -- ^ @tooltips@ - The 'Tooltips' object to be used
  -> String   -- ^ @tipText@ - text to be used as tooltip text for @toolItem@
@@ -190,6 +194,7 @@
     tooltips
     tipTextPtr
     tipPrivatePtr
+#endif
 
 -- | Sets whether toolitem has a drag window. When @True@ the tool item can be
 -- used as a drag source through 'dragSourceSet'. When the tool item has a drag
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
@@ -91,6 +91,7 @@
   toolbarNew,
 
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   toolbarInsertNewButton,
   toolbarAppendNewButton,
@@ -107,11 +108,14 @@
 #endif
   toolbarSetOrientation,
   toolbarGetOrientation,
+#endif
   toolbarSetStyle,
   toolbarGetStyle,
   toolbarUnsetStyle,
+#if GTK_MAJOR_VERSION < 3
   toolbarSetTooltips,
   toolbarGetTooltips,
+#endif
   IconSize(..),
 #ifndef DISABLE_DEPRECATED
   toolbarSetIconSize,
@@ -131,13 +135,17 @@
 #endif
 
 -- * Attributes
+#if GTK_MAJOR_VERSION < 3
   toolbarOrientation,
+#endif
 #if GTK_CHECK_VERSION(2,4,0)
   toolbarShowArrow,
 #endif
 #if GTK_CHECK_VERSION(2,8,0)
+#if GTK_MAJOR_VERSION < 3
   toolbarTooltips,
 #endif
+#endif
   toolbarStyle,
 
 -- * Child Attributes
@@ -168,10 +176,12 @@
 					 ReliefStyle(..))
 import Graphics.UI.Gtk.General.StockItems
 import Graphics.UI.Gtk.General.Structs	(
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 					 toolbarChildToggleButton,
 					 toolbarChildRadioButton,
 #endif
+#endif
 					 IconSize(..))
 import Graphics.UI.Gtk.General.StockItems	(stockLookupItem, siLabel, stockMissingImage)
 import Graphics.UI.Gtk.Display.Image	(imageNewFromStock)
@@ -198,7 +208,7 @@
 
 --------------------
 -- Methods
-
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Insert a new 'Button' into the 'Toolbar'.
 --
@@ -217,6 +227,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarInsertNewButton :: ToolbarClass self => self
  -> Int
  -> StockId
@@ -242,6 +253,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarAppendNewButton :: ToolbarClass self => self
  -> String
  -> Maybe (String, String)
@@ -255,6 +267,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarPrependNewButton :: ToolbarClass self => self
  -> String
  -> Maybe (String, String)
@@ -268,6 +281,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarInsertNewToggleButton :: ToolbarClass self => self
  -> Int
  -> StockId
@@ -294,6 +308,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarAppendNewToggleButton :: ToolbarClass self => self
  -> String
  -> Maybe (String, String)
@@ -307,6 +322,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarPrependNewToggleButton :: ToolbarClass self => self
  -> String
  -> Maybe (String, String)
@@ -328,6 +344,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarInsertNewRadioButton :: (ToolbarClass self, RadioButtonClass rb) => self
  -> Int
  -> StockId
@@ -356,6 +373,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarAppendNewRadioButton :: (ToolbarClass self, RadioButtonClass rb) => self
  -> String
  -> Maybe (String, String)
@@ -370,6 +388,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarPrependNewRadioButton :: (ToolbarClass self, RadioButtonClass rb) => self
  -> String
  -> Maybe (String, String)
@@ -386,6 +405,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarInsertNewWidget :: (ToolbarClass self, WidgetClass w) => self
  -> Int
  -> w
@@ -407,6 +427,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarAppendNewWidget :: (ToolbarClass self, WidgetClass w) => self
  -> w
  -> Maybe (String, String)
@@ -420,6 +441,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 toolbarPrependNewWidget :: (ToolbarClass self, WidgetClass w) => self
  -> w 
  -> Maybe (String, String)
@@ -429,6 +451,7 @@
 
 -- | Sets whether a toolbar should appear horizontally or vertically.
 --
+-- Removed in Gtk3.
 toolbarSetOrientation :: ToolbarClass self => self -> Orientation -> IO ()
 toolbarSetOrientation self orientation =
   {# call toolbar_set_orientation #}
@@ -438,12 +461,13 @@
 -- | Retrieves the current orientation of the toolbar. See
 -- 'toolbarSetOrientation'.
 --
+-- Removed in Gtk3.
 toolbarGetOrientation :: ToolbarClass self => self -> IO Orientation
 toolbarGetOrientation self =
   liftM (toEnum . fromIntegral) $
   {# call unsafe toolbar_get_orientation #}
     (toToolbar self)
-
+#endif
 -- | Alters the view of the toolbar to display either icons only, text only, or
 -- both.
 --
@@ -470,8 +494,10 @@
   {# call toolbar_unset_style #}
     (toToolbar self)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Sets if the tooltips of a toolbar should be active or not.
 --
+-- Removed in Gtk3.
 toolbarSetTooltips :: ToolbarClass self => self
  -> Bool  -- ^ @enable@ - set to @False@ to disable the tooltips, or @True@ to
           -- enable them.
@@ -483,11 +509,13 @@
 
 -- | Retrieves whether tooltips are enabled. See 'toolbarSetTooltips'.
 --
+-- Removed in Gtk3.
 toolbarGetTooltips :: ToolbarClass self => self -> IO Bool
 toolbarGetTooltips self =
   liftM toBool $
   {# call unsafe toolbar_get_tooltips #}
     (toToolbar self)
+#endif
 
 #ifndef DISABLE_DEPRECATED
 -- | This function sets the size of stock icons in the toolbar. You can call
@@ -647,14 +675,17 @@
 --------------------
 -- Attributes
 
+#if GTK_MAJOR_VERSION < 3
 -- | The orientation of the toolbar.
 --
 -- Default value: 'OrientationHorizontal'
 --
+-- Removed in Gtk3.
 toolbarOrientation :: ToolbarClass self => Attr self Orientation
 toolbarOrientation = newAttr
   toolbarGetOrientation
   toolbarSetOrientation
+#endif
 
 -- | How to draw the toolbar.
 --
@@ -675,14 +706,18 @@
   toolbarSetShowArrow
 #endif
 
+
+#if GTK_MAJOR_VERSION < 3
 -- | If the tooltips of the toolbar should be active or not.
 --
 -- Default value: @True@
 --
+-- Removed in Gtk3.
 toolbarTooltips :: ToolbarClass self => Attr self Bool
 toolbarTooltips = newAttr
   toolbarGetTooltips
   toolbarSetTooltips
+#endif
 
 --------------------
 -- Child Attributes
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
@@ -70,17 +70,21 @@
   calendarMarkDay,
   calendarUnmarkDay,
   calendarClearMarks,
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   calendarDisplayOptions,
 #endif
+#endif
 #if GTK_CHECK_VERSION(2,4,0)
   calendarSetDisplayOptions,
   calendarGetDisplayOptions,
 #endif
   calendarGetDate,
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
   calendarFreeze,
 #endif
+#endif
 
 -- * Attributes
   calendarYear,
@@ -143,9 +147,9 @@
 calendarSelectMonth :: CalendarClass self => self
  -> Int     -- ^ @month@ - a month number between 0 and 11.
  -> Int     -- ^ @year@ - the year the month is in.
- -> IO Bool -- ^ returns @True@, always
+ -> IO ()
 calendarSelectMonth self month year =
-  liftM toBool $
+  liftM (const ()) $
   {# call calendar_select_month #}
     (toCalendar self)
     (fromIntegral month)
@@ -166,9 +170,9 @@
 --
 calendarMarkDay :: CalendarClass self => self
  -> Int     -- ^ @day@ - the day number to mark between 1 and 31.
- -> IO Bool -- ^ returns @True@, always
+ -> IO ()
 calendarMarkDay self day =
-  liftM toBool $
+  liftM (const ()) $
   {# call calendar_mark_day #}
     (toCalendar self)
     (fromIntegral day)
@@ -177,9 +181,9 @@
 --
 calendarUnmarkDay :: CalendarClass self => self
  -> Int     -- ^ @day@ - the day number to unmark between 1 and 31.
- -> IO Bool -- ^ returns @True@, always
+ -> IO ()
 calendarUnmarkDay self day =
-  liftM toBool $
+  liftM (const ()) $
   {# call calendar_unmark_day #}
     (toCalendar self)
     (fromIntegral day)
@@ -217,6 +221,7 @@
     (toCalendar self)
 #endif
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Sets display options (whether to display the heading and the month
 -- headings).
@@ -224,6 +229,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code. Use 'calendarSetDisplayOptions' instead.
 --
+-- Removed in Gtk3.
 calendarDisplayOptions :: CalendarClass self => self
  -> [CalendarDisplayOptions] -> IO ()
 calendarDisplayOptions self flags =
@@ -231,6 +237,7 @@
     (toCalendar self)
     ((fromIntegral . fromFlags) flags)
 #endif
+#endif
 
 -- | Retrieve the currently selected date.
 --
@@ -250,6 +257,7 @@
   day   <- liftM fromIntegral $ peek dayPtr
   return (year,month,day)
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 -- | Does nothing. Previously locked the display of the calendar for several
 -- update operations.
@@ -257,6 +265,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code.
 --
+-- Removed in Gtk3.
 calendarFreeze :: CalendarClass self => self
  -> IO a -- ^ An action that performs several update operations on the
          -- calendar. After the action finnishes all the changes made by it
@@ -267,6 +276,7 @@
   res <- update
   {# call calendar_thaw #} (toCalendar self)
   return res
+#endif
 #endif
 
 --------------------
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
@@ -80,8 +80,10 @@
   drawingAreaNew,
 
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
   drawingAreaGetDrawWindow,
   drawingAreaGetSize
+#endif
   ) where
 
 import Control.Monad	(liftM)
@@ -89,7 +91,9 @@
 import System.Glib.FFI
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.General.Structs	(widgetGetDrawWindow, widgetGetSize)
+#endif
 -- to make haddock happy:
 import Graphics.UI.Gtk.Abstract.Widget
 
@@ -106,14 +110,18 @@
   liftM (castPtr :: Ptr Widget -> Ptr DrawingArea) $
   {# call unsafe drawing_area_new #}
 
+#if GTK_MAJOR_VERSION < 3
 -- | See 'widgetGetDrawWindow'
 --
+-- Removed in Gtk3.
 drawingAreaGetDrawWindow :: DrawingArea -> IO DrawWindow
 drawingAreaGetDrawWindow = widgetGetDrawWindow
 {-# DEPRECATED drawingAreaGetDrawWindow "use widgetGetDrawWindow instead" #-}
 
 -- | See 'widgetGetSize'
 --
+-- Removed in Gtk3.
 drawingAreaGetSize :: DrawingArea -> IO (Int, Int)
 drawingAreaGetSize = widgetGetSize
 {-# DEPRECATED drawingAreaGetSize "use widgetGetSize instead" #-}
+#endif
diff --git a/Graphics/UI/Gtk/Misc/Tooltips.chs b/Graphics/UI/Gtk/Misc/Tooltips.chs
--- a/Graphics/UI/Gtk/Misc/Tooltips.chs
+++ b/Graphics/UI/Gtk/Misc/Tooltips.chs
@@ -53,6 +53,8 @@
 --
 -- Information about the tooltip (if any) associated with an arbitrary
 -- widget can be retrieved using 'tooltipsDataGet'.
+--
+-- * This module is deprecated. It is empty in Gtk3.
 
 -- * Class Hierarchy
 -- |
@@ -61,7 +63,7 @@
 -- |   +----'Object'
 -- |         +----Tooltips
 -- @
-
+#if GTK_MAJOR_VERSION < 3
 -- * Types
   Tooltips,
   TooltipsClass,
@@ -79,8 +81,10 @@
 #endif
   tooltipsSetTip,
   tooltipsDataGet
+#endif
   ) where
 
+#if GTK_MAJOR_VERSION < 3
 import System.Glib.FFI
 import System.Glib.UTFString
 import Graphics.UI.Gtk.Abstract.Object  (makeNewObject)
@@ -167,4 +171,4 @@
            tipPrivate <- {#get TooltipsData->tip_private#} tipDataPtr
                      >>= peekUTFString
            return $ Just $ (tooltips, tipText, tipPrivate)
-
+#endif
diff --git a/Graphics/UI/Gtk/ModelView.chs b/Graphics/UI/Gtk/ModelView.chs
new file mode 100644
--- /dev/null
+++ b/Graphics/UI/Gtk/ModelView.chs
@@ -0,0 +1,85 @@
+{-# LANGUAGE CPP #-}
+-- -*-haskell-*-
+--  GIMP Toolkit (GTK) New model-based tree/list widget system
+--
+--  Author : Duncan Coutts
+--
+--  Created: 9 December 2006
+--
+--  Copyright (C) 2006 Duncan Coutts
+--
+--  This library is free software; you can redistribute it and/or
+--  modify it under the terms of the GNU Lesser General Public
+--  License as published by the Free Software Foundation; either
+--  version 2.1 of the License, or (at your option) any later version.
+--
+--  This library is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+--  Lesser General Public License for more details.
+--
+-- |
+-- Maintainer  : gtk2hs-users@lists.sourceforge.net
+-- Stability   : provisional
+-- 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
+-- so it will not be necessary to explicitly import this module.
+--
+module Graphics.UI.Gtk.ModelView (
+  module Graphics.UI.Gtk.ModelView.CellLayout,
+  module Graphics.UI.Gtk.ModelView.CellRenderer,
+  module Graphics.UI.Gtk.ModelView.CellRendererCombo,
+  module Graphics.UI.Gtk.ModelView.CellRendererPixbuf,
+  module Graphics.UI.Gtk.ModelView.CellRendererProgress,
+  module Graphics.UI.Gtk.ModelView.CellRendererText,
+  module Graphics.UI.Gtk.ModelView.CellRendererToggle,
+  module Graphics.UI.Gtk.ModelView.CellView,
+  module Graphics.UI.Gtk.MenuComboToolbar.ComboBox,
+#if GTK_MAJOR_VERSION < 3
+  module Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry,
+#endif
+  module Graphics.UI.Gtk.ModelView.CustomStore,
+  module Graphics.UI.Gtk.Entry.EntryCompletion,
+  module Graphics.UI.Gtk.ModelView.IconView,
+  module Graphics.UI.Gtk.ModelView.ListStore,
+  module Graphics.UI.Gtk.ModelView.TreeDrag,
+  module Graphics.UI.Gtk.ModelView.TreeModel,
+  module Graphics.UI.Gtk.ModelView.TreeModelSort,
+  module Graphics.UI.Gtk.ModelView.TreeSortable,
+  module Graphics.UI.Gtk.ModelView.TreeRowReference,
+  module Graphics.UI.Gtk.ModelView.TreeSelection,
+  module Graphics.UI.Gtk.ModelView.TreeStore,
+  module Graphics.UI.Gtk.ModelView.TreeView,
+  module Graphics.UI.Gtk.ModelView.TreeViewColumn
+  ) where
+
+import Graphics.UI.Gtk.ModelView.CellLayout
+import Graphics.UI.Gtk.ModelView.CellRenderer
+import Graphics.UI.Gtk.ModelView.CellRendererCombo
+import Graphics.UI.Gtk.ModelView.CellRendererPixbuf
+import Graphics.UI.Gtk.ModelView.CellRendererProgress
+import Graphics.UI.Gtk.ModelView.CellRendererText
+import Graphics.UI.Gtk.ModelView.CellRendererToggle
+import Graphics.UI.Gtk.ModelView.CellView
+import Graphics.UI.Gtk.MenuComboToolbar.ComboBox -- these moved back to MenuComboToolbar
+#if GTK_MAJOR_VERSION < 3
+import Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry
+#endif
+import Graphics.UI.Gtk.ModelView.CustomStore
+import Graphics.UI.Gtk.Entry.EntryCompletion -- this moved back to Entry
+import Graphics.UI.Gtk.ModelView.IconView
+import Graphics.UI.Gtk.ModelView.ListStore
+import Graphics.UI.Gtk.ModelView.TreeDrag
+import Graphics.UI.Gtk.ModelView.TreeModel
+import Graphics.UI.Gtk.ModelView.TreeModelSort
+import Graphics.UI.Gtk.ModelView.TreeSortable
+import Graphics.UI.Gtk.ModelView.TreeRowReference
+import Graphics.UI.Gtk.ModelView.TreeSelection
+import Graphics.UI.Gtk.ModelView.TreeStore
+import Graphics.UI.Gtk.ModelView.TreeView
+import Graphics.UI.Gtk.ModelView.TreeViewColumn
diff --git a/Graphics/UI/Gtk/ModelView.hs b/Graphics/UI/Gtk/ModelView.hs
deleted file mode 100644
--- a/Graphics/UI/Gtk/ModelView.hs
+++ /dev/null
@@ -1,80 +0,0 @@
--- -*-haskell-*-
---  GIMP Toolkit (GTK) New model-based tree/list widget system
---
---  Author : Duncan Coutts
---
---  Created: 9 December 2006
---
---  Copyright (C) 2006 Duncan Coutts
---
---  This library is free software; you can redistribute it and/or
---  modify it under the terms of the GNU Lesser General Public
---  License as published by the Free Software Foundation; either
---  version 2.1 of the License, or (at your option) any later version.
---
---  This library is distributed in the hope that it will be useful,
---  but WITHOUT ANY WARRANTY; without even the implied warranty of
---  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
---  Lesser General Public License for more details.
---
--- |
--- Maintainer  : gtk2hs-users@lists.sourceforge.net
--- Stability   : provisional
--- 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
--- so it will not be necessary to explicitly import this module.
---
-module Graphics.UI.Gtk.ModelView (
-  module Graphics.UI.Gtk.ModelView.CellLayout,
-  module Graphics.UI.Gtk.ModelView.CellRenderer,
-  module Graphics.UI.Gtk.ModelView.CellRendererCombo,
-  module Graphics.UI.Gtk.ModelView.CellRendererPixbuf,
-  module Graphics.UI.Gtk.ModelView.CellRendererProgress,
-  module Graphics.UI.Gtk.ModelView.CellRendererText,
-  module Graphics.UI.Gtk.ModelView.CellRendererToggle,
-  module Graphics.UI.Gtk.ModelView.CellView,
-  module Graphics.UI.Gtk.MenuComboToolbar.ComboBox,
-  module Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry,
-  module Graphics.UI.Gtk.ModelView.CustomStore,
-  module Graphics.UI.Gtk.Entry.EntryCompletion,
-  module Graphics.UI.Gtk.ModelView.IconView,
-  module Graphics.UI.Gtk.ModelView.ListStore,
-  module Graphics.UI.Gtk.ModelView.TreeDrag,
-  module Graphics.UI.Gtk.ModelView.TreeModel,
-  module Graphics.UI.Gtk.ModelView.TreeModelSort,
-  module Graphics.UI.Gtk.ModelView.TreeSortable,
-  module Graphics.UI.Gtk.ModelView.TreeRowReference,
-  module Graphics.UI.Gtk.ModelView.TreeSelection,
-  module Graphics.UI.Gtk.ModelView.TreeStore,
-  module Graphics.UI.Gtk.ModelView.TreeView,
-  module Graphics.UI.Gtk.ModelView.TreeViewColumn
-  ) where
-
-import Graphics.UI.Gtk.ModelView.CellLayout
-import Graphics.UI.Gtk.ModelView.CellRenderer
-import Graphics.UI.Gtk.ModelView.CellRendererCombo
-import Graphics.UI.Gtk.ModelView.CellRendererPixbuf
-import Graphics.UI.Gtk.ModelView.CellRendererProgress
-import Graphics.UI.Gtk.ModelView.CellRendererText
-import Graphics.UI.Gtk.ModelView.CellRendererToggle
-import Graphics.UI.Gtk.ModelView.CellView
-import Graphics.UI.Gtk.MenuComboToolbar.ComboBox -- these moved back to MenuComboToolbar
-import Graphics.UI.Gtk.MenuComboToolbar.ComboBoxEntry
-import Graphics.UI.Gtk.ModelView.CustomStore
-import Graphics.UI.Gtk.Entry.EntryCompletion -- this moved back to Entry
-import Graphics.UI.Gtk.ModelView.IconView
-import Graphics.UI.Gtk.ModelView.ListStore
-import Graphics.UI.Gtk.ModelView.TreeDrag
-import Graphics.UI.Gtk.ModelView.TreeModel
-import Graphics.UI.Gtk.ModelView.TreeModelSort
-import Graphics.UI.Gtk.ModelView.TreeSortable
-import Graphics.UI.Gtk.ModelView.TreeRowReference
-import Graphics.UI.Gtk.ModelView.TreeSelection
-import Graphics.UI.Gtk.ModelView.TreeStore
-import Graphics.UI.Gtk.ModelView.TreeView
-import Graphics.UI.Gtk.ModelView.TreeViewColumn
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
@@ -87,7 +87,9 @@
 instance CellLayoutClass EntryCompletion
 instance CellLayoutClass TreeViewColumn
 instance CellLayoutClass ComboBox
+#if GTK_MAJOR_VERSION < 3
 instance CellLayoutClass ComboBoxEntry
+#endif
 
 --------------------
 -- Methods
diff --git a/Graphics/UI/Gtk/ModelView/CellRenderer.chs b/Graphics/UI/Gtk/ModelView/CellRenderer.chs
--- a/Graphics/UI/Gtk/ModelView/CellRenderer.chs
+++ b/Graphics/UI/Gtk/ModelView/CellRenderer.chs
@@ -65,7 +65,7 @@
   CellRendererClass,
   castToCellRenderer, gTypeCellRenderer,
   toCellRenderer,
-  CellRendererMode,
+  CellRendererMode(..),
 
 -- * Methods
 #if GTK_CHECK_VERSION(2,6,0)
@@ -87,7 +87,9 @@
   cellIsExpander,
   cellIsExpanded,
   cellBackground,
+#if GTK_MAJOR_VERSION < 3
   cellBackgroundColor,
+#endif
   cellBackgroundSet,
 
 -- * Signals
@@ -115,7 +117,9 @@
 import System.Glib.Attributes ( Attr, WriteAttr )
 import System.Glib.Properties
 {#import Graphics.UI.Gtk.Types#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.Gdk.GC		(Color)
+#endif
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.ModelView.Types#}
 
@@ -266,11 +270,14 @@
 cellBackground :: CellRendererClass self => WriteAttr self String
 cellBackground = writeAttrFromStringProperty "cell-background"
 
+#if GTK_MAJOR_VERSION < 3
 -- | Cell background color as a 'Color'.
 --
+-- Removed in Gtk3.
 cellBackgroundColor :: CellRendererClass self => Attr self Color
 cellBackgroundColor = newAttrFromBoxedStorableProperty "cell-background-gdk"
   {# call pure unsafe gdk_color_get_type #}
+#endif
 
 -- | Whether the 'cellBackground' \/ 'cellBackgroundColor' attribute is set.
 --
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
@@ -60,7 +60,9 @@
   cellViewSetModel,
   cellViewGetSizeOfRow,
   cellViewSetBackgroundColor,
+#if GTK_MAJOR_VERSION < 3
   cellViewGetCellRenderers,
+#endif
 
 -- * Attributes
   cellViewBackground
@@ -172,14 +174,17 @@
     (toCellView self)
     (castPtr colorPtr)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Returns the cell renderers which have been added to @cellView@.
 --
+-- Removed in Gtk3.
 cellViewGetCellRenderers :: CellViewClass self => self -> IO [CellRenderer]
 cellViewGetCellRenderers self =
   {# call gtk_cell_view_get_cell_renderers #}
     (toCellView self)
   >>= fromGList
   >>= mapM (\elemPtr -> makeNewObject mkCellRenderer (return elemPtr))
+#endif
 
 --------------------
 -- Attributes
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
@@ -93,7 +93,7 @@
 -- | A 'CustomStore' is an instance of a Gtk+ 'TreeModel' and can thus be used
 --   for any widget that stores data in a 'TreeModel'. The user may either
 --   create an instance of a 'CustomStore' or use one of the pre-defined
---   models 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' of
+--   models 'Graphics.UI.Gtk.ModelView.ListStore.ListStore' or
 --   'Graphics.UI.Gtk.ModelView.TreeStore.TreeStore'.
 newtype CustomStore private row = CustomStore (ForeignPtr (CustomStore private row))
 
diff --git a/Graphics/UI/Gtk/ModelView/Gtk2HsStore.c b/Graphics/UI/Gtk/ModelView/Gtk2HsStore.c
--- a/Graphics/UI/Gtk/ModelView/Gtk2HsStore.c
+++ b/Graphics/UI/Gtk/ModelView/Gtk2HsStore.c
@@ -55,6 +55,7 @@
 static void         gtk2hs_store_set_sort_column_id     (GtkTreeSortable        *sortable,
                                                          gint                   sort_column_id,
                                                          GtkSortType            order);
+#if GTK_MAJOR_VERSION < 3
 static void	    gtk2hs_store_set_sort_func		(GtkTreeSortable        *sortable,
                                                          gint                   sort_column_id,
                                                          GtkTreeIterCompareFunc func,
@@ -64,6 +65,7 @@
                                                          GtkTreeIterCompareFunc func,
                                                          gpointer               data,
                                                          GtkDestroyNotify       destroy);
+#endif
 static gboolean     gtk2hs_store_has_default_sort_func  (GtkTreeSortable        *sortable);
 
 
@@ -120,6 +122,7 @@
       NULL
     };
 
+#if GTK_MAJOR_VERSION < 3
 /* The TreeSortable interface is currently not implemented. */
     static const GInterfaceInfo tree_sortable_info =
     {
@@ -127,7 +130,7 @@
       NULL,
       NULL
     };
-
+#endif
     static const GInterfaceInfo tree_drag_source_info =
     {
       (GInterfaceInitFunc) gtk2hs_store_tree_drag_source_init,
@@ -215,6 +218,7 @@
   iface->unref_node      = gtk2hs_store_unref_node;
 }
 
+#if GTK_MAJOR_VERSION < 3
 /**
  *
  *  gtk2hs_store_tree_sortable_init: init callback for the interface registration
@@ -234,7 +238,7 @@
   iface->set_default_sort_func  = gtk2hs_store_set_default_sort_func;
   iface->has_default_sort_func  = gtk2hs_store_has_default_sort_func;
 }
-
+#endif
 /**
  *
  *  gtk2hs_store_tree_drag_source_init: init callback for the interface registration
@@ -634,6 +638,7 @@
   return;
 }
 
+#if GTK_MAJOR_VERSION < 3
 static void
 gtk2hs_store_set_sort_func (GtkTreeSortable        *sortable,
                             gint                   sort_column_id,
@@ -654,7 +659,7 @@
   WHEN_DEBUG(g_debug("calling gtk2hs_store_set_default_sort_func\t\t(%p)\n", sortable));
   return;
 }
-
+#endif
 static gboolean
 gtk2hs_store_has_default_sort_func (GtkTreeSortable        *sortable)
 {
diff --git a/Graphics/UI/Gtk/ModelView/Gtk2HsStore.h b/Graphics/UI/Gtk/ModelView/Gtk2HsStore.h
--- a/Graphics/UI/Gtk/ModelView/Gtk2HsStore.h
+++ b/Graphics/UI/Gtk/ModelView/Gtk2HsStore.h
@@ -1,9 +1,8 @@
 #ifndef __GTK2HS_STORE_H__
 #define __GTK2HS_STORE_H__
 
-#include <gtk/gtktreemodel.h>
-#include <gtk/gtktreednd.h>
-#include <gtk/gtktreesortable.h>
+#include <gtk/gtk.h>
+
 #include "Graphics/UI/Gtk/ModelView/CustomStore_stub.h"
 
 G_BEGIN_DECLS
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
@@ -72,8 +72,10 @@
   iconViewSelectedForeach,
   iconViewSetSelectionMode,
   iconViewGetSelectionMode,
+#if GTK_MAJOR_VERSION < 3
   iconViewSetOrientation,
   iconViewGetOrientation,
+#endif
   iconViewSetColumns,
   iconViewGetColumns,
   iconViewSetItemWidth,
@@ -164,12 +166,6 @@
 
 #if GTK_CHECK_VERSION(2,6,0)
 --------------------
--- Interfaces
-
--- %hash c:4792
-instance CellLayoutClass IconView
-
---------------------
 -- Constructors
 
 -- | Creates a new 'IconView' widget
@@ -348,6 +344,7 @@
   {# call gtk_icon_view_get_selection_mode #}
     (toIconView self)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Sets the ::orientation property which determines whether the labels are
 -- drawn beside the icons instead of below.
 --
@@ -368,6 +365,7 @@
   liftM (toEnum . fromIntegral) $
   {# call gtk_icon_view_get_orientation #}
     (toIconView self)
+#endif
 
 -- %hash c:7d23 d:d4e7
 -- | Sets the ::columns property which determines in how many columns the
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
@@ -50,11 +50,13 @@
 -- @
 -- |  'GObject'
 -- |   +----TreeModelFilter
+-- |   +----TypedTreeModelFilter
 -- @
 
 #if GTK_CHECK_VERSION(2,4,0)
 -- * Types
   TreeModelFilter,
+  TypedTreeModelFilter,
   TreeModelFilterClass,
   castToTreeModelFilter, gTypeTreeModelFilter,
   toTreeModelFilter,
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
@@ -146,7 +146,9 @@
   treeViewConvertWidgetToBinWindowCoords,
   treeViewConvertWidgetToTreeCoords,
 #endif
+#if GTK_MAJOR_VERSION < 3
   treeViewCreateRowDragIcon,
+#endif
   treeViewGetEnableSearch,
   treeViewSetEnableSearch,
   treeViewGetSearchColumn,
@@ -235,9 +237,10 @@
   
 -- * Deprecated
 #ifndef DISABLE_DEPRECATED
+#if GTK_MAJOR_VERSION < 3
   treeViewWidgetToTreeCoords,
   treeViewTreeToWidgetCoords,
-
+#endif
   onColumnsChanged,
   afterColumnsChanged,
   onCursorChanged,
@@ -962,6 +965,7 @@
   peek rPtr
 
 #ifndef DISABLE_DEPRECATED
+#if GTK_MAJOR_VERSION < 3
 -- | 'treeViewTreeToWidgetCoords' has been deprecated since version 2.12 and should not be used in
 -- newly-written code. Due to historial reasons the name of this function is incorrect. For converting
 -- bin window coordinates to coordinates relative to bin window, please see
@@ -970,6 +974,7 @@
 -- Converts tree coordinates (coordinates in full scrollable area of the tree) to bin window
 -- coordinates.
 --
+-- Removed in Gtk3.
 treeViewTreeToWidgetCoords :: TreeViewClass self => self
  -> Point    -- ^ @(tx, ty)@ - tree X and Y coordinates
  -> IO Point -- ^ @(wx, wy)@ returns widget X and Y coordinates
@@ -993,6 +998,7 @@
 -- 
 -- Converts bin window coordinates to coordinates for the tree (the full scrollable area of the tree).
 --
+-- Removed in Gtk3.
 treeViewWidgetToTreeCoords :: TreeViewClass self => self
  -> Point    -- ^ @(wx, wy)@ - widget X and Y coordinates
  -> IO Point -- ^ @(tx, ty)@ returns tree X and Y coordinates
@@ -1009,6 +1015,7 @@
   ty <- peek tyPtr
   return (fromIntegral tx, fromIntegral ty)
 #endif
+#endif
 
 #if GTK_CHECK_VERSION(2,12,0)
 -- | Converts bin window coordinates to coordinates for the tree (the full scrollable area of the tree).
@@ -1115,9 +1122,11 @@
   return (fromIntegral tx, fromIntegral ty)
 #endif
 
+#if GTK_MAJOR_VERSION < 3
 -- | Creates a 'Pixmap' representation of the row at the given path. This image
 -- can be used for a drag icon.
 --
+-- Removed in Gtk3.
 treeViewCreateRowDragIcon :: TreeViewClass self => self
  -> TreePath
  -> IO Pixmap
@@ -1127,6 +1136,7 @@
   {# call unsafe tree_view_create_row_drag_icon #}
     (toTreeView self)
     path
+#endif
 
 -- | Returns whether or not the tree allows to start interactive searching by
 -- typing in text.
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
@@ -55,7 +55,9 @@
   treeViewColumnPackStart,
   treeViewColumnPackEnd,
   treeViewColumnClear,
+#if GTK_MAJOR_VERSION < 3
   treeViewColumnGetCellRenderers,
+#endif
   treeViewColumnSetSpacing,
   treeViewColumnGetSpacing,
   treeViewColumnSetVisible,
@@ -193,14 +195,17 @@
   {# call tree_view_column_clear #}
     self
 
+#if GTK_MAJOR_VERSION < 3
 -- | Retrieve all 'CellRenderer's that are contained in this column.
 --
+-- Removed in Gtk3.
 treeViewColumnGetCellRenderers :: TreeViewColumn -> IO [CellRenderer]
 treeViewColumnGetCellRenderers self =
   {# call unsafe tree_view_column_get_cell_renderers #}
     self
   >>= fromGList
   >>= mapM (makeNewObject mkCellRenderer . return)
+#endif
 
 -- | Set the number of pixels between two cell renderers.
 --
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
@@ -79,13 +79,17 @@
   textTagBackgroundFullHeight,
   textTagBackgroundFullHeightSet,
   textTagBackgroundGdk,
+#if GTK_MAJOR_VERSION < 3
   textTagBackgroundStipple,
   textTagBackgroundStippleSet,
+#endif
   textTagForeground,
   textTagForegroundSet,
   textTagForegroundGdk,
+#if GTK_MAJOR_VERSION < 3
   textTagForegroundStipple,
   textTagForegroundStippleSet,
+#endif
   textTagDirection,
   textTagEditable,
   textTagEditableSet,
@@ -301,8 +305,10 @@
   newAttrFromBoxedStorableProperty "background-gdk"
   {#call pure unsafe gdk_color_get_type#}
 
+#if GTK_MAJOR_VERSION < 3
 -- | Bitmap to use as a mask when drawing the text background.
 --
+-- Removed in Gtk3.
 textTagBackgroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap
 textTagBackgroundStipple = newAttrFromObjectProperty "background-stipple"
   {# call pure unsafe gdk_pixmap_get_type #}
@@ -311,8 +317,10 @@
 -- 
 -- Default value: @False@
 --
+-- Removed in Gtk3.
 textTagBackgroundStippleSet :: TextTagClass self => Attr self Bool
 textTagBackgroundStippleSet = newAttrFromBoolProperty "background-stipple-set"
+#endif
 
 -- | Foreground color as a string.
 --
@@ -335,8 +343,10 @@
   newAttrFromBoxedStorableProperty "foreground-gdk"
   {# call pure unsafe gdk_color_get_type #}
 
+#if GTK_MAJOR_VERSION < 3
 -- | Bitmap to use as a mask when drawing the text foreground.
 --
+-- Removed in Gtk3.
 textTagForegroundStipple :: (TextTagClass self, PixmapClass pixmap) => ReadWriteAttr self Pixmap pixmap
 textTagForegroundStipple = newAttrFromObjectProperty "foreground-stipple"
   {# call pure unsafe gdk_pixmap_get_type #}
@@ -345,8 +355,10 @@
 -- 
 -- Default value: @False@
 --
+-- Removed in Gtk3.
 textTagForegroundStippleSet :: TextTagClass self => Attr self Bool
 textTagForegroundStippleSet = newAttrFromBoolProperty "foreground-stipple-set"
+#endif
 
 -- | Text direction, e.g. right-to-left or left-to-right.
 --
diff --git a/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs b/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs
--- a/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs
+++ b/Graphics/UI/Gtk/Scrolling/ScrolledWindow.chs
@@ -27,7 +27,7 @@
 --
 module Graphics.UI.Gtk.Scrolling.ScrolledWindow (
 -- * Detail
--- 
+--
 -- | 'ScrolledWindow' is a 'Bin' subclass: it's a container the accepts a
 -- single child widget. 'ScrolledWindow' adds scrollbars to the child widget
 -- and optionally draws a beveled frame around the child widget.
@@ -95,12 +95,24 @@
   ShadowType(..),
   scrolledWindowSetShadowType,
   scrolledWindowGetShadowType,
+#if GTK_MAJOR_VERSION >= 3
+  scrolledWindowSetMinContentWidth,
+  scrolledWindowGetMinContentWidth,
+  scrolledWindowSetMinContentHeight,
+  scrolledWindowGetMinContentHeight,
+#endif
   scrolledWindowSetHAdjustment,
   scrolledWindowSetVAdjustment,
 #if GTK_CHECK_VERSION(2,8,0)
   scrolledWindowGetHScrollbar,
   scrolledWindowGetVScrollbar,
 #endif
+#if GTK_CHECK_VERSION(3,4,0)
+  scrolledWindowSetKineticScrolling,
+  scrolledWindowGetKineticScrolling,
+  scrolledWindowSetCaptureButtonPress,
+  scrolledWindowGetCaptureButtonPress,
+#endif
 
 -- * Attributes
   scrolledWindowHAdjustment,
@@ -109,7 +121,14 @@
   scrolledWindowVscrollbarPolicy,
   scrolledWindowWindowPlacement,
   scrolledWindowShadowType,
+#if GTK_MAJOR_VERSION >= 3
+  scrolledWindowMinContentWidth,
+  scrolledWindowMinContentHeight,
+#endif
   scrolledWindowPlacement,
+#if GTK_CHECK_VERSION(3,4,0)
+  scrolledWindowKineticScrolling,
+#endif
   ) where
 
 import Control.Monad	(liftM)
@@ -133,7 +152,7 @@
 -- @Nothing@ for the adjustments, which will cause the scrolled window to
 -- create them for you.
 --
-scrolledWindowNew :: 
+scrolledWindowNew ::
     Maybe Adjustment  -- ^ @hadjustment@ - Horizontal adjustment.
  -> Maybe Adjustment  -- ^ @vadjustment@ - Vertical adjustment.
  -> IO ScrolledWindow
@@ -259,6 +278,42 @@
   {# call unsafe scrolled_window_get_shadow_type #}
     (toScrolledWindow self)
 
+#if GTK_MAJOR_VERSION >= 3
+-- | Sets the minimum width that @scrolledWindow@ should keep visible.
+--   Note that this can and (usually will) be smaller than the minimum size of the content.
+--
+scrolledWindowSetMinContentWidth :: ScrolledWindowClass self => self -> Int -> IO ()
+scrolledWindowSetMinContentWidth self width =
+  {# call gtk_scrolled_window_set_min_content_width #}
+    (toScrolledWindow self)
+    (fromIntegral width)
+
+-- | Gets the minimum content width of @scrolledWindow@, or -1 if not set.
+--
+scrolledWindowGetMinContentWidth :: ScrolledWindowClass self => self -> IO Int
+scrolledWindowGetMinContentWidth self =
+  liftM fromIntegral $
+  {# call unsafe scrolled_window_get_min_content_width #}
+    (toScrolledWindow self)
+
+-- | Sets the minimum height that @scrolledWindow@ should keep visible.
+--   Note that this can and (usually will) be smaller than the minimum size of the content.
+--
+scrolledWindowSetMinContentHeight :: ScrolledWindowClass self => self -> Int -> IO ()
+scrolledWindowSetMinContentHeight self height =
+  {# call gtk_scrolled_window_set_min_content_height #}
+    (toScrolledWindow self)
+    (fromIntegral height)
+
+-- | Gets the minimum content height of @scrolledWindow@, or -1 if not set.
+--
+scrolledWindowGetMinContentHeight :: ScrolledWindowClass self => self -> IO Int
+scrolledWindowGetMinContentHeight self =
+  liftM fromIntegral $
+  {# call unsafe scrolled_window_get_min_content_height #}
+    (toScrolledWindow self)
+#endif
+
 -- | Sets the 'Adjustment' for the horizontal scrollbar.
 --
 scrolledWindowSetHAdjustment :: ScrolledWindowClass self => self -> Adjustment -> IO ()
@@ -305,6 +360,51 @@
     (toScrolledWindow self)
 #endif
 
+#if GTK_CHECK_VERSION(3,4,0)
+-- | Turns kinetic scrolling on or off. Kinetic scrolling only applies to
+--   devices with source GDK_SOURCE_TOUCHSCREEN.
+--
+scrolledWindowSetKineticScrolling :: ScrolledWindowClass self => self -> Bool -> IO ()
+scrolledWindowSetKineticScrolling self kineticScrolling =
+  {# call scrolled_window_set_kinetic_scrolling #}
+    (toScrolledWindow self)
+    (fromBool kineticScrolling)
+
+-- | Returns the specified kinetic scrolling behavior.
+--
+scrolledWindowGetKineticScrolling :: ScrolledWindowClass self => self -> IO Bool
+scrolledWindowGetKineticScrolling self =
+  liftM toBool $
+  {# call scrolled_window_get_kinetic_scrolling #}
+    (toScrolledWindow self)
+
+-- | Changes the behaviour of @scrolledWindow@ wrt. to the initial event that
+--   possibly starts kinetic scrolling. When @captureButtonPress@ is set to
+--   True, the event is captured by the scrolled window, and then later replayed
+--   if it is meant to go to the child widget.
+--
+--   This should be enabled if any child widgets perform non-reversible actions
+--   on "button-press-event". If they don't, and handle additionally handle
+--   "grab-broken-event", it might be better to set captureButtonPress to False.
+--
+--   This setting only has an effect if kinetic scrolling is enabled.
+--
+scrolledWindowSetCaptureButtonPress :: ScrolledWindowClass self => self -> Bool -> IO ()
+scrolledWindowSetCaptureButtonPress self captureButtonPress =
+  {# call gtk_scrolled_window_set_capture_button_press #}
+    (toScrolledWindow self)
+    (fromBool captureButtonPress)
+
+-- | Return whether button presses are captured during kinetic scrolling.
+--   See @scrolledWindowSetCaptureButtonPress@.
+--
+scrolledWindowGetCaptureButtonPress :: ScrolledWindowClass self => self -> IO Bool
+scrolledWindowGetCaptureButtonPress self =
+  liftM toBool $
+  {# call gtk_scrolled_window_get_capture_button_press #}
+    (toScrolledWindow self)
+#endif
+
 --------------------
 -- Attributes
 
@@ -355,6 +455,26 @@
   scrolledWindowGetShadowType
   scrolledWindowSetShadowType
 
+#if GTK_MAJOR_VERSION >= 3
+-- | Minimum width that @scrolledWindow@ should keep visible.
+--
+-- Default value: -1
+--
+scrolledWindowMinContentWidth :: ScrolledWindowClass self => Attr self Int
+scrolledWindowMinContentWidth = newAttr
+  scrolledWindowGetMinContentWidth
+  scrolledWindowSetMinContentWidth
+
+-- | Minimum height that @scrolledWindow@ should keep visible.
+--
+-- Default value: -1
+--
+scrolledWindowMinContentHeight :: ScrolledWindowClass self => Attr self Int
+scrolledWindowMinContentHeight = newAttr
+  scrolledWindowGetMinContentHeight
+  scrolledWindowSetMinContentHeight
+#endif
+
 -- | \'placement\' property. See 'scrolledWindowGetPlacement' and
 -- 'scrolledWindowSetPlacement'
 --
@@ -362,3 +482,14 @@
 scrolledWindowPlacement = newAttr
   scrolledWindowGetPlacement
   scrolledWindowSetPlacement
+
+#if GTK_CHECK_VERSION(3,4,0)
+-- | The kinetic scrolling behavior flags. Kinetic scrolling only applies to
+--   devices with source GDK_SOURCE_TOUCHSCREEN
+--
+scrolledWindowKineticScrolling :: ScrolledWindowClass self => Attr self Bool
+scrolledWindowKineticScrolling = newAttr
+  scrolledWindowGetKineticScrolling
+  scrolledWindowSetKineticScrolling
+#endif
+
diff --git a/Graphics/UI/Gtk/Selectors/ColorSelectionDialog.chs b/Graphics/UI/Gtk/Selectors/ColorSelectionDialog.chs
--- a/Graphics/UI/Gtk/Selectors/ColorSelectionDialog.chs
+++ b/Graphics/UI/Gtk/Selectors/ColorSelectionDialog.chs
@@ -55,10 +55,12 @@
   colorSelectionDialogNew,
 
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
   colorSelectionDialogGetColor,
   colorSelectionDialogGetOkButton,
   colorSelectionDialogGetCancelButton,
   colorSelectionDialogGetHelpButton,
+#endif
   ) where
 
 import Control.Monad	(liftM)
@@ -67,10 +69,12 @@
 import System.Glib.UTFString
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
+#if GTK_MAJOR_VERSION < 3
 import Graphics.UI.Gtk.General.Structs	(colorSelectionDialogGetColor,
 					colorSelectionDialogGetOkButton,
 					colorSelectionDialogGetCancelButton,
 					colorSelectionDialogGetHelpButton)
+#endif
 
 {# context lib="gtk" prefix="gtk" #}
 
diff --git a/Graphics/UI/Gtk/Selectors/FileChooser.chs b/Graphics/UI/Gtk/Selectors/FileChooser.chs
--- a/Graphics/UI/Gtk/Selectors/FileChooser.chs
+++ b/Graphics/UI/Gtk/Selectors/FileChooser.chs
@@ -207,6 +207,16 @@
   fileChooserAction,
 
 -- * Signals
+  currentFolderChanged,
+  fileActivated,
+  fileSelectionChanged,
+  updatePreview,
+#if GTK_CHECK_VERSION(2,8,0)
+  confirmOverwrite,
+#endif
+
+#ifndef DISABLE_DEPRECATED
+-- * Deprecated
   onCurrentFolderChanged,
   afterCurrentFolderChanged,
   onFileActivated,
@@ -218,8 +228,9 @@
 #if GTK_CHECK_VERSION(2,8,0)
   onConfirmOverwrite,
   afterConfirmOverwrite,
-#endif
-#endif
+#endif -- version 2.8
+#endif -- deprecated
+#endif -- version 2.4
   ) where
 
 import Control.Monad (liftM)
@@ -363,7 +374,7 @@
                         -- @Nothing@ if no file is selected, or the selected
                         -- file can't be represented with a local filename.
 fileChooserGetFilename self =
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_get_filename_utf8 #}
 #else
   {# call gtk_file_chooser_get_filename #}
@@ -405,7 +416,7 @@
 fileChooserSetFilename self filename =
   liftM toBool $
   withCString filename $ \filenamePtr ->
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_set_filename_utf8 #}
 #else
   {# call gtk_file_chooser_set_filename #}
@@ -424,7 +435,7 @@
 fileChooserSelectFilename self filename =
   liftM toBool $
   withCString filename $ \filenamePtr ->
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_select_filename_utf8 #}
 #else
   {# call gtk_file_chooser_select_filename #}
@@ -441,7 +452,7 @@
  -> IO ()
 fileChooserUnselectFilename self filename =
   withCString filename $ \filenamePtr ->
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_unselect_filename_utf8 #}
 #else
   {# call gtk_file_chooser_unselect_filename #}
@@ -470,7 +481,7 @@
 --
 fileChooserGetFilenames :: FileChooserClass self => self -> IO [FilePath]
 fileChooserGetFilenames self =
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_get_filenames_utf8 #}
 #else
   {# call gtk_file_chooser_get_filenames #}
@@ -489,7 +500,7 @@
 fileChooserSetCurrentFolder self filename =
   liftM toBool $
   withCString filename $ \filenamePtr ->
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_set_current_folder_utf8 #}
 #else
   {# call gtk_file_chooser_set_current_folder #}
@@ -505,7 +516,7 @@
                         -- @Nothing@ if the current path cannot be represented
                         -- as a local filename.
 fileChooserGetCurrentFolder self =
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_get_current_folder_utf8 #}
 #else
   {# call gtk_file_chooser_get_current_folder #}
@@ -717,7 +728,7 @@
                         -- no file is selected, or if the selected file cannot
                         -- be represented as a local filename.
 fileChooserGetPreviewFilename self =
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_get_preview_filename_utf8 #}
 #else
   {# call gtk_file_chooser_get_preview_filename #}
@@ -818,7 +829,7 @@
 fileChooserAddShortcutFolder self folder =
   propagateGError $ \errorPtr ->
   withCString folder $ \folderPtr -> do
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_add_shortcut_folder_utf8 #}
 #else
   {# call gtk_file_chooser_add_shortcut_folder #}
@@ -838,7 +849,7 @@
 fileChooserRemoveShortcutFolder self folder =
   propagateGError $ \errorPtr ->
   withCString folder $ \folderPtr -> do
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_remove_shortcut_folder_utf8 #}
 #else
   {# call gtk_file_chooser_remove_shortcut_folder #}
@@ -853,7 +864,7 @@
 --
 fileChooserListShortcutFolders :: FileChooserClass self => self -> IO [String]
 fileChooserListShortcutFolders self =
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_file_chooser_list_shortcut_folders_utf8 #}
 #else
   {# call gtk_file_chooser_list_shortcut_folders #}
@@ -1072,11 +1083,8 @@
 -- See also: 'fileChooserSetCurrentFolder', 'fileChooserGetCurrentFolder',
 -- 'fileChooserSetCurrentFolderURI', 'fileChooserGetCurrentFolderURI'.
 --
-onCurrentFolderChanged, afterCurrentFolderChanged :: FileChooserClass self => self
- -> IO ()
- -> IO (ConnectId self)
-onCurrentFolderChanged = connect_NONE__NONE "current-folder-changed" False
-afterCurrentFolderChanged = connect_NONE__NONE "current-folder-changed" True
+currentFolderChanged :: FileChooserClass self => Signal self (IO ())
+currentFolderChanged = Signal (connect_NONE__NONE "current-folder-changed")
 
 -- | This signal is emitted when there is a change in the set of selected
 -- files in a 'FileChooser'. This can happen when the user modifies the
@@ -1091,11 +1099,8 @@
 -- 'fileChooserGetFilename', 'fileChooserGetFilenames', 'fileChooserSelectURI',
 -- 'fileChooserUnselectURI', 'fileChooserGetURI', 'fileChooserGetURIs'.
 --
---onSelectionChanged, afterSelectionChanged :: FileChooserClass self => self
--- -> IO ()
--- -> IO (ConnectId self)
---onSelectionChanged = connect_NONE__NONE "selection-changed" False
---afterSelectionChanged = connect_NONE__NONE "selection-changed" True
+fileSelectionChanged :: FileChooserClass self => Signal self (IO ())
+fileSelectionChanged = Signal (connect_NONE__NONE "selection-changed")
 
 -- | This signal is emitted when the preview in a file chooser should be
 -- regenerated. For example, this can happen when the currently selected file
@@ -1114,11 +1119,8 @@
 -- 'fileChooserSetPreviewWidgetActive', 'fileChooserSetUsePreviewLabel',
 -- 'fileChooserGetPreviewFilename', 'fileChooserGetPreviewURI'.
 --
-onUpdatePreview, afterUpdatePreview :: FileChooserClass self => self
- -> IO ()
- -> IO (ConnectId self)
-onUpdatePreview = connect_NONE__NONE "update-preview" False
-afterUpdatePreview = connect_NONE__NONE "update-preview" True
+updatePreview :: FileChooserClass self => Signal self (IO ())
+updatePreview = Signal (connect_NONE__NONE "update-preview")
 
 -- | This signal is emitted when the user \"activates\" a file in the file
 -- chooser. This can happen by double-clicking on a file in the file list, or
@@ -1131,11 +1133,8 @@
 -- See also: 'fileChooserGetFilename', 'fileChooserGetFilenames',
 -- 'fileChooserGetURI', 'fileChooserGetURIs'.
 --
-onFileActivated, afterFileActivated :: FileChooserClass self => self
- -> IO ()
- -> IO (ConnectId self)
-onFileActivated = connect_NONE__NONE "file-activated" False
-afterFileActivated = connect_NONE__NONE "file-activated" True
+fileActivated :: FileChooserClass self => Signal self (IO ())
+fileActivated = Signal (connect_NONE__NONE "file-activated")
 
 #if GTK_CHECK_VERSION(2,8,0)
 -- | This signal gets emitted whenever it is appropriate to present a
@@ -1160,11 +1159,54 @@
 --
 -- Since Gtk 2.8.
 --
+confirmOverwrite :: FileChooserClass self => Signal self (IO FileChooserConfirmation)
+confirmOverwrite = Signal (connect_NONE__ENUM "confirm-overwrite")
+#endif
+
+#ifndef DISABLE_DEPRECATED
+
+-- * Deprecated
+
+onCurrentFolderChanged, afterCurrentFolderChanged :: FileChooserClass self => self
+ -> IO ()
+ -> IO (ConnectId self)
+onCurrentFolderChanged = connect_NONE__NONE "current-folder-changed" False
+afterCurrentFolderChanged = connect_NONE__NONE "current-folder-changed" True
+{-# DEPRECATED onCurrentFolderChanged "use currentFolderChanged instead" #-}
+{-# DEPRECATED afterCurrentFolderChanged "use currentFolderChanged instead" #-}
+
+--onSelectionChanged, afterSelectionChanged :: FileChooserClass self => self
+-- -> IO ()
+-- -> IO (ConnectId self)
+--onSelectionChanged = connect_NONE__NONE "selection-changed" False
+--afterSelectionChanged = connect_NONE__NONE "selection-changed" True
+
+onUpdatePreview, afterUpdatePreview :: FileChooserClass self => self
+ -> IO ()
+ -> IO (ConnectId self)
+onUpdatePreview = connect_NONE__NONE "update-preview" False
+afterUpdatePreview = connect_NONE__NONE "update-preview" True
+{-# DEPRECATED onUpdatePreview "use updatePreview instead" #-}
+{-# DEPRECATED afterUpdatePreview "use updatePreview instead" #-}
+
+onFileActivated, afterFileActivated :: FileChooserClass self => self
+ -> IO ()
+ -> IO (ConnectId self)
+onFileActivated = connect_NONE__NONE "file-activated" False
+afterFileActivated = connect_NONE__NONE "file-activated" True
+{-# DEPRECATED onFileActivated "use fileActivated instead" #-}
+{-# DEPRECATED afterFileActivated "use fileActivated instead" #-}
+
+#if GTK_CHECK_VERSION(2,8,0)
 onConfirmOverwrite, afterConfirmOverwrite :: FileChooserClass self => self
  -> IO FileChooserConfirmation
  -> IO (ConnectId self)
 onConfirmOverwrite = connect_NONE__ENUM "confirm-overwrite" False
 afterConfirmOverwrite = connect_NONE__ENUM "confirm-overwrite" True
+{-# DEPRECATED onConfirmOverwrite "use confirmOverwrite instead" #-}
+{-# DEPRECATED afterConfirmOverwrite "use confirmOverwrite instead" #-}
+#endif
+
 #endif
 
 #endif
diff --git a/Graphics/UI/Gtk/Selectors/FileChooserButton.chs b/Graphics/UI/Gtk/Selectors/FileChooserButton.chs
--- a/Graphics/UI/Gtk/Selectors/FileChooserButton.chs
+++ b/Graphics/UI/Gtk/Selectors/FileChooserButton.chs
@@ -60,7 +60,9 @@
 
 -- * Constructors
   fileChooserButtonNew,
+#if GTK_MAJOR_VERSION < 3
   fileChooserButtonNewWithBackend,
+#endif
   fileChooserButtonNewWithDialog,
 
 -- * Methods
@@ -112,8 +114,10 @@
     titlePtr
     ((fromIntegral . fromEnum) action)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Creates a new file-selecting button widget using @backend@.
 --
+-- Removed in Gtk3.
 fileChooserButtonNewWithBackend :: 
     String               -- ^ @title@ - the title of the browse dialog.
  -> FileChooserAction    -- ^ @action@ - the open mode for the widget.
@@ -129,6 +133,7 @@
     titlePtr
     ((fromIntegral . fromEnum) action)
     backendPtr
+#endif
 
 -- | Creates a 'FileChooserButton' widget which uses @dialog@ as it's
 -- file-picking window.
diff --git a/Graphics/UI/Gtk/Selectors/FileChooserWidget.chs b/Graphics/UI/Gtk/Selectors/FileChooserWidget.chs
--- a/Graphics/UI/Gtk/Selectors/FileChooserWidget.chs
+++ b/Graphics/UI/Gtk/Selectors/FileChooserWidget.chs
@@ -60,8 +60,10 @@
 -- * Constructors
   FileChooserAction,
   fileChooserWidgetNew,
+#if GTK_MAJOR_VERSION < 3
   fileChooserWidgetNewWithBackend,
 #endif
+#endif
   ) where
 
 import Control.Monad (liftM)
@@ -96,11 +98,13 @@
   {# call unsafe gtk_file_chooser_widget_new #}
     ((fromIntegral . fromEnum) action)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Creates a new 'FileChooserWidget' with a specified backend. This is
 -- especially useful if you use 'fileChooserSetLocalOnly' to allow non-local
 -- files. This is a file chooser widget that can be embedded in custom windows
 -- and it is the same widget that is used by 'FileChooserDialog'.
 --
+-- Removed in Gtk3.
 fileChooserWidgetNewWithBackend :: 
     FileChooserAction    -- ^ @action@ - Open or save mode for the widget
  -> String               -- ^ @backend@ - The name of the specific filesystem
@@ -113,4 +117,5 @@
   {# call unsafe gtk_file_chooser_widget_new_with_backend #}
     ((fromIntegral . fromEnum) action)
     backendPtr
+#endif
 #endif
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,6 +84,8 @@
 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/FileSelection.chs b/Graphics/UI/Gtk/Selectors/FileSelection.chs
--- a/Graphics/UI/Gtk/Selectors/FileSelection.chs
+++ b/Graphics/UI/Gtk/Selectors/FileSelection.chs
@@ -27,6 +27,7 @@
 --
 -- * As of Gtk+ 2.4 this module has been deprecated in favour of 'FileChooser'
 --
+-- This module is empty in Gtk3.
 module Graphics.UI.Gtk.Selectors.FileSelection (
 -- * Detail
 -- 
@@ -64,7 +65,7 @@
 -- |                                 +----'Dialog'
 -- |                                       +----FileSelection
 -- @
-
+#if GTK_MAJOR_VERSION < 3
 -- * Types
   FileSelection,
   FileSelectionClass,
@@ -89,8 +90,9 @@
   fileSelectionFilename,
   fileSelectionShowFileops,
   fileSelectionSelectMultiple,
+#endif
   ) where
-
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad            (liftM)
 
 import System.Glib.FFI
@@ -262,3 +264,4 @@
 fileSelectionSelectMultiple = newAttr
   fileSelectionGetSelectMultiple
   fileSelectionSetSelectMultiple
+#endif
diff --git a/Graphics/UI/Gtk/Special/HRuler.chs b/Graphics/UI/Gtk/Special/HRuler.chs
--- a/Graphics/UI/Gtk/Special/HRuler.chs
+++ b/Graphics/UI/Gtk/Special/HRuler.chs
@@ -25,6 +25,8 @@
 --
 -- A horizontal ruler
 --
+-- * Rulers are removed in Gtk3 and thus this module is blank. There is no
+--   replacement
 module Graphics.UI.Gtk.Special.HRuler (
 
 -- * Detail
@@ -45,7 +47,7 @@
 -- |               +----'Ruler'
 -- |                     +----HRuler
 -- @
-
+#if GTK_MAJOR_VERSION < 3
 -- * Types
   HRuler,
   HRulerClass,
@@ -54,8 +56,9 @@
 
 -- * Constructors
   hRulerNew,
+#endif
   ) where
-
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -74,3 +77,4 @@
   makeNewObject mkHRuler $
   liftM (castPtr :: Ptr Widget -> Ptr HRuler) $
   {# call gtk_hruler_new #}
+#endif
diff --git a/Graphics/UI/Gtk/Special/Ruler.chs b/Graphics/UI/Gtk/Special/Ruler.chs
--- a/Graphics/UI/Gtk/Special/Ruler.chs
+++ b/Graphics/UI/Gtk/Special/Ruler.chs
@@ -35,6 +35,9 @@
 -- triangle indicates the location of the mouse relative to the horizontal or
 -- vertical ruler. See 'HRuler' to learn how to create a new horizontal ruler.
 -- See 'VRuler' to learn how to create a new vertical ruler.
+--
+-- * Rulers are removed in Gtk3 and thus this module is blank. There is no
+--   replacement
 
 -- * Class Hierarchy
 --
@@ -47,7 +50,7 @@
 -- |                     +----'HRuler'
 -- |                     +----'VRuler'
 -- @
-
+#if GTK_MAJOR_VERSION < 3
 -- * Types
   Ruler,
   RulerClass,
@@ -65,9 +68,10 @@
   rulerMaxSize,
 #if GTK_CHECK_VERSION(2,8,0)
   rulerMetric,
-#endif 
+#endif
+#endif
   ) where
-
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -171,4 +175,5 @@
 rulerMetric :: RulerClass self => Attr self MetricType
 rulerMetric = newAttrFromEnumProperty "metric"
                 {# call pure unsafe gtk_metric_type_get_type #}
+#endif
 #endif
diff --git a/Graphics/UI/Gtk/Special/VRuler.chs b/Graphics/UI/Gtk/Special/VRuler.chs
--- a/Graphics/UI/Gtk/Special/VRuler.chs
+++ b/Graphics/UI/Gtk/Special/VRuler.chs
@@ -34,6 +34,9 @@
 -- show the location of the mouse on the window and to show the size of the
 -- window in specified units. The available units of measurement are 'Pixels',
 -- 'Inches' and 'Centimeters'. 'Pixels' is the default. rulers.
+--
+-- * Rulers are removed in Gtk3 and thus this module is blank. There is no
+--   replacement
 
 -- * Class Hierarchy
 --
@@ -45,7 +48,7 @@
 -- |               +----'Ruler'
 -- |                     +----VRuler
 -- @
-
+#if GTK_MAJOR_VERSION < 3
 -- * Types
   VRuler,
   VRulerClass,
@@ -54,8 +57,9 @@
 
 -- * Constructors
   vRulerNew,
+#endif
   ) where
-
+#if GTK_MAJOR_VERSION < 3
 import Control.Monad	(liftM)
 
 import System.Glib.FFI
@@ -74,3 +78,4 @@
   makeNewObject mkVRuler $
   liftM (castPtr :: Ptr Widget -> Ptr VRuler) $
   {# call gtk_vruler_new #}
+#endif
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,5831 +1,5077 @@
 {-# OPTIONS_HADDOCK hide #-}
-{-# LANGUAGE CPP #-}
--- -*-haskell-*-
--- -------------------- automatically generated file - do not edit ----------
---  Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell
---
---  Author : Axel Simon
---
---  Copyright (C) 2001-2005 Axel Simon
---
---  This library is free software; you can redistribute it and/or
---  modify it under the terms of the GNU Lesser General Public
---  License as published by the Free Software Foundation; either
---  version 2.1 of the License, or (at your option) any later version.
---
---  This library is distributed in the hope that it will be useful,
---  but WITHOUT ANY WARRANTY; without even the implied warranty of
---  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
---  Lesser General Public License for more details.
---
--- #hide
-
--- |
--- Maintainer  : gtk2hs-users@lists.sourceforge.net
--- Stability   : provisional
--- Portability : portable (depends on GHC)
---
--- This file reflects the Gtk+ object hierarchy in terms of Haskell classes.
---
--- Note: the mk... functions were originally meant to simply be an alias
--- for the constructor. However, in order to communicate the destructor
--- of an object to objectNew, the mk... functions are now a tuple containing
--- Haskell constructor and the destructor function pointer. This hack avoids
--- changing all modules that simply pass mk... to objectNew.
---
-module Graphics.UI.Gtk.Types (
-
-  module System.Glib.GObject,
-  module Graphics.UI.Gtk.General.Threading,
-  AtkObject(AtkObject), AtkObjectClass,
-  toAtkObject, 
-  mkAtkObject, unAtkObject,
-  castToAtkObject, gTypeAtkObject,
-  Accessible(Accessible), AccessibleClass,
-  toAccessible, 
-  mkAccessible, unAccessible,
-  castToAccessible, gTypeAccessible,
-  Keymap(Keymap), KeymapClass,
-  toKeymap, 
-  mkKeymap, unKeymap,
-  castToKeymap, gTypeKeymap,
-  DisplayManager(DisplayManager), DisplayManagerClass,
-  toDisplayManager, 
-  mkDisplayManager, unDisplayManager,
-  castToDisplayManager, gTypeDisplayManager,
-  AppLaunchContext(AppLaunchContext), AppLaunchContextClass,
-  toAppLaunchContext, 
-  mkAppLaunchContext, unAppLaunchContext,
-  castToAppLaunchContext, gTypeAppLaunchContext,
-  PrintSettings(PrintSettings), PrintSettingsClass,
-  toPrintSettings, 
-  mkPrintSettings, unPrintSettings,
-  castToPrintSettings, gTypePrintSettings,
-  PrintOperation(PrintOperation), PrintOperationClass,
-  toPrintOperation, 
-  mkPrintOperation, unPrintOperation,
-  castToPrintOperation, gTypePrintOperation,
-  PrintOperationPreview(PrintOperationPreview), PrintOperationPreviewClass,
-  toPrintOperationPreview, 
-  mkPrintOperationPreview, unPrintOperationPreview,
-  castToPrintOperationPreview, gTypePrintOperationPreview,
-  PageSetup(PageSetup), PageSetupClass,
-  toPageSetup, 
-  mkPageSetup, unPageSetup,
-  castToPageSetup, gTypePageSetup,
-  PrintContext(PrintContext), PrintContextClass,
-  toPrintContext, 
-  mkPrintContext, unPrintContext,
-  castToPrintContext, gTypePrintContext,
-  RecentChooser(RecentChooser), RecentChooserClass,
-  toRecentChooser, 
-  mkRecentChooser, unRecentChooser,
-  castToRecentChooser, gTypeRecentChooser,
-  RecentManager(RecentManager), RecentManagerClass,
-  toRecentManager, 
-  mkRecentManager, unRecentManager,
-  castToRecentManager, gTypeRecentManager,
-  Drawable(Drawable), DrawableClass,
-  toDrawable, 
-  mkDrawable, unDrawable,
-  castToDrawable, gTypeDrawable,
-  DrawWindow(DrawWindow), DrawWindowClass,
-  toDrawWindow, 
-  mkDrawWindow, unDrawWindow,
-  castToDrawWindow, gTypeDrawWindow,
-  Pixmap(Pixmap), PixmapClass,
-  toPixmap, 
-  mkPixmap, unPixmap,
-  castToPixmap, gTypePixmap,
-  Colormap(Colormap), ColormapClass,
-  toColormap, 
-  mkColormap, unColormap,
-  castToColormap, gTypeColormap,
-  Screen(Screen), ScreenClass,
-  toScreen, 
-  mkScreen, unScreen,
-  castToScreen, gTypeScreen,
-  Display(Display), DisplayClass,
-  toDisplay, 
-  mkDisplay, unDisplay,
-  castToDisplay, gTypeDisplay,
-  Visual(Visual), VisualClass,
-  toVisual, 
-  mkVisual, unVisual,
-  castToVisual, gTypeVisual,
-  Device(Device), DeviceClass,
-  toDevice, 
-  mkDevice, unDevice,
-  castToDevice, gTypeDevice,
-  Settings(Settings), SettingsClass,
-  toSettings, 
-  mkSettings, unSettings,
-  castToSettings, gTypeSettings,
-  TextBuffer(TextBuffer), TextBufferClass,
-  toTextBuffer, 
-  mkTextBuffer, unTextBuffer,
-  castToTextBuffer, gTypeTextBuffer,
-  TextTag(TextTag), TextTagClass,
-  toTextTag, 
-  mkTextTag, unTextTag,
-  castToTextTag, gTypeTextTag,
-  TextTagTable(TextTagTable), TextTagTableClass,
-  toTextTagTable, 
-  mkTextTagTable, unTextTagTable,
-  castToTextTagTable, gTypeTextTagTable,
-  Style(Style), StyleClass,
-  toStyle, 
-  mkStyle, unStyle,
-  castToStyle, gTypeStyle,
-  RcStyle(RcStyle), RcStyleClass,
-  toRcStyle, 
-  mkRcStyle, unRcStyle,
-  castToRcStyle, gTypeRcStyle,
-  DragContext(DragContext), DragContextClass,
-  toDragContext, 
-  mkDragContext, unDragContext,
-  castToDragContext, gTypeDragContext,
-  Pixbuf(Pixbuf), PixbufClass,
-  toPixbuf, 
-  mkPixbuf, unPixbuf,
-  castToPixbuf, gTypePixbuf,
-  PixbufAnimation(PixbufAnimation), PixbufAnimationClass,
-  toPixbufAnimation, 
-  mkPixbufAnimation, unPixbufAnimation,
-  castToPixbufAnimation, gTypePixbufAnimation,
-  PixbufSimpleAnim(PixbufSimpleAnim), PixbufSimpleAnimClass,
-  toPixbufSimpleAnim, 
-  mkPixbufSimpleAnim, unPixbufSimpleAnim,
-  castToPixbufSimpleAnim, gTypePixbufSimpleAnim,
-  PixbufAnimationIter(PixbufAnimationIter), PixbufAnimationIterClass,
-  toPixbufAnimationIter, 
-  mkPixbufAnimationIter, unPixbufAnimationIter,
-  castToPixbufAnimationIter, gTypePixbufAnimationIter,
-  TextChildAnchor(TextChildAnchor), TextChildAnchorClass,
-  toTextChildAnchor, 
-  mkTextChildAnchor, unTextChildAnchor,
-  castToTextChildAnchor, gTypeTextChildAnchor,
-  TextMark(TextMark), TextMarkClass,
-  toTextMark, 
-  mkTextMark, unTextMark,
-  castToTextMark, gTypeTextMark,
-  Object(Object), ObjectClass,
-  toObject, 
-  mkObject, unObject,
-  castToObject, gTypeObject,
-  RecentFilter(RecentFilter), RecentFilterClass,
-  toRecentFilter, 
-  mkRecentFilter, unRecentFilter,
-  castToRecentFilter, gTypeRecentFilter,
-  Widget(Widget), WidgetClass,
-  toWidget, 
-  mkWidget, unWidget,
-  castToWidget, gTypeWidget,
-  HSV(HSV), HSVClass,
-  toHSV, 
-  mkHSV, unHSV,
-  castToHSV, gTypeHSV,
-  Misc(Misc), MiscClass,
-  toMisc, 
-  mkMisc, unMisc,
-  castToMisc, gTypeMisc,
-  Label(Label), LabelClass,
-  toLabel, 
-  mkLabel, unLabel,
-  castToLabel, gTypeLabel,
-  AccelLabel(AccelLabel), AccelLabelClass,
-  toAccelLabel, 
-  mkAccelLabel, unAccelLabel,
-  castToAccelLabel, gTypeAccelLabel,
-  TipsQuery(TipsQuery), TipsQueryClass,
-  toTipsQuery, 
-  mkTipsQuery, unTipsQuery,
-  castToTipsQuery, gTypeTipsQuery,
-  Arrow(Arrow), ArrowClass,
-  toArrow, 
-  mkArrow, unArrow,
-  castToArrow, gTypeArrow,
-  Image(Image), ImageClass,
-  toImage, 
-  mkImage, unImage,
-  castToImage, gTypeImage,
-  Container(Container), ContainerClass,
-  toContainer, 
-  mkContainer, unContainer,
-  castToContainer, gTypeContainer,
-  ToolPalette(ToolPalette), ToolPaletteClass,
-  toToolPalette, 
-  mkToolPalette, unToolPalette,
-  castToToolPalette, gTypeToolPalette,
-  ToolItemGroup(ToolItemGroup), ToolItemGroupClass,
-  toToolItemGroup, 
-  mkToolItemGroup, unToolItemGroup,
-  castToToolItemGroup, gTypeToolItemGroup,
-  Bin(Bin), BinClass,
-  toBin, 
-  mkBin, unBin,
-  castToBin, gTypeBin,
-  Alignment(Alignment), AlignmentClass,
-  toAlignment, 
-  mkAlignment, unAlignment,
-  castToAlignment, gTypeAlignment,
-  Frame(Frame), FrameClass,
-  toFrame, 
-  mkFrame, unFrame,
-  castToFrame, gTypeFrame,
-  AspectFrame(AspectFrame), AspectFrameClass,
-  toAspectFrame, 
-  mkAspectFrame, unAspectFrame,
-  castToAspectFrame, gTypeAspectFrame,
-  Button(Button), ButtonClass,
-  toButton, 
-  mkButton, unButton,
-  castToButton, gTypeButton,
-  ScaleButton(ScaleButton), ScaleButtonClass,
-  toScaleButton, 
-  mkScaleButton, unScaleButton,
-  castToScaleButton, gTypeScaleButton,
-  VolumeButton(VolumeButton), VolumeButtonClass,
-  toVolumeButton, 
-  mkVolumeButton, unVolumeButton,
-  castToVolumeButton, gTypeVolumeButton,
-  LinkButton(LinkButton), LinkButtonClass,
-  toLinkButton, 
-  mkLinkButton, unLinkButton,
-  castToLinkButton, gTypeLinkButton,
-  ToggleButton(ToggleButton), ToggleButtonClass,
-  toToggleButton, 
-  mkToggleButton, unToggleButton,
-  castToToggleButton, gTypeToggleButton,
-  CheckButton(CheckButton), CheckButtonClass,
-  toCheckButton, 
-  mkCheckButton, unCheckButton,
-  castToCheckButton, gTypeCheckButton,
-  RadioButton(RadioButton), RadioButtonClass,
-  toRadioButton, 
-  mkRadioButton, unRadioButton,
-  castToRadioButton, gTypeRadioButton,
-  ColorButton(ColorButton), ColorButtonClass,
-  toColorButton, 
-  mkColorButton, unColorButton,
-  castToColorButton, gTypeColorButton,
-  FontButton(FontButton), FontButtonClass,
-  toFontButton, 
-  mkFontButton, unFontButton,
-  castToFontButton, gTypeFontButton,
-  OptionMenu(OptionMenu), OptionMenuClass,
-  toOptionMenu, 
-  mkOptionMenu, unOptionMenu,
-  castToOptionMenu, gTypeOptionMenu,
-  Item(Item), ItemClass,
-  toItem, 
-  mkItem, unItem,
-  castToItem, gTypeItem,
-  MenuItem(MenuItem), MenuItemClass,
-  toMenuItem, 
-  mkMenuItem, unMenuItem,
-  castToMenuItem, gTypeMenuItem,
-  CheckMenuItem(CheckMenuItem), CheckMenuItemClass,
-  toCheckMenuItem, 
-  mkCheckMenuItem, unCheckMenuItem,
-  castToCheckMenuItem, gTypeCheckMenuItem,
-  RadioMenuItem(RadioMenuItem), RadioMenuItemClass,
-  toRadioMenuItem, 
-  mkRadioMenuItem, unRadioMenuItem,
-  castToRadioMenuItem, gTypeRadioMenuItem,
-  TearoffMenuItem(TearoffMenuItem), TearoffMenuItemClass,
-  toTearoffMenuItem, 
-  mkTearoffMenuItem, unTearoffMenuItem,
-  castToTearoffMenuItem, gTypeTearoffMenuItem,
-  ImageMenuItem(ImageMenuItem), ImageMenuItemClass,
-  toImageMenuItem, 
-  mkImageMenuItem, unImageMenuItem,
-  castToImageMenuItem, gTypeImageMenuItem,
-  SeparatorMenuItem(SeparatorMenuItem), SeparatorMenuItemClass,
-  toSeparatorMenuItem, 
-  mkSeparatorMenuItem, unSeparatorMenuItem,
-  castToSeparatorMenuItem, gTypeSeparatorMenuItem,
-  ListItem(ListItem), ListItemClass,
-  toListItem, 
-  mkListItem, unListItem,
-  castToListItem, gTypeListItem,
-  Window(Window), WindowClass,
-  toWindow, 
-  mkWindow, unWindow,
-  castToWindow, gTypeWindow,
-  Assistant(Assistant), AssistantClass,
-  toAssistant, 
-  mkAssistant, unAssistant,
-  castToAssistant, gTypeAssistant,
-  OffscreenWindow(OffscreenWindow), OffscreenWindowClass,
-  toOffscreenWindow, 
-  mkOffscreenWindow, unOffscreenWindow,
-  castToOffscreenWindow, gTypeOffscreenWindow,
-  Dialog(Dialog), DialogClass,
-  toDialog, 
-  mkDialog, unDialog,
-  castToDialog, gTypeDialog,
-  AboutDialog(AboutDialog), AboutDialogClass,
-  toAboutDialog, 
-  mkAboutDialog, unAboutDialog,
-  castToAboutDialog, gTypeAboutDialog,
-  ColorSelectionDialog(ColorSelectionDialog), ColorSelectionDialogClass,
-  toColorSelectionDialog, 
-  mkColorSelectionDialog, unColorSelectionDialog,
-  castToColorSelectionDialog, gTypeColorSelectionDialog,
-  FileSelection(FileSelection), FileSelectionClass,
-  toFileSelection, 
-  mkFileSelection, unFileSelection,
-  castToFileSelection, gTypeFileSelection,
-  FileChooserDialog(FileChooserDialog), FileChooserDialogClass,
-  toFileChooserDialog, 
-  mkFileChooserDialog, unFileChooserDialog,
-  castToFileChooserDialog, gTypeFileChooserDialog,
-  FontSelectionDialog(FontSelectionDialog), FontSelectionDialogClass,
-  toFontSelectionDialog, 
-  mkFontSelectionDialog, unFontSelectionDialog,
-  castToFontSelectionDialog, gTypeFontSelectionDialog,
-  InputDialog(InputDialog), InputDialogClass,
-  toInputDialog, 
-  mkInputDialog, unInputDialog,
-  castToInputDialog, gTypeInputDialog,
-  MessageDialog(MessageDialog), MessageDialogClass,
-  toMessageDialog, 
-  mkMessageDialog, unMessageDialog,
-  castToMessageDialog, gTypeMessageDialog,
-  Plug(Plug), PlugClass,
-  toPlug, 
-  mkPlug, unPlug,
-  castToPlug, gTypePlug,
-  EventBox(EventBox), EventBoxClass,
-  toEventBox, 
-  mkEventBox, unEventBox,
-  castToEventBox, gTypeEventBox,
-  HandleBox(HandleBox), HandleBoxClass,
-  toHandleBox, 
-  mkHandleBox, unHandleBox,
-  castToHandleBox, gTypeHandleBox,
-  ScrolledWindow(ScrolledWindow), ScrolledWindowClass,
-  toScrolledWindow, 
-  mkScrolledWindow, unScrolledWindow,
-  castToScrolledWindow, gTypeScrolledWindow,
-  Viewport(Viewport), ViewportClass,
-  toViewport, 
-  mkViewport, unViewport,
-  castToViewport, gTypeViewport,
-  Expander(Expander), ExpanderClass,
-  toExpander, 
-  mkExpander, unExpander,
-  castToExpander, gTypeExpander,
-  ComboBox(ComboBox), ComboBoxClass,
-  toComboBox, 
-  mkComboBox, unComboBox,
-  castToComboBox, gTypeComboBox,
-  ComboBoxEntry(ComboBoxEntry), ComboBoxEntryClass,
-  toComboBoxEntry, 
-  mkComboBoxEntry, unComboBoxEntry,
-  castToComboBoxEntry, gTypeComboBoxEntry,
-  ToolItem(ToolItem), ToolItemClass,
-  toToolItem, 
-  mkToolItem, unToolItem,
-  castToToolItem, gTypeToolItem,
-  ToolButton(ToolButton), ToolButtonClass,
-  toToolButton, 
-  mkToolButton, unToolButton,
-  castToToolButton, gTypeToolButton,
-  MenuToolButton(MenuToolButton), MenuToolButtonClass,
-  toMenuToolButton, 
-  mkMenuToolButton, unMenuToolButton,
-  castToMenuToolButton, gTypeMenuToolButton,
-  ToggleToolButton(ToggleToolButton), ToggleToolButtonClass,
-  toToggleToolButton, 
-  mkToggleToolButton, unToggleToolButton,
-  castToToggleToolButton, gTypeToggleToolButton,
-  RadioToolButton(RadioToolButton), RadioToolButtonClass,
-  toRadioToolButton, 
-  mkRadioToolButton, unRadioToolButton,
-  castToRadioToolButton, gTypeRadioToolButton,
-  SeparatorToolItem(SeparatorToolItem), SeparatorToolItemClass,
-  toSeparatorToolItem, 
-  mkSeparatorToolItem, unSeparatorToolItem,
-  castToSeparatorToolItem, gTypeSeparatorToolItem,
-  Box(Box), BoxClass,
-  toBox, 
-  mkBox, unBox,
-  castToBox, gTypeBox,
-  ButtonBox(ButtonBox), ButtonBoxClass,
-  toButtonBox, 
-  mkButtonBox, unButtonBox,
-  castToButtonBox, gTypeButtonBox,
-  HButtonBox(HButtonBox), HButtonBoxClass,
-  toHButtonBox, 
-  mkHButtonBox, unHButtonBox,
-  castToHButtonBox, gTypeHButtonBox,
-  VButtonBox(VButtonBox), VButtonBoxClass,
-  toVButtonBox, 
-  mkVButtonBox, unVButtonBox,
-  castToVButtonBox, gTypeVButtonBox,
-  VBox(VBox), VBoxClass,
-  toVBox, 
-  mkVBox, unVBox,
-  castToVBox, gTypeVBox,
-  RecentChooserWidget(RecentChooserWidget), RecentChooserWidgetClass,
-  toRecentChooserWidget, 
-  mkRecentChooserWidget, unRecentChooserWidget,
-  castToRecentChooserWidget, gTypeRecentChooserWidget,
-  ColorSelection(ColorSelection), ColorSelectionClass,
-  toColorSelection, 
-  mkColorSelection, unColorSelection,
-  castToColorSelection, gTypeColorSelection,
-  FontSelection(FontSelection), FontSelectionClass,
-  toFontSelection, 
-  mkFontSelection, unFontSelection,
-  castToFontSelection, gTypeFontSelection,
-  FileChooserWidget(FileChooserWidget), FileChooserWidgetClass,
-  toFileChooserWidget, 
-  mkFileChooserWidget, unFileChooserWidget,
-  castToFileChooserWidget, gTypeFileChooserWidget,
-  HBox(HBox), HBoxClass,
-  toHBox, 
-  mkHBox, unHBox,
-  castToHBox, gTypeHBox,
-  InfoBar(InfoBar), InfoBarClass,
-  toInfoBar, 
-  mkInfoBar, unInfoBar,
-  castToInfoBar, gTypeInfoBar,
-  Combo(Combo), ComboClass,
-  toCombo, 
-  mkCombo, unCombo,
-  castToCombo, gTypeCombo,
-  FileChooserButton(FileChooserButton), FileChooserButtonClass,
-  toFileChooserButton, 
-  mkFileChooserButton, unFileChooserButton,
-  castToFileChooserButton, gTypeFileChooserButton,
-  Statusbar(Statusbar), StatusbarClass,
-  toStatusbar, 
-  mkStatusbar, unStatusbar,
-  castToStatusbar, gTypeStatusbar,
-  CList(CList), CListClass,
-  toCList, 
-  mkCList, unCList,
-  castToCList, gTypeCList,
-  CTree(CTree), CTreeClass,
-  toCTree, 
-  mkCTree, unCTree,
-  castToCTree, gTypeCTree,
-  Fixed(Fixed), FixedClass,
-  toFixed, 
-  mkFixed, unFixed,
-  castToFixed, gTypeFixed,
-  Paned(Paned), PanedClass,
-  toPaned, 
-  mkPaned, unPaned,
-  castToPaned, gTypePaned,
-  HPaned(HPaned), HPanedClass,
-  toHPaned, 
-  mkHPaned, unHPaned,
-  castToHPaned, gTypeHPaned,
-  VPaned(VPaned), VPanedClass,
-  toVPaned, 
-  mkVPaned, unVPaned,
-  castToVPaned, gTypeVPaned,
-  IconView(IconView), IconViewClass,
-  toIconView, 
-  mkIconView, unIconView,
-  castToIconView, gTypeIconView,
-  Layout(Layout), LayoutClass,
-  toLayout, 
-  mkLayout, unLayout,
-  castToLayout, gTypeLayout,
-  List(List), ListClass,
-  toList, 
-  mkList, unList,
-  castToList, gTypeList,
-  MenuShell(MenuShell), MenuShellClass,
-  toMenuShell, 
-  mkMenuShell, unMenuShell,
-  castToMenuShell, gTypeMenuShell,
-  Menu(Menu), MenuClass,
-  toMenu, 
-  mkMenu, unMenu,
-  castToMenu, gTypeMenu,
-  RecentChooserMenu(RecentChooserMenu), RecentChooserMenuClass,
-  toRecentChooserMenu, 
-  mkRecentChooserMenu, unRecentChooserMenu,
-  castToRecentChooserMenu, gTypeRecentChooserMenu,
-  MenuBar(MenuBar), MenuBarClass,
-  toMenuBar, 
-  mkMenuBar, unMenuBar,
-  castToMenuBar, gTypeMenuBar,
-  Notebook(Notebook), NotebookClass,
-  toNotebook, 
-  mkNotebook, unNotebook,
-  castToNotebook, gTypeNotebook,
-  Socket(Socket), SocketClass,
-  toSocket, 
-  mkSocket, unSocket,
-  castToSocket, gTypeSocket,
-  Table(Table), TableClass,
-  toTable, 
-  mkTable, unTable,
-  castToTable, gTypeTable,
-  TextView(TextView), TextViewClass,
-  toTextView, 
-  mkTextView, unTextView,
-  castToTextView, gTypeTextView,
-  Toolbar(Toolbar), ToolbarClass,
-  toToolbar, 
-  mkToolbar, unToolbar,
-  castToToolbar, gTypeToolbar,
-  TreeView(TreeView), TreeViewClass,
-  toTreeView, 
-  mkTreeView, unTreeView,
-  castToTreeView, gTypeTreeView,
-  Calendar(Calendar), CalendarClass,
-  toCalendar, 
-  mkCalendar, unCalendar,
-  castToCalendar, gTypeCalendar,
-  CellView(CellView), CellViewClass,
-  toCellView, 
-  mkCellView, unCellView,
-  castToCellView, gTypeCellView,
-  DrawingArea(DrawingArea), DrawingAreaClass,
-  toDrawingArea, 
-  mkDrawingArea, unDrawingArea,
-  castToDrawingArea, gTypeDrawingArea,
-  Spinner(Spinner), SpinnerClass,
-  toSpinner, 
-  mkSpinner, unSpinner,
-  castToSpinner, gTypeSpinner,
-  Entry(Entry), EntryClass,
-  toEntry, 
-  mkEntry, unEntry,
-  castToEntry, gTypeEntry,
-  SpinButton(SpinButton), SpinButtonClass,
-  toSpinButton, 
-  mkSpinButton, unSpinButton,
-  castToSpinButton, gTypeSpinButton,
-  Ruler(Ruler), RulerClass,
-  toRuler, 
-  mkRuler, unRuler,
-  castToRuler, gTypeRuler,
-  HRuler(HRuler), HRulerClass,
-  toHRuler, 
-  mkHRuler, unHRuler,
-  castToHRuler, gTypeHRuler,
-  VRuler(VRuler), VRulerClass,
-  toVRuler, 
-  mkVRuler, unVRuler,
-  castToVRuler, gTypeVRuler,
-  Range(Range), RangeClass,
-  toRange, 
-  mkRange, unRange,
-  castToRange, gTypeRange,
-  Scale(Scale), ScaleClass,
-  toScale, 
-  mkScale, unScale,
-  castToScale, gTypeScale,
-  HScale(HScale), HScaleClass,
-  toHScale, 
-  mkHScale, unHScale,
-  castToHScale, gTypeHScale,
-  VScale(VScale), VScaleClass,
-  toVScale, 
-  mkVScale, unVScale,
-  castToVScale, gTypeVScale,
-  Scrollbar(Scrollbar), ScrollbarClass,
-  toScrollbar, 
-  mkScrollbar, unScrollbar,
-  castToScrollbar, gTypeScrollbar,
-  HScrollbar(HScrollbar), HScrollbarClass,
-  toHScrollbar, 
-  mkHScrollbar, unHScrollbar,
-  castToHScrollbar, gTypeHScrollbar,
-  VScrollbar(VScrollbar), VScrollbarClass,
-  toVScrollbar, 
-  mkVScrollbar, unVScrollbar,
-  castToVScrollbar, gTypeVScrollbar,
-  Separator(Separator), SeparatorClass,
-  toSeparator, 
-  mkSeparator, unSeparator,
-  castToSeparator, gTypeSeparator,
-  HSeparator(HSeparator), HSeparatorClass,
-  toHSeparator, 
-  mkHSeparator, unHSeparator,
-  castToHSeparator, gTypeHSeparator,
-  VSeparator(VSeparator), VSeparatorClass,
-  toVSeparator, 
-  mkVSeparator, unVSeparator,
-  castToVSeparator, gTypeVSeparator,
-  Invisible(Invisible), InvisibleClass,
-  toInvisible, 
-  mkInvisible, unInvisible,
-  castToInvisible, gTypeInvisible,
-  Preview(Preview), PreviewClass,
-  toPreview, 
-  mkPreview, unPreview,
-  castToPreview, gTypePreview,
-  ProgressBar(ProgressBar), ProgressBarClass,
-  toProgressBar, 
-  mkProgressBar, unProgressBar,
-  castToProgressBar, gTypeProgressBar,
-  Adjustment(Adjustment), AdjustmentClass,
-  toAdjustment, 
-  mkAdjustment, unAdjustment,
-  castToAdjustment, gTypeAdjustment,
-  IMContext(IMContext), IMContextClass,
-  toIMContext, 
-  mkIMContext, unIMContext,
-  castToIMContext, gTypeIMContext,
-  IMMulticontext(IMMulticontext), IMMulticontextClass,
-  toIMMulticontext, 
-  mkIMMulticontext, unIMMulticontext,
-  castToIMMulticontext, gTypeIMMulticontext,
-  IMContextSimple(IMContextSimple), IMContextSimpleClass,
-  toIMContextSimple, 
-  mkIMContextSimple, unIMContextSimple,
-  castToIMContextSimple, gTypeIMContextSimple,
-  ItemFactory(ItemFactory), ItemFactoryClass,
-  toItemFactory, 
-  mkItemFactory, unItemFactory,
-  castToItemFactory, gTypeItemFactory,
-  Tooltips(Tooltips), TooltipsClass,
-  toTooltips, 
-  mkTooltips, unTooltips,
-  castToTooltips, gTypeTooltips,
-  TreeViewColumn(TreeViewColumn), TreeViewColumnClass,
-  toTreeViewColumn, 
-  mkTreeViewColumn, unTreeViewColumn,
-  castToTreeViewColumn, gTypeTreeViewColumn,
-  CellRenderer(CellRenderer), CellRendererClass,
-  toCellRenderer, 
-  mkCellRenderer, unCellRenderer,
-  castToCellRenderer, gTypeCellRenderer,
-  CellRendererSpinner(CellRendererSpinner), CellRendererSpinnerClass,
-  toCellRendererSpinner, 
-  mkCellRendererSpinner, unCellRendererSpinner,
-  castToCellRendererSpinner, gTypeCellRendererSpinner,
-  CellRendererPixbuf(CellRendererPixbuf), CellRendererPixbufClass,
-  toCellRendererPixbuf, 
-  mkCellRendererPixbuf, unCellRendererPixbuf,
-  castToCellRendererPixbuf, gTypeCellRendererPixbuf,
-  CellRendererText(CellRendererText), CellRendererTextClass,
-  toCellRendererText, 
-  mkCellRendererText, unCellRendererText,
-  castToCellRendererText, gTypeCellRendererText,
-  CellRendererAccel(CellRendererAccel), CellRendererAccelClass,
-  toCellRendererAccel, 
-  mkCellRendererAccel, unCellRendererAccel,
-  castToCellRendererAccel, gTypeCellRendererAccel,
-  CellRendererSpin(CellRendererSpin), CellRendererSpinClass,
-  toCellRendererSpin, 
-  mkCellRendererSpin, unCellRendererSpin,
-  castToCellRendererSpin, gTypeCellRendererSpin,
-  CellRendererCombo(CellRendererCombo), CellRendererComboClass,
-  toCellRendererCombo, 
-  mkCellRendererCombo, unCellRendererCombo,
-  castToCellRendererCombo, gTypeCellRendererCombo,
-  CellRendererToggle(CellRendererToggle), CellRendererToggleClass,
-  toCellRendererToggle, 
-  mkCellRendererToggle, unCellRendererToggle,
-  castToCellRendererToggle, gTypeCellRendererToggle,
-  CellRendererProgress(CellRendererProgress), CellRendererProgressClass,
-  toCellRendererProgress, 
-  mkCellRendererProgress, unCellRendererProgress,
-  castToCellRendererProgress, gTypeCellRendererProgress,
-  FileFilter(FileFilter), FileFilterClass,
-  toFileFilter, 
-  mkFileFilter, unFileFilter,
-  castToFileFilter, gTypeFileFilter,
-  Builder(Builder), BuilderClass,
-  toBuilder, 
-  mkBuilder, unBuilder,
-  castToBuilder, gTypeBuilder,
-  CellLayout(CellLayout), CellLayoutClass,
-  toCellLayout, 
-  mkCellLayout, unCellLayout,
-  castToCellLayout, gTypeCellLayout,
-  TreeSortable(TreeSortable), TreeSortableClass,
-  toTreeSortable, 
-  mkTreeSortable, unTreeSortable,
-  castToTreeSortable, gTypeTreeSortable,
-  Tooltip(Tooltip), TooltipClass,
-  toTooltip, 
-  mkTooltip, unTooltip,
-  castToTooltip, gTypeTooltip,
-  StatusIcon(StatusIcon), StatusIconClass,
-  toStatusIcon, 
-  mkStatusIcon, unStatusIcon,
-  castToStatusIcon, gTypeStatusIcon,
-  TreeSelection(TreeSelection), TreeSelectionClass,
-  toTreeSelection, 
-  mkTreeSelection, unTreeSelection,
-  castToTreeSelection, gTypeTreeSelection,
-  TreeModel(TreeModel), TreeModelClass,
-  toTreeModel, 
-  mkTreeModel, unTreeModel,
-  castToTreeModel, gTypeTreeModel,
-  TreeStore(TreeStore), TreeStoreClass,
-  toTreeStore, 
-  mkTreeStore, unTreeStore,
-  castToTreeStore, gTypeTreeStore,
-  ListStore(ListStore), ListStoreClass,
-  toListStore, 
-  mkListStore, unListStore,
-  castToListStore, gTypeListStore,
-  TreeModelSort(TreeModelSort), TreeModelSortClass,
-  toTreeModelSort, 
-  mkTreeModelSort, unTreeModelSort,
-  castToTreeModelSort, gTypeTreeModelSort,
-  TreeModelFilter(TreeModelFilter), TreeModelFilterClass,
-  toTreeModelFilter, 
-  mkTreeModelFilter, unTreeModelFilter,
-  castToTreeModelFilter, gTypeTreeModelFilter,
-  IconFactory(IconFactory), IconFactoryClass,
-  toIconFactory, 
-  mkIconFactory, unIconFactory,
-  castToIconFactory, gTypeIconFactory,
-  IconTheme(IconTheme), IconThemeClass,
-  toIconTheme, 
-  mkIconTheme, unIconTheme,
-  castToIconTheme, gTypeIconTheme,
-  SizeGroup(SizeGroup), SizeGroupClass,
-  toSizeGroup, 
-  mkSizeGroup, unSizeGroup,
-  castToSizeGroup, gTypeSizeGroup,
-  Clipboard(Clipboard), ClipboardClass,
-  toClipboard, 
-  mkClipboard, unClipboard,
-  castToClipboard, gTypeClipboard,
-  AccelGroup(AccelGroup), AccelGroupClass,
-  toAccelGroup, 
-  mkAccelGroup, unAccelGroup,
-  castToAccelGroup, gTypeAccelGroup,
-  AccelMap(AccelMap), AccelMapClass,
-  toAccelMap, 
-  mkAccelMap, unAccelMap,
-  castToAccelMap, gTypeAccelMap,
-  EntryCompletion(EntryCompletion), EntryCompletionClass,
-  toEntryCompletion, 
-  mkEntryCompletion, unEntryCompletion,
-  castToEntryCompletion, gTypeEntryCompletion,
-  EntryBuffer(EntryBuffer), EntryBufferClass,
-  toEntryBuffer, 
-  mkEntryBuffer, unEntryBuffer,
-  castToEntryBuffer, gTypeEntryBuffer,
-  Action(Action), ActionClass,
-  toAction, 
-  mkAction, unAction,
-  castToAction, gTypeAction,
-  RecentAction(RecentAction), RecentActionClass,
-  toRecentAction, 
-  mkRecentAction, unRecentAction,
-  castToRecentAction, gTypeRecentAction,
-  ToggleAction(ToggleAction), ToggleActionClass,
-  toToggleAction, 
-  mkToggleAction, unToggleAction,
-  castToToggleAction, gTypeToggleAction,
-  RadioAction(RadioAction), RadioActionClass,
-  toRadioAction, 
-  mkRadioAction, unRadioAction,
-  castToRadioAction, gTypeRadioAction,
-  ActionGroup(ActionGroup), ActionGroupClass,
-  toActionGroup, 
-  mkActionGroup, unActionGroup,
-  castToActionGroup, gTypeActionGroup,
-  UIManager(UIManager), UIManagerClass,
-  toUIManager, 
-  mkUIManager, unUIManager,
-  castToUIManager, gTypeUIManager,
-  WindowGroup(WindowGroup), WindowGroupClass,
-  toWindowGroup, 
-  mkWindowGroup, unWindowGroup,
-  castToWindowGroup, gTypeWindowGroup,
-  CellEditable(CellEditable), CellEditableClass,
-  toCellEditable, 
-  mkCellEditable, unCellEditable,
-  castToCellEditable, gTypeCellEditable,
-  Editable(Editable), EditableClass,
-  toEditable, 
-  mkEditable, unEditable,
-  castToEditable, gTypeEditable,
-  FileChooser(FileChooser), FileChooserClass,
-  toFileChooser, 
-  mkFileChooser, unFileChooser,
-  castToFileChooser, gTypeFileChooser,
-  GC(GC), GCClass,
-  toGC, 
-  mkGC, unGC,
-  castToGC, gTypeGC
-  ) where
-
-import Foreign.ForeignPtr (ForeignPtr, castForeignPtr, unsafeForeignPtrToPtr)
-import Foreign.C.Types    (CULong(..), CUInt(..))
-import System.Glib.GType  (GType, typeInstanceIsA)
-{#import System.Glib.GObject#}
-import Graphics.UI.Gtk.General.Threading
-
-{# context lib="gtk" prefix="gtk" #}
-
--- The usage of foreignPtrToPtr should be safe as the evaluation will only be
--- forced if the object is used afterwards
---
-castTo :: (GObjectClass obj, GObjectClass obj') => GType -> String
-                                                -> (obj -> obj')
-castTo gtype objTypeName obj =
-  case toGObject obj of
-    gobj@(GObject objFPtr)
-      | typeInstanceIsA ((unsafeForeignPtrToPtr.castForeignPtr) objFPtr) gtype
-                  -> unsafeCastGObject gobj
-      | otherwise -> error $ "Cannot cast object to " ++ objTypeName
-
-
--- ****************************************************************** AtkObject
-
-{#pointer *AtkObject foreign newtype #} deriving (Eq,Ord)
-
-mkAtkObject = (AtkObject, objectUnrefFromMainloop)
-unAtkObject (AtkObject o) = o
-
-class GObjectClass o => AtkObjectClass o
-toAtkObject :: AtkObjectClass o => o -> AtkObject
-toAtkObject = unsafeCastGObject . toGObject
-
-instance AtkObjectClass AtkObject
-instance GObjectClass AtkObject where
-  toGObject = GObject . castForeignPtr . unAtkObject
-  unsafeCastGObject = AtkObject . castForeignPtr . unGObject
-
-castToAtkObject :: GObjectClass obj => obj -> AtkObject
-castToAtkObject = castTo gTypeAtkObject "AtkObject"
-
-gTypeAtkObject :: GType
-gTypeAtkObject =
-  {# call fun unsafe atk_object_get_type #}
-
--- ***************************************************************** Accessible
-
-{#pointer *Accessible foreign newtype #} deriving (Eq,Ord)
-
-mkAccessible = (Accessible, objectUnrefFromMainloop)
-unAccessible (Accessible o) = o
-
-class AtkObjectClass o => AccessibleClass o
-toAccessible :: AccessibleClass o => o -> Accessible
-toAccessible = unsafeCastGObject . toGObject
-
-instance AccessibleClass Accessible
-instance AtkObjectClass Accessible
-instance GObjectClass Accessible where
-  toGObject = GObject . castForeignPtr . unAccessible
-  unsafeCastGObject = Accessible . castForeignPtr . unGObject
-
-castToAccessible :: GObjectClass obj => obj -> Accessible
-castToAccessible = castTo gTypeAccessible "Accessible"
-
-gTypeAccessible :: GType
-gTypeAccessible =
-  {# call fun unsafe gtk_accessible_get_type #}
-
--- ********************************************************************* Keymap
-
-{#pointer *GdkKeymap as Keymap foreign newtype #} deriving (Eq,Ord)
-
-mkKeymap = (Keymap, objectUnrefFromMainloop)
-unKeymap (Keymap o) = o
-
-class GObjectClass o => KeymapClass o
-toKeymap :: KeymapClass o => o -> Keymap
-toKeymap = unsafeCastGObject . toGObject
-
-instance KeymapClass Keymap
-instance GObjectClass Keymap where
-  toGObject = GObject . castForeignPtr . unKeymap
-  unsafeCastGObject = Keymap . castForeignPtr . unGObject
-
-castToKeymap :: GObjectClass obj => obj -> Keymap
-castToKeymap = castTo gTypeKeymap "Keymap"
-
-gTypeKeymap :: GType
-gTypeKeymap =
-  {# call fun unsafe gdk_keymap_get_type #}
-
--- ************************************************************* DisplayManager
-
-{#pointer *GdkDisplayManager as DisplayManager foreign newtype #} deriving (Eq,Ord)
-
-mkDisplayManager = (DisplayManager, objectUnrefFromMainloop)
-unDisplayManager (DisplayManager o) = o
-
-class GObjectClass o => DisplayManagerClass o
-toDisplayManager :: DisplayManagerClass o => o -> DisplayManager
-toDisplayManager = unsafeCastGObject . toGObject
-
-instance DisplayManagerClass DisplayManager
-instance GObjectClass DisplayManager where
-  toGObject = GObject . castForeignPtr . unDisplayManager
-  unsafeCastGObject = DisplayManager . castForeignPtr . unGObject
-
-castToDisplayManager :: GObjectClass obj => obj -> DisplayManager
-castToDisplayManager = castTo gTypeDisplayManager "DisplayManager"
-
-gTypeDisplayManager :: GType
-gTypeDisplayManager =
-  {# call fun unsafe gdk_display_manager_get_type #}
-
--- *********************************************************** AppLaunchContext
-
-{#pointer *GdkAppLaunchContext as AppLaunchContext foreign newtype #} deriving (Eq,Ord)
-
-mkAppLaunchContext = (AppLaunchContext, objectUnrefFromMainloop)
-unAppLaunchContext (AppLaunchContext o) = o
-
-class GObjectClass o => AppLaunchContextClass o
-toAppLaunchContext :: AppLaunchContextClass o => o -> AppLaunchContext
-toAppLaunchContext = unsafeCastGObject . toGObject
-
-instance AppLaunchContextClass AppLaunchContext
-instance GObjectClass AppLaunchContext where
-  toGObject = GObject . castForeignPtr . unAppLaunchContext
-  unsafeCastGObject = AppLaunchContext . castForeignPtr . unGObject
-
-castToAppLaunchContext :: GObjectClass obj => obj -> AppLaunchContext
-castToAppLaunchContext = castTo gTypeAppLaunchContext "AppLaunchContext"
-
-gTypeAppLaunchContext :: GType
-gTypeAppLaunchContext =
-  {# call fun unsafe gdk_app_launch_context_get_type #}
-
--- ************************************************************** PrintSettings
-
-{#pointer *PrintSettings foreign newtype #} deriving (Eq,Ord)
-
-mkPrintSettings = (PrintSettings, objectUnrefFromMainloop)
-unPrintSettings (PrintSettings o) = o
-
-class GObjectClass o => PrintSettingsClass o
-toPrintSettings :: PrintSettingsClass o => o -> PrintSettings
-toPrintSettings = unsafeCastGObject . toGObject
-
-instance PrintSettingsClass PrintSettings
-instance GObjectClass PrintSettings where
-  toGObject = GObject . castForeignPtr . unPrintSettings
-  unsafeCastGObject = PrintSettings . castForeignPtr . unGObject
-
-castToPrintSettings :: GObjectClass obj => obj -> PrintSettings
-castToPrintSettings = castTo gTypePrintSettings "PrintSettings"
-
-gTypePrintSettings :: GType
-gTypePrintSettings =
-  {# call fun unsafe gtk_print_settings_get_type #}
-
--- ************************************************************* PrintOperation
-
-{#pointer *PrintOperation foreign newtype #} deriving (Eq,Ord)
-
-mkPrintOperation = (PrintOperation, objectUnrefFromMainloop)
-unPrintOperation (PrintOperation o) = o
-
-class GObjectClass o => PrintOperationClass o
-toPrintOperation :: PrintOperationClass o => o -> PrintOperation
-toPrintOperation = unsafeCastGObject . toGObject
-
-instance PrintOperationClass PrintOperation
-instance GObjectClass PrintOperation where
-  toGObject = GObject . castForeignPtr . unPrintOperation
-  unsafeCastGObject = PrintOperation . castForeignPtr . unGObject
-
-castToPrintOperation :: GObjectClass obj => obj -> PrintOperation
-castToPrintOperation = castTo gTypePrintOperation "PrintOperation"
-
-gTypePrintOperation :: GType
-gTypePrintOperation =
-  {# call fun unsafe gtk_print_operation_get_type #}
-
--- ****************************************************** PrintOperationPreview
-
-{#pointer *PrintOperationPreview foreign newtype #} deriving (Eq,Ord)
-
-mkPrintOperationPreview = (PrintOperationPreview, objectUnrefFromMainloop)
-unPrintOperationPreview (PrintOperationPreview o) = o
-
-class GObjectClass o => PrintOperationPreviewClass o
-toPrintOperationPreview :: PrintOperationPreviewClass o => o -> PrintOperationPreview
-toPrintOperationPreview = unsafeCastGObject . toGObject
-
-instance PrintOperationPreviewClass PrintOperationPreview
-instance GObjectClass PrintOperationPreview where
-  toGObject = GObject . castForeignPtr . unPrintOperationPreview
-  unsafeCastGObject = PrintOperationPreview . castForeignPtr . unGObject
-
-castToPrintOperationPreview :: GObjectClass obj => obj -> PrintOperationPreview
-castToPrintOperationPreview = castTo gTypePrintOperationPreview "PrintOperationPreview"
-
-gTypePrintOperationPreview :: GType
-gTypePrintOperationPreview =
-  {# call fun unsafe gtk_print_operation_preview_get_type #}
-
--- ****************************************************************** PageSetup
-
-{#pointer *PageSetup foreign newtype #} deriving (Eq,Ord)
-
-mkPageSetup = (PageSetup, objectUnrefFromMainloop)
-unPageSetup (PageSetup o) = o
-
-class GObjectClass o => PageSetupClass o
-toPageSetup :: PageSetupClass o => o -> PageSetup
-toPageSetup = unsafeCastGObject . toGObject
-
-instance PageSetupClass PageSetup
-instance GObjectClass PageSetup where
-  toGObject = GObject . castForeignPtr . unPageSetup
-  unsafeCastGObject = PageSetup . castForeignPtr . unGObject
-
-castToPageSetup :: GObjectClass obj => obj -> PageSetup
-castToPageSetup = castTo gTypePageSetup "PageSetup"
-
-gTypePageSetup :: GType
-gTypePageSetup =
-  {# call fun unsafe gtk_page_setup_get_type #}
-
--- *************************************************************** PrintContext
-
-{#pointer *PrintContext foreign newtype #} deriving (Eq,Ord)
-
-mkPrintContext = (PrintContext, objectUnrefFromMainloop)
-unPrintContext (PrintContext o) = o
-
-class GObjectClass o => PrintContextClass o
-toPrintContext :: PrintContextClass o => o -> PrintContext
-toPrintContext = unsafeCastGObject . toGObject
-
-instance PrintContextClass PrintContext
-instance GObjectClass PrintContext where
-  toGObject = GObject . castForeignPtr . unPrintContext
-  unsafeCastGObject = PrintContext . castForeignPtr . unGObject
-
-castToPrintContext :: GObjectClass obj => obj -> PrintContext
-castToPrintContext = castTo gTypePrintContext "PrintContext"
-
-gTypePrintContext :: GType
-gTypePrintContext =
-  {# call fun unsafe gtk_print_context_get_type #}
-
--- ************************************************************** RecentChooser
-
-{#pointer *RecentChooser foreign newtype #} deriving (Eq,Ord)
-
-mkRecentChooser = (RecentChooser, objectUnrefFromMainloop)
-unRecentChooser (RecentChooser o) = o
-
-class GObjectClass o => RecentChooserClass o
-toRecentChooser :: RecentChooserClass o => o -> RecentChooser
-toRecentChooser = unsafeCastGObject . toGObject
-
-instance RecentChooserClass RecentChooser
-instance GObjectClass RecentChooser where
-  toGObject = GObject . castForeignPtr . unRecentChooser
-  unsafeCastGObject = RecentChooser . castForeignPtr . unGObject
-
-castToRecentChooser :: GObjectClass obj => obj -> RecentChooser
-castToRecentChooser = castTo gTypeRecentChooser "RecentChooser"
-
-gTypeRecentChooser :: GType
-gTypeRecentChooser =
-  {# call fun unsafe gtk_recent_chooser_get_type #}
-
--- ************************************************************** RecentManager
-
-{#pointer *RecentManager foreign newtype #} deriving (Eq,Ord)
-
-mkRecentManager = (RecentManager, objectUnrefFromMainloop)
-unRecentManager (RecentManager o) = o
-
-class GObjectClass o => RecentManagerClass o
-toRecentManager :: RecentManagerClass o => o -> RecentManager
-toRecentManager = unsafeCastGObject . toGObject
-
-instance RecentManagerClass RecentManager
-instance GObjectClass RecentManager where
-  toGObject = GObject . castForeignPtr . unRecentManager
-  unsafeCastGObject = RecentManager . castForeignPtr . unGObject
-
-castToRecentManager :: GObjectClass obj => obj -> RecentManager
-castToRecentManager = castTo gTypeRecentManager "RecentManager"
-
-gTypeRecentManager :: GType
-gTypeRecentManager =
-  {# call fun unsafe gtk_recent_manager_get_type #}
-
--- ******************************************************************* Drawable
-
-{#pointer *GdkDrawable as Drawable foreign newtype #} deriving (Eq,Ord)
-
-mkDrawable = (Drawable, objectUnrefFromMainloop)
-unDrawable (Drawable o) = o
-
-class GObjectClass o => DrawableClass o
-toDrawable :: DrawableClass o => o -> Drawable
-toDrawable = unsafeCastGObject . toGObject
-
-instance DrawableClass Drawable
-instance GObjectClass Drawable where
-  toGObject = GObject . castForeignPtr . unDrawable
-  unsafeCastGObject = Drawable . castForeignPtr . unGObject
-
-castToDrawable :: GObjectClass obj => obj -> Drawable
-castToDrawable = castTo gTypeDrawable "Drawable"
-
-gTypeDrawable :: GType
-gTypeDrawable =
-  {# call fun unsafe gdk_drawable_get_type #}
-
--- ***************************************************************** DrawWindow
-
-{#pointer *GdkWindow as DrawWindow foreign newtype #} deriving (Eq,Ord)
-
-mkDrawWindow = (DrawWindow, objectUnrefFromMainloop)
-unDrawWindow (DrawWindow o) = o
-
-class DrawableClass o => DrawWindowClass o
-toDrawWindow :: DrawWindowClass o => o -> DrawWindow
-toDrawWindow = unsafeCastGObject . toGObject
-
-instance DrawWindowClass DrawWindow
-instance DrawableClass DrawWindow
-instance GObjectClass DrawWindow where
-  toGObject = GObject . castForeignPtr . unDrawWindow
-  unsafeCastGObject = DrawWindow . castForeignPtr . unGObject
-
-castToDrawWindow :: GObjectClass obj => obj -> DrawWindow
-castToDrawWindow = castTo gTypeDrawWindow "DrawWindow"
-
-gTypeDrawWindow :: GType
-gTypeDrawWindow =
-  {# call fun unsafe gdk_window_object_get_type #}
-
--- ********************************************************************* Pixmap
-
-{#pointer *GdkPixmap as Pixmap foreign newtype #} deriving (Eq,Ord)
-
-mkPixmap = (Pixmap, objectUnrefFromMainloop)
-unPixmap (Pixmap o) = o
-
-class DrawableClass o => PixmapClass o
-toPixmap :: PixmapClass o => o -> Pixmap
-toPixmap = unsafeCastGObject . toGObject
-
-instance PixmapClass Pixmap
-instance DrawableClass Pixmap
-instance GObjectClass Pixmap where
-  toGObject = GObject . castForeignPtr . unPixmap
-  unsafeCastGObject = Pixmap . castForeignPtr . unGObject
-
-castToPixmap :: GObjectClass obj => obj -> Pixmap
-castToPixmap = castTo gTypePixmap "Pixmap"
-
-gTypePixmap :: GType
-gTypePixmap =
-  {# call fun unsafe gdk_pixmap_get_type #}
-
--- ******************************************************************* Colormap
-
-{#pointer *GdkColormap as Colormap foreign newtype #} deriving (Eq,Ord)
-
-mkColormap = (Colormap, objectUnrefFromMainloop)
-unColormap (Colormap o) = o
-
-class GObjectClass o => ColormapClass o
-toColormap :: ColormapClass o => o -> Colormap
-toColormap = unsafeCastGObject . toGObject
-
-instance ColormapClass Colormap
-instance GObjectClass Colormap where
-  toGObject = GObject . castForeignPtr . unColormap
-  unsafeCastGObject = Colormap . castForeignPtr . unGObject
-
-castToColormap :: GObjectClass obj => obj -> Colormap
-castToColormap = castTo gTypeColormap "Colormap"
-
-gTypeColormap :: GType
-gTypeColormap =
-  {# call fun unsafe gdk_colormap_get_type #}
-
--- ********************************************************************* Screen
-
-{#pointer *GdkScreen as Screen foreign newtype #} deriving (Eq,Ord)
-
-mkScreen = (Screen, objectUnrefFromMainloop)
-unScreen (Screen o) = o
-
-class GObjectClass o => ScreenClass o
-toScreen :: ScreenClass o => o -> Screen
-toScreen = unsafeCastGObject . toGObject
-
-instance ScreenClass Screen
-instance GObjectClass Screen where
-  toGObject = GObject . castForeignPtr . unScreen
-  unsafeCastGObject = Screen . castForeignPtr . unGObject
-
-castToScreen :: GObjectClass obj => obj -> Screen
-castToScreen = castTo gTypeScreen "Screen"
-
-gTypeScreen :: GType
-gTypeScreen =
-  {# call fun unsafe gdk_screen_get_type #}
-
--- ******************************************************************** Display
-
-{#pointer *GdkDisplay as Display foreign newtype #} deriving (Eq,Ord)
-
-mkDisplay = (Display, objectUnrefFromMainloop)
-unDisplay (Display o) = o
-
-class GObjectClass o => DisplayClass o
-toDisplay :: DisplayClass o => o -> Display
-toDisplay = unsafeCastGObject . toGObject
-
-instance DisplayClass Display
-instance GObjectClass Display where
-  toGObject = GObject . castForeignPtr . unDisplay
-  unsafeCastGObject = Display . castForeignPtr . unGObject
-
-castToDisplay :: GObjectClass obj => obj -> Display
-castToDisplay = castTo gTypeDisplay "Display"
-
-gTypeDisplay :: GType
-gTypeDisplay =
-  {# call fun unsafe gdk_display_get_type #}
-
--- ********************************************************************* Visual
-
-{#pointer *GdkVisual as Visual foreign newtype #} deriving (Eq,Ord)
-
-mkVisual = (Visual, objectUnrefFromMainloop)
-unVisual (Visual o) = o
-
-class GObjectClass o => VisualClass o
-toVisual :: VisualClass o => o -> Visual
-toVisual = unsafeCastGObject . toGObject
-
-instance VisualClass Visual
-instance GObjectClass Visual where
-  toGObject = GObject . castForeignPtr . unVisual
-  unsafeCastGObject = Visual . castForeignPtr . unGObject
-
-castToVisual :: GObjectClass obj => obj -> Visual
-castToVisual = castTo gTypeVisual "Visual"
-
-gTypeVisual :: GType
-gTypeVisual =
-  {# call fun unsafe gdk_visual_get_type #}
-
--- ********************************************************************* Device
-
-{#pointer *GdkDevice as Device foreign newtype #} deriving (Eq,Ord)
-
-mkDevice = (Device, objectUnrefFromMainloop)
-unDevice (Device o) = o
-
-class GObjectClass o => DeviceClass o
-toDevice :: DeviceClass o => o -> Device
-toDevice = unsafeCastGObject . toGObject
-
-instance DeviceClass Device
-instance GObjectClass Device where
-  toGObject = GObject . castForeignPtr . unDevice
-  unsafeCastGObject = Device . castForeignPtr . unGObject
-
-castToDevice :: GObjectClass obj => obj -> Device
-castToDevice = castTo gTypeDevice "Device"
-
-gTypeDevice :: GType
-gTypeDevice =
-  {# call fun unsafe gdk_device_get_type #}
-
--- ******************************************************************* Settings
-
-{#pointer *Settings foreign newtype #} deriving (Eq,Ord)
-
-mkSettings = (Settings, objectUnrefFromMainloop)
-unSettings (Settings o) = o
-
-class GObjectClass o => SettingsClass o
-toSettings :: SettingsClass o => o -> Settings
-toSettings = unsafeCastGObject . toGObject
-
-instance SettingsClass Settings
-instance GObjectClass Settings where
-  toGObject = GObject . castForeignPtr . unSettings
-  unsafeCastGObject = Settings . castForeignPtr . unGObject
-
-castToSettings :: GObjectClass obj => obj -> Settings
-castToSettings = castTo gTypeSettings "Settings"
-
-gTypeSettings :: GType
-gTypeSettings =
-  {# call fun unsafe gtk_settings_get_type #}
-
--- ***************************************************************** TextBuffer
-
-{#pointer *TextBuffer foreign newtype #} deriving (Eq,Ord)
-
-mkTextBuffer = (TextBuffer, objectUnrefFromMainloop)
-unTextBuffer (TextBuffer o) = o
-
-class GObjectClass o => TextBufferClass o
-toTextBuffer :: TextBufferClass o => o -> TextBuffer
-toTextBuffer = unsafeCastGObject . toGObject
-
-instance TextBufferClass TextBuffer
-instance GObjectClass TextBuffer where
-  toGObject = GObject . castForeignPtr . unTextBuffer
-  unsafeCastGObject = TextBuffer . castForeignPtr . unGObject
-
-castToTextBuffer :: GObjectClass obj => obj -> TextBuffer
-castToTextBuffer = castTo gTypeTextBuffer "TextBuffer"
-
-gTypeTextBuffer :: GType
-gTypeTextBuffer =
-  {# call fun unsafe gtk_text_buffer_get_type #}
-
--- ******************************************************************** TextTag
-
-{#pointer *TextTag foreign newtype #} deriving (Eq,Ord)
-
-mkTextTag = (TextTag, objectUnrefFromMainloop)
-unTextTag (TextTag o) = o
-
-class GObjectClass o => TextTagClass o
-toTextTag :: TextTagClass o => o -> TextTag
-toTextTag = unsafeCastGObject . toGObject
-
-instance TextTagClass TextTag
-instance GObjectClass TextTag where
-  toGObject = GObject . castForeignPtr . unTextTag
-  unsafeCastGObject = TextTag . castForeignPtr . unGObject
-
-castToTextTag :: GObjectClass obj => obj -> TextTag
-castToTextTag = castTo gTypeTextTag "TextTag"
-
-gTypeTextTag :: GType
-gTypeTextTag =
-  {# call fun unsafe gtk_text_tag_get_type #}
-
--- *************************************************************** TextTagTable
-
-{#pointer *TextTagTable foreign newtype #} deriving (Eq,Ord)
-
-mkTextTagTable = (TextTagTable, objectUnrefFromMainloop)
-unTextTagTable (TextTagTable o) = o
-
-class GObjectClass o => TextTagTableClass o
-toTextTagTable :: TextTagTableClass o => o -> TextTagTable
-toTextTagTable = unsafeCastGObject . toGObject
-
-instance TextTagTableClass TextTagTable
-instance GObjectClass TextTagTable where
-  toGObject = GObject . castForeignPtr . unTextTagTable
-  unsafeCastGObject = TextTagTable . castForeignPtr . unGObject
-
-castToTextTagTable :: GObjectClass obj => obj -> TextTagTable
-castToTextTagTable = castTo gTypeTextTagTable "TextTagTable"
-
-gTypeTextTagTable :: GType
-gTypeTextTagTable =
-  {# call fun unsafe gtk_text_tag_table_get_type #}
-
--- ********************************************************************** Style
-
-{#pointer *Style foreign newtype #} deriving (Eq,Ord)
-
-mkStyle = (Style, objectUnrefFromMainloop)
-unStyle (Style o) = o
-
-class GObjectClass o => StyleClass o
-toStyle :: StyleClass o => o -> Style
-toStyle = unsafeCastGObject . toGObject
-
-instance StyleClass Style
-instance GObjectClass Style where
-  toGObject = GObject . castForeignPtr . unStyle
-  unsafeCastGObject = Style . castForeignPtr . unGObject
-
-castToStyle :: GObjectClass obj => obj -> Style
-castToStyle = castTo gTypeStyle "Style"
-
-gTypeStyle :: GType
-gTypeStyle =
-  {# call fun unsafe gtk_style_get_type #}
-
--- ******************************************************************** RcStyle
-
-{#pointer *RcStyle foreign newtype #} deriving (Eq,Ord)
-
-mkRcStyle = (RcStyle, objectUnrefFromMainloop)
-unRcStyle (RcStyle o) = o
-
-class GObjectClass o => RcStyleClass o
-toRcStyle :: RcStyleClass o => o -> RcStyle
-toRcStyle = unsafeCastGObject . toGObject
-
-instance RcStyleClass RcStyle
-instance GObjectClass RcStyle where
-  toGObject = GObject . castForeignPtr . unRcStyle
-  unsafeCastGObject = RcStyle . castForeignPtr . unGObject
-
-castToRcStyle :: GObjectClass obj => obj -> RcStyle
-castToRcStyle = castTo gTypeRcStyle "RcStyle"
-
-gTypeRcStyle :: GType
-gTypeRcStyle =
-  {# call fun unsafe gtk_rc_style_get_type #}
-
--- **************************************************************** DragContext
-
-{#pointer *GdkDragContext as DragContext foreign newtype #} deriving (Eq,Ord)
-
-mkDragContext = (DragContext, objectUnrefFromMainloop)
-unDragContext (DragContext o) = o
-
-class GObjectClass o => DragContextClass o
-toDragContext :: DragContextClass o => o -> DragContext
-toDragContext = unsafeCastGObject . toGObject
-
-instance DragContextClass DragContext
-instance GObjectClass DragContext where
-  toGObject = GObject . castForeignPtr . unDragContext
-  unsafeCastGObject = DragContext . castForeignPtr . unGObject
-
-castToDragContext :: GObjectClass obj => obj -> DragContext
-castToDragContext = castTo gTypeDragContext "DragContext"
-
-gTypeDragContext :: GType
-gTypeDragContext =
-  {# call fun unsafe gdk_drag_context_get_type #}
-
--- ********************************************************************* Pixbuf
-
-{#pointer *GdkPixbuf as Pixbuf foreign newtype #} deriving (Eq,Ord)
-
-mkPixbuf = (Pixbuf, objectUnref)
-unPixbuf (Pixbuf o) = o
-
-class GObjectClass o => PixbufClass o
-toPixbuf :: PixbufClass o => o -> Pixbuf
-toPixbuf = unsafeCastGObject . toGObject
-
-instance PixbufClass Pixbuf
-instance GObjectClass Pixbuf where
-  toGObject = GObject . castForeignPtr . unPixbuf
-  unsafeCastGObject = Pixbuf . castForeignPtr . unGObject
-
-castToPixbuf :: GObjectClass obj => obj -> Pixbuf
-castToPixbuf = castTo gTypePixbuf "Pixbuf"
-
-gTypePixbuf :: GType
-gTypePixbuf =
-  {# call fun unsafe gdk_pixbuf_get_type #}
-
--- ************************************************************ PixbufAnimation
-
-{#pointer *GdkPixbufAnimation as PixbufAnimation foreign newtype #} deriving (Eq,Ord)
-
-mkPixbufAnimation = (PixbufAnimation, objectUnref)
-unPixbufAnimation (PixbufAnimation o) = o
-
-class GObjectClass o => PixbufAnimationClass o
-toPixbufAnimation :: PixbufAnimationClass o => o -> PixbufAnimation
-toPixbufAnimation = unsafeCastGObject . toGObject
-
-instance PixbufAnimationClass PixbufAnimation
-instance GObjectClass PixbufAnimation where
-  toGObject = GObject . castForeignPtr . unPixbufAnimation
-  unsafeCastGObject = PixbufAnimation . castForeignPtr . unGObject
-
-castToPixbufAnimation :: GObjectClass obj => obj -> PixbufAnimation
-castToPixbufAnimation = castTo gTypePixbufAnimation "PixbufAnimation"
-
-gTypePixbufAnimation :: GType
-gTypePixbufAnimation =
-  {# call fun unsafe gdk_pixbuf_animation_get_type #}
-
--- *********************************************************** PixbufSimpleAnim
-
-{#pointer *GdkPixbufSimpleAnim as PixbufSimpleAnim foreign newtype #} deriving (Eq,Ord)
-
-mkPixbufSimpleAnim = (PixbufSimpleAnim, objectUnref)
-unPixbufSimpleAnim (PixbufSimpleAnim o) = o
-
-class PixbufAnimationClass o => PixbufSimpleAnimClass o
-toPixbufSimpleAnim :: PixbufSimpleAnimClass o => o -> PixbufSimpleAnim
-toPixbufSimpleAnim = unsafeCastGObject . toGObject
-
-instance PixbufSimpleAnimClass PixbufSimpleAnim
-instance PixbufAnimationClass PixbufSimpleAnim
-instance GObjectClass PixbufSimpleAnim where
-  toGObject = GObject . castForeignPtr . unPixbufSimpleAnim
-  unsafeCastGObject = PixbufSimpleAnim . castForeignPtr . unGObject
-
-castToPixbufSimpleAnim :: GObjectClass obj => obj -> PixbufSimpleAnim
-castToPixbufSimpleAnim = castTo gTypePixbufSimpleAnim "PixbufSimpleAnim"
-
-gTypePixbufSimpleAnim :: GType
-gTypePixbufSimpleAnim =
-  {# call fun unsafe gdk_pixbuf_simple_anim_get_type #}
-
--- ******************************************************** PixbufAnimationIter
-
-{#pointer *GdkPixbufAnimationIter as PixbufAnimationIter foreign newtype #} deriving (Eq,Ord)
-
-mkPixbufAnimationIter = (PixbufAnimationIter, objectUnref)
-unPixbufAnimationIter (PixbufAnimationIter o) = o
-
-class GObjectClass o => PixbufAnimationIterClass o
-toPixbufAnimationIter :: PixbufAnimationIterClass o => o -> PixbufAnimationIter
-toPixbufAnimationIter = unsafeCastGObject . toGObject
-
-instance PixbufAnimationIterClass PixbufAnimationIter
-instance GObjectClass PixbufAnimationIter where
-  toGObject = GObject . castForeignPtr . unPixbufAnimationIter
-  unsafeCastGObject = PixbufAnimationIter . castForeignPtr . unGObject
-
-castToPixbufAnimationIter :: GObjectClass obj => obj -> PixbufAnimationIter
-castToPixbufAnimationIter = castTo gTypePixbufAnimationIter "PixbufAnimationIter"
-
-gTypePixbufAnimationIter :: GType
-gTypePixbufAnimationIter =
-  {# call fun unsafe gdk_pixbuf_animation_iter_get_type #}
-
--- ************************************************************ TextChildAnchor
-
-{#pointer *TextChildAnchor foreign newtype #} deriving (Eq,Ord)
-
-mkTextChildAnchor = (TextChildAnchor, objectUnrefFromMainloop)
-unTextChildAnchor (TextChildAnchor o) = o
-
-class GObjectClass o => TextChildAnchorClass o
-toTextChildAnchor :: TextChildAnchorClass o => o -> TextChildAnchor
-toTextChildAnchor = unsafeCastGObject . toGObject
-
-instance TextChildAnchorClass TextChildAnchor
-instance GObjectClass TextChildAnchor where
-  toGObject = GObject . castForeignPtr . unTextChildAnchor
-  unsafeCastGObject = TextChildAnchor . castForeignPtr . unGObject
-
-castToTextChildAnchor :: GObjectClass obj => obj -> TextChildAnchor
-castToTextChildAnchor = castTo gTypeTextChildAnchor "TextChildAnchor"
-
-gTypeTextChildAnchor :: GType
-gTypeTextChildAnchor =
-  {# call fun unsafe gtk_text_child_anchor_get_type #}
-
--- ******************************************************************* TextMark
-
-{#pointer *TextMark foreign newtype #} deriving (Eq,Ord)
-
-mkTextMark = (TextMark, objectUnrefFromMainloop)
-unTextMark (TextMark o) = o
-
-class GObjectClass o => TextMarkClass o
-toTextMark :: TextMarkClass o => o -> TextMark
-toTextMark = unsafeCastGObject . toGObject
-
-instance TextMarkClass TextMark
-instance GObjectClass TextMark where
-  toGObject = GObject . castForeignPtr . unTextMark
-  unsafeCastGObject = TextMark . castForeignPtr . unGObject
-
-castToTextMark :: GObjectClass obj => obj -> TextMark
-castToTextMark = castTo gTypeTextMark "TextMark"
-
-gTypeTextMark :: GType
-gTypeTextMark =
-  {# call fun unsafe gtk_text_mark_get_type #}
-
--- ********************************************************************* Object
-
-{#pointer *Object foreign newtype #} deriving (Eq,Ord)
-
-mkObject = (Object, objectUnrefFromMainloop)
-unObject (Object o) = o
-
-class GObjectClass o => ObjectClass o
-toObject :: ObjectClass o => o -> Object
-toObject = unsafeCastGObject . toGObject
-
-instance ObjectClass Object
-instance GObjectClass Object where
-  toGObject = GObject . castForeignPtr . unObject
-  unsafeCastGObject = Object . castForeignPtr . unGObject
-
-castToObject :: GObjectClass obj => obj -> Object
-castToObject = castTo gTypeObject "Object"
-
-gTypeObject :: GType
-gTypeObject =
-  {# call fun unsafe gtk_object_get_type #}
-
--- *************************************************************** RecentFilter
-
-{#pointer *RecentFilter foreign newtype #} deriving (Eq,Ord)
-
-mkRecentFilter = (RecentFilter, objectUnrefFromMainloop)
-unRecentFilter (RecentFilter o) = o
-
-class ObjectClass o => RecentFilterClass o
-toRecentFilter :: RecentFilterClass o => o -> RecentFilter
-toRecentFilter = unsafeCastGObject . toGObject
-
-instance RecentFilterClass RecentFilter
-instance ObjectClass RecentFilter
-instance GObjectClass RecentFilter where
-  toGObject = GObject . castForeignPtr . unRecentFilter
-  unsafeCastGObject = RecentFilter . castForeignPtr . unGObject
-
-castToRecentFilter :: GObjectClass obj => obj -> RecentFilter
-castToRecentFilter = castTo gTypeRecentFilter "RecentFilter"
-
-gTypeRecentFilter :: GType
-gTypeRecentFilter =
-  {# call fun unsafe gtk_recent_filter_get_type #}
-
--- ********************************************************************* Widget
-
-{#pointer *Widget foreign newtype #} deriving (Eq,Ord)
-
-mkWidget = (Widget, objectUnrefFromMainloop)
-unWidget (Widget o) = o
-
-class ObjectClass o => WidgetClass o
-toWidget :: WidgetClass o => o -> Widget
-toWidget = unsafeCastGObject . toGObject
-
-instance WidgetClass Widget
-instance ObjectClass Widget
-instance GObjectClass Widget where
-  toGObject = GObject . castForeignPtr . unWidget
-  unsafeCastGObject = Widget . castForeignPtr . unGObject
-
-castToWidget :: GObjectClass obj => obj -> Widget
-castToWidget = castTo gTypeWidget "Widget"
-
-gTypeWidget :: GType
-gTypeWidget =
-  {# call fun unsafe gtk_widget_get_type #}
-
--- ************************************************************************ HSV
-
-{#pointer *HSV foreign newtype #} deriving (Eq,Ord)
-
-mkHSV = (HSV, objectUnrefFromMainloop)
-unHSV (HSV o) = o
-
-class WidgetClass o => HSVClass o
-toHSV :: HSVClass o => o -> HSV
-toHSV = unsafeCastGObject . toGObject
-
-instance HSVClass HSV
-instance WidgetClass HSV
-instance ObjectClass HSV
-instance GObjectClass HSV where
-  toGObject = GObject . castForeignPtr . unHSV
-  unsafeCastGObject = HSV . castForeignPtr . unGObject
-
-castToHSV :: GObjectClass obj => obj -> HSV
-castToHSV = castTo gTypeHSV "HSV"
-
-gTypeHSV :: GType
-gTypeHSV =
-  {# call fun unsafe gtk_hsv_get_type #}
-
--- *********************************************************************** Misc
-
-{#pointer *Misc foreign newtype #} deriving (Eq,Ord)
-
-mkMisc = (Misc, objectUnrefFromMainloop)
-unMisc (Misc o) = o
-
-class WidgetClass o => MiscClass o
-toMisc :: MiscClass o => o -> Misc
-toMisc = unsafeCastGObject . toGObject
-
-instance MiscClass Misc
-instance WidgetClass Misc
-instance ObjectClass Misc
-instance GObjectClass Misc where
-  toGObject = GObject . castForeignPtr . unMisc
-  unsafeCastGObject = Misc . castForeignPtr . unGObject
-
-castToMisc :: GObjectClass obj => obj -> Misc
-castToMisc = castTo gTypeMisc "Misc"
-
-gTypeMisc :: GType
-gTypeMisc =
-  {# call fun unsafe gtk_misc_get_type #}
-
--- ********************************************************************** Label
-
-{#pointer *Label foreign newtype #} deriving (Eq,Ord)
-
-mkLabel = (Label, objectUnrefFromMainloop)
-unLabel (Label o) = o
-
-class MiscClass o => LabelClass o
-toLabel :: LabelClass o => o -> Label
-toLabel = unsafeCastGObject . toGObject
-
-instance LabelClass Label
-instance MiscClass Label
-instance WidgetClass Label
-instance ObjectClass Label
-instance GObjectClass Label where
-  toGObject = GObject . castForeignPtr . unLabel
-  unsafeCastGObject = Label . castForeignPtr . unGObject
-
-castToLabel :: GObjectClass obj => obj -> Label
-castToLabel = castTo gTypeLabel "Label"
-
-gTypeLabel :: GType
-gTypeLabel =
-  {# call fun unsafe gtk_label_get_type #}
-
--- ***************************************************************** AccelLabel
-
-{#pointer *AccelLabel foreign newtype #} deriving (Eq,Ord)
-
-mkAccelLabel = (AccelLabel, objectUnrefFromMainloop)
-unAccelLabel (AccelLabel o) = o
-
-class LabelClass o => AccelLabelClass o
-toAccelLabel :: AccelLabelClass o => o -> AccelLabel
-toAccelLabel = unsafeCastGObject . toGObject
-
-instance AccelLabelClass AccelLabel
-instance LabelClass AccelLabel
-instance MiscClass AccelLabel
-instance WidgetClass AccelLabel
-instance ObjectClass AccelLabel
-instance GObjectClass AccelLabel where
-  toGObject = GObject . castForeignPtr . unAccelLabel
-  unsafeCastGObject = AccelLabel . castForeignPtr . unGObject
-
-castToAccelLabel :: GObjectClass obj => obj -> AccelLabel
-castToAccelLabel = castTo gTypeAccelLabel "AccelLabel"
-
-gTypeAccelLabel :: GType
-gTypeAccelLabel =
-  {# call fun unsafe gtk_accel_label_get_type #}
-
--- ****************************************************************** TipsQuery
-
-{#pointer *TipsQuery foreign newtype #} deriving (Eq,Ord)
-
-mkTipsQuery = (TipsQuery, objectUnrefFromMainloop)
-unTipsQuery (TipsQuery o) = o
-
-class LabelClass o => TipsQueryClass o
-toTipsQuery :: TipsQueryClass o => o -> TipsQuery
-toTipsQuery = unsafeCastGObject . toGObject
-
-instance TipsQueryClass TipsQuery
-instance LabelClass TipsQuery
-instance MiscClass TipsQuery
-instance WidgetClass TipsQuery
-instance ObjectClass TipsQuery
-instance GObjectClass TipsQuery where
-  toGObject = GObject . castForeignPtr . unTipsQuery
-  unsafeCastGObject = TipsQuery . castForeignPtr . unGObject
-
-castToTipsQuery :: GObjectClass obj => obj -> TipsQuery
-castToTipsQuery = castTo gTypeTipsQuery "TipsQuery"
-
-gTypeTipsQuery :: GType
-gTypeTipsQuery =
-  {# call fun unsafe gtk_tips_query_get_type #}
-
--- ********************************************************************** Arrow
-
-{#pointer *Arrow foreign newtype #} deriving (Eq,Ord)
-
-mkArrow = (Arrow, objectUnrefFromMainloop)
-unArrow (Arrow o) = o
-
-class MiscClass o => ArrowClass o
-toArrow :: ArrowClass o => o -> Arrow
-toArrow = unsafeCastGObject . toGObject
-
-instance ArrowClass Arrow
-instance MiscClass Arrow
-instance WidgetClass Arrow
-instance ObjectClass Arrow
-instance GObjectClass Arrow where
-  toGObject = GObject . castForeignPtr . unArrow
-  unsafeCastGObject = Arrow . castForeignPtr . unGObject
-
-castToArrow :: GObjectClass obj => obj -> Arrow
-castToArrow = castTo gTypeArrow "Arrow"
-
-gTypeArrow :: GType
-gTypeArrow =
-  {# call fun unsafe gtk_arrow_get_type #}
-
--- ********************************************************************** Image
-
-{#pointer *Image foreign newtype #} deriving (Eq,Ord)
-
-mkImage = (Image, objectUnrefFromMainloop)
-unImage (Image o) = o
-
-class MiscClass o => ImageClass o
-toImage :: ImageClass o => o -> Image
-toImage = unsafeCastGObject . toGObject
-
-instance ImageClass Image
-instance MiscClass Image
-instance WidgetClass Image
-instance ObjectClass Image
-instance GObjectClass Image where
-  toGObject = GObject . castForeignPtr . unImage
-  unsafeCastGObject = Image . castForeignPtr . unGObject
-
-castToImage :: GObjectClass obj => obj -> Image
-castToImage = castTo gTypeImage "Image"
-
-gTypeImage :: GType
-gTypeImage =
-  {# call fun unsafe gtk_image_get_type #}
-
--- ****************************************************************** Container
-
-{#pointer *Container foreign newtype #} deriving (Eq,Ord)
-
-mkContainer = (Container, objectUnrefFromMainloop)
-unContainer (Container o) = o
-
-class WidgetClass o => ContainerClass o
-toContainer :: ContainerClass o => o -> Container
-toContainer = unsafeCastGObject . toGObject
-
-instance ContainerClass Container
-instance WidgetClass Container
-instance ObjectClass Container
-instance GObjectClass Container where
-  toGObject = GObject . castForeignPtr . unContainer
-  unsafeCastGObject = Container . castForeignPtr . unGObject
-
-castToContainer :: GObjectClass obj => obj -> Container
-castToContainer = castTo gTypeContainer "Container"
-
-gTypeContainer :: GType
-gTypeContainer =
-  {# call fun unsafe gtk_container_get_type #}
-
--- **************************************************************** ToolPalette
-
-{#pointer *ToolPalette foreign newtype #} deriving (Eq,Ord)
-
-mkToolPalette = (ToolPalette, objectUnrefFromMainloop)
-unToolPalette (ToolPalette o) = o
-
-class ContainerClass o => ToolPaletteClass o
-toToolPalette :: ToolPaletteClass o => o -> ToolPalette
-toToolPalette = unsafeCastGObject . toGObject
-
-instance ToolPaletteClass ToolPalette
-instance ContainerClass ToolPalette
-instance WidgetClass ToolPalette
-instance ObjectClass ToolPalette
-instance GObjectClass ToolPalette where
-  toGObject = GObject . castForeignPtr . unToolPalette
-  unsafeCastGObject = ToolPalette . castForeignPtr . unGObject
-
-castToToolPalette :: GObjectClass obj => obj -> ToolPalette
-castToToolPalette = castTo gTypeToolPalette "ToolPalette"
-
-gTypeToolPalette :: GType
-gTypeToolPalette =
-  {# call fun unsafe gtk_tool_palette_get_type #}
-
--- ************************************************************** ToolItemGroup
-
-{#pointer *ToolItemGroup foreign newtype #} deriving (Eq,Ord)
-
-mkToolItemGroup = (ToolItemGroup, objectUnrefFromMainloop)
-unToolItemGroup (ToolItemGroup o) = o
-
-class ContainerClass o => ToolItemGroupClass o
-toToolItemGroup :: ToolItemGroupClass o => o -> ToolItemGroup
-toToolItemGroup = unsafeCastGObject . toGObject
-
-instance ToolItemGroupClass ToolItemGroup
-instance ContainerClass ToolItemGroup
-instance WidgetClass ToolItemGroup
-instance ObjectClass ToolItemGroup
-instance GObjectClass ToolItemGroup where
-  toGObject = GObject . castForeignPtr . unToolItemGroup
-  unsafeCastGObject = ToolItemGroup . castForeignPtr . unGObject
-
-castToToolItemGroup :: GObjectClass obj => obj -> ToolItemGroup
-castToToolItemGroup = castTo gTypeToolItemGroup "ToolItemGroup"
-
-gTypeToolItemGroup :: GType
-gTypeToolItemGroup =
-  {# call fun unsafe gtk_tool_item_group_get_type #}
-
--- ************************************************************************ Bin
-
-{#pointer *Bin foreign newtype #} deriving (Eq,Ord)
-
-mkBin = (Bin, objectUnrefFromMainloop)
-unBin (Bin o) = o
-
-class ContainerClass o => BinClass o
-toBin :: BinClass o => o -> Bin
-toBin = unsafeCastGObject . toGObject
-
-instance BinClass Bin
-instance ContainerClass Bin
-instance WidgetClass Bin
-instance ObjectClass Bin
-instance GObjectClass Bin where
-  toGObject = GObject . castForeignPtr . unBin
-  unsafeCastGObject = Bin . castForeignPtr . unGObject
-
-castToBin :: GObjectClass obj => obj -> Bin
-castToBin = castTo gTypeBin "Bin"
-
-gTypeBin :: GType
-gTypeBin =
-  {# call fun unsafe gtk_bin_get_type #}
-
--- ****************************************************************** Alignment
-
-{#pointer *Alignment foreign newtype #} deriving (Eq,Ord)
-
-mkAlignment = (Alignment, objectUnrefFromMainloop)
-unAlignment (Alignment o) = o
-
-class BinClass o => AlignmentClass o
-toAlignment :: AlignmentClass o => o -> Alignment
-toAlignment = unsafeCastGObject . toGObject
-
-instance AlignmentClass Alignment
-instance BinClass Alignment
-instance ContainerClass Alignment
-instance WidgetClass Alignment
-instance ObjectClass Alignment
-instance GObjectClass Alignment where
-  toGObject = GObject . castForeignPtr . unAlignment
-  unsafeCastGObject = Alignment . castForeignPtr . unGObject
-
-castToAlignment :: GObjectClass obj => obj -> Alignment
-castToAlignment = castTo gTypeAlignment "Alignment"
-
-gTypeAlignment :: GType
-gTypeAlignment =
-  {# call fun unsafe gtk_alignment_get_type #}
-
--- ********************************************************************** Frame
-
-{#pointer *Frame foreign newtype #} deriving (Eq,Ord)
-
-mkFrame = (Frame, objectUnrefFromMainloop)
-unFrame (Frame o) = o
-
-class BinClass o => FrameClass o
-toFrame :: FrameClass o => o -> Frame
-toFrame = unsafeCastGObject . toGObject
-
-instance FrameClass Frame
-instance BinClass Frame
-instance ContainerClass Frame
-instance WidgetClass Frame
-instance ObjectClass Frame
-instance GObjectClass Frame where
-  toGObject = GObject . castForeignPtr . unFrame
-  unsafeCastGObject = Frame . castForeignPtr . unGObject
-
-castToFrame :: GObjectClass obj => obj -> Frame
-castToFrame = castTo gTypeFrame "Frame"
-
-gTypeFrame :: GType
-gTypeFrame =
-  {# call fun unsafe gtk_frame_get_type #}
-
--- **************************************************************** AspectFrame
-
-{#pointer *AspectFrame foreign newtype #} deriving (Eq,Ord)
-
-mkAspectFrame = (AspectFrame, objectUnrefFromMainloop)
-unAspectFrame (AspectFrame o) = o
-
-class FrameClass o => AspectFrameClass o
-toAspectFrame :: AspectFrameClass o => o -> AspectFrame
-toAspectFrame = unsafeCastGObject . toGObject
-
-instance AspectFrameClass AspectFrame
-instance FrameClass AspectFrame
-instance BinClass AspectFrame
-instance ContainerClass AspectFrame
-instance WidgetClass AspectFrame
-instance ObjectClass AspectFrame
-instance GObjectClass AspectFrame where
-  toGObject = GObject . castForeignPtr . unAspectFrame
-  unsafeCastGObject = AspectFrame . castForeignPtr . unGObject
-
-castToAspectFrame :: GObjectClass obj => obj -> AspectFrame
-castToAspectFrame = castTo gTypeAspectFrame "AspectFrame"
-
-gTypeAspectFrame :: GType
-gTypeAspectFrame =
-  {# call fun unsafe gtk_aspect_frame_get_type #}
-
--- ********************************************************************* Button
-
-{#pointer *Button foreign newtype #} deriving (Eq,Ord)
-
-mkButton = (Button, objectUnrefFromMainloop)
-unButton (Button o) = o
-
-class BinClass o => ButtonClass o
-toButton :: ButtonClass o => o -> Button
-toButton = unsafeCastGObject . toGObject
-
-instance ButtonClass Button
-instance BinClass Button
-instance ContainerClass Button
-instance WidgetClass Button
-instance ObjectClass Button
-instance GObjectClass Button where
-  toGObject = GObject . castForeignPtr . unButton
-  unsafeCastGObject = Button . castForeignPtr . unGObject
-
-castToButton :: GObjectClass obj => obj -> Button
-castToButton = castTo gTypeButton "Button"
-
-gTypeButton :: GType
-gTypeButton =
-  {# call fun unsafe gtk_button_get_type #}
-
--- **************************************************************** ScaleButton
-
-{#pointer *ScaleButton foreign newtype #} deriving (Eq,Ord)
-
-mkScaleButton = (ScaleButton, objectUnrefFromMainloop)
-unScaleButton (ScaleButton o) = o
-
-class ButtonClass o => ScaleButtonClass o
-toScaleButton :: ScaleButtonClass o => o -> ScaleButton
-toScaleButton = unsafeCastGObject . toGObject
-
-instance ScaleButtonClass ScaleButton
-instance ButtonClass ScaleButton
-instance BinClass ScaleButton
-instance ContainerClass ScaleButton
-instance WidgetClass ScaleButton
-instance ObjectClass ScaleButton
-instance GObjectClass ScaleButton where
-  toGObject = GObject . castForeignPtr . unScaleButton
-  unsafeCastGObject = ScaleButton . castForeignPtr . unGObject
-
-castToScaleButton :: GObjectClass obj => obj -> ScaleButton
-castToScaleButton = castTo gTypeScaleButton "ScaleButton"
-
-gTypeScaleButton :: GType
-gTypeScaleButton =
-  {# call fun unsafe gtk_scale_button_get_type #}
-
--- *************************************************************** VolumeButton
-
-{#pointer *VolumeButton foreign newtype #} deriving (Eq,Ord)
-
-mkVolumeButton = (VolumeButton, objectUnrefFromMainloop)
-unVolumeButton (VolumeButton o) = o
-
-class ScaleButtonClass o => VolumeButtonClass o
-toVolumeButton :: VolumeButtonClass o => o -> VolumeButton
-toVolumeButton = unsafeCastGObject . toGObject
-
-instance VolumeButtonClass VolumeButton
-instance ScaleButtonClass VolumeButton
-instance ButtonClass VolumeButton
-instance BinClass VolumeButton
-instance ContainerClass VolumeButton
-instance WidgetClass VolumeButton
-instance ObjectClass VolumeButton
-instance GObjectClass VolumeButton where
-  toGObject = GObject . castForeignPtr . unVolumeButton
-  unsafeCastGObject = VolumeButton . castForeignPtr . unGObject
-
-castToVolumeButton :: GObjectClass obj => obj -> VolumeButton
-castToVolumeButton = castTo gTypeVolumeButton "VolumeButton"
-
-gTypeVolumeButton :: GType
-gTypeVolumeButton =
-  {# call fun unsafe gtk_volume_button_get_type #}
-
--- ***************************************************************** LinkButton
-
-{#pointer *LinkButton foreign newtype #} deriving (Eq,Ord)
-
-mkLinkButton = (LinkButton, objectUnrefFromMainloop)
-unLinkButton (LinkButton o) = o
-
-class ButtonClass o => LinkButtonClass o
-toLinkButton :: LinkButtonClass o => o -> LinkButton
-toLinkButton = unsafeCastGObject . toGObject
-
-instance LinkButtonClass LinkButton
-instance ButtonClass LinkButton
-instance BinClass LinkButton
-instance ContainerClass LinkButton
-instance WidgetClass LinkButton
-instance ObjectClass LinkButton
-instance GObjectClass LinkButton where
-  toGObject = GObject . castForeignPtr . unLinkButton
-  unsafeCastGObject = LinkButton . castForeignPtr . unGObject
-
-castToLinkButton :: GObjectClass obj => obj -> LinkButton
-castToLinkButton = castTo gTypeLinkButton "LinkButton"
-
-gTypeLinkButton :: GType
-gTypeLinkButton =
-  {# call fun unsafe gtk_link_button_get_type #}
-
--- *************************************************************** ToggleButton
-
-{#pointer *ToggleButton foreign newtype #} deriving (Eq,Ord)
-
-mkToggleButton = (ToggleButton, objectUnrefFromMainloop)
-unToggleButton (ToggleButton o) = o
-
-class ButtonClass o => ToggleButtonClass o
-toToggleButton :: ToggleButtonClass o => o -> ToggleButton
-toToggleButton = unsafeCastGObject . toGObject
-
-instance ToggleButtonClass ToggleButton
-instance ButtonClass ToggleButton
-instance BinClass ToggleButton
-instance ContainerClass ToggleButton
-instance WidgetClass ToggleButton
-instance ObjectClass ToggleButton
-instance GObjectClass ToggleButton where
-  toGObject = GObject . castForeignPtr . unToggleButton
-  unsafeCastGObject = ToggleButton . castForeignPtr . unGObject
-
-castToToggleButton :: GObjectClass obj => obj -> ToggleButton
-castToToggleButton = castTo gTypeToggleButton "ToggleButton"
-
-gTypeToggleButton :: GType
-gTypeToggleButton =
-  {# call fun unsafe gtk_toggle_button_get_type #}
-
--- **************************************************************** CheckButton
-
-{#pointer *CheckButton foreign newtype #} deriving (Eq,Ord)
-
-mkCheckButton = (CheckButton, objectUnrefFromMainloop)
-unCheckButton (CheckButton o) = o
-
-class ToggleButtonClass o => CheckButtonClass o
-toCheckButton :: CheckButtonClass o => o -> CheckButton
-toCheckButton = unsafeCastGObject . toGObject
-
-instance CheckButtonClass CheckButton
-instance ToggleButtonClass CheckButton
-instance ButtonClass CheckButton
-instance BinClass CheckButton
-instance ContainerClass CheckButton
-instance WidgetClass CheckButton
-instance ObjectClass CheckButton
-instance GObjectClass CheckButton where
-  toGObject = GObject . castForeignPtr . unCheckButton
-  unsafeCastGObject = CheckButton . castForeignPtr . unGObject
-
-castToCheckButton :: GObjectClass obj => obj -> CheckButton
-castToCheckButton = castTo gTypeCheckButton "CheckButton"
-
-gTypeCheckButton :: GType
-gTypeCheckButton =
-  {# call fun unsafe gtk_check_button_get_type #}
-
--- **************************************************************** RadioButton
-
-{#pointer *RadioButton foreign newtype #} deriving (Eq,Ord)
-
-mkRadioButton = (RadioButton, objectUnrefFromMainloop)
-unRadioButton (RadioButton o) = o
-
-class CheckButtonClass o => RadioButtonClass o
-toRadioButton :: RadioButtonClass o => o -> RadioButton
-toRadioButton = unsafeCastGObject . toGObject
-
-instance RadioButtonClass RadioButton
-instance CheckButtonClass RadioButton
-instance ToggleButtonClass RadioButton
-instance ButtonClass RadioButton
-instance BinClass RadioButton
-instance ContainerClass RadioButton
-instance WidgetClass RadioButton
-instance ObjectClass RadioButton
-instance GObjectClass RadioButton where
-  toGObject = GObject . castForeignPtr . unRadioButton
-  unsafeCastGObject = RadioButton . castForeignPtr . unGObject
-
-castToRadioButton :: GObjectClass obj => obj -> RadioButton
-castToRadioButton = castTo gTypeRadioButton "RadioButton"
-
-gTypeRadioButton :: GType
-gTypeRadioButton =
-  {# call fun unsafe gtk_radio_button_get_type #}
-
--- **************************************************************** ColorButton
-
-{#pointer *ColorButton foreign newtype #} deriving (Eq,Ord)
-
-mkColorButton = (ColorButton, objectUnrefFromMainloop)
-unColorButton (ColorButton o) = o
-
-class ButtonClass o => ColorButtonClass o
-toColorButton :: ColorButtonClass o => o -> ColorButton
-toColorButton = unsafeCastGObject . toGObject
-
-instance ColorButtonClass ColorButton
-instance ButtonClass ColorButton
-instance BinClass ColorButton
-instance ContainerClass ColorButton
-instance WidgetClass ColorButton
-instance ObjectClass ColorButton
-instance GObjectClass ColorButton where
-  toGObject = GObject . castForeignPtr . unColorButton
-  unsafeCastGObject = ColorButton . castForeignPtr . unGObject
-
-castToColorButton :: GObjectClass obj => obj -> ColorButton
-castToColorButton = castTo gTypeColorButton "ColorButton"
-
-gTypeColorButton :: GType
-gTypeColorButton =
-  {# call fun unsafe gtk_color_button_get_type #}
-
--- ***************************************************************** FontButton
-
-{#pointer *FontButton foreign newtype #} deriving (Eq,Ord)
-
-mkFontButton = (FontButton, objectUnrefFromMainloop)
-unFontButton (FontButton o) = o
-
-class ButtonClass o => FontButtonClass o
-toFontButton :: FontButtonClass o => o -> FontButton
-toFontButton = unsafeCastGObject . toGObject
-
-instance FontButtonClass FontButton
-instance ButtonClass FontButton
-instance BinClass FontButton
-instance ContainerClass FontButton
-instance WidgetClass FontButton
-instance ObjectClass FontButton
-instance GObjectClass FontButton where
-  toGObject = GObject . castForeignPtr . unFontButton
-  unsafeCastGObject = FontButton . castForeignPtr . unGObject
-
-castToFontButton :: GObjectClass obj => obj -> FontButton
-castToFontButton = castTo gTypeFontButton "FontButton"
-
-gTypeFontButton :: GType
-gTypeFontButton =
-  {# call fun unsafe gtk_font_button_get_type #}
-
--- ***************************************************************** OptionMenu
-
-{#pointer *OptionMenu foreign newtype #} deriving (Eq,Ord)
-
-mkOptionMenu = (OptionMenu, objectUnrefFromMainloop)
-unOptionMenu (OptionMenu o) = o
-
-class ButtonClass o => OptionMenuClass o
-toOptionMenu :: OptionMenuClass o => o -> OptionMenu
-toOptionMenu = unsafeCastGObject . toGObject
-
-instance OptionMenuClass OptionMenu
-instance ButtonClass OptionMenu
-instance BinClass OptionMenu
-instance ContainerClass OptionMenu
-instance WidgetClass OptionMenu
-instance ObjectClass OptionMenu
-instance GObjectClass OptionMenu where
-  toGObject = GObject . castForeignPtr . unOptionMenu
-  unsafeCastGObject = OptionMenu . castForeignPtr . unGObject
-
-castToOptionMenu :: GObjectClass obj => obj -> OptionMenu
-castToOptionMenu = castTo gTypeOptionMenu "OptionMenu"
-
-gTypeOptionMenu :: GType
-gTypeOptionMenu =
-  {# call fun unsafe gtk_option_menu_get_type #}
-
--- *********************************************************************** Item
-
-{#pointer *Item foreign newtype #} deriving (Eq,Ord)
-
-mkItem = (Item, objectUnrefFromMainloop)
-unItem (Item o) = o
-
-class BinClass o => ItemClass o
-toItem :: ItemClass o => o -> Item
-toItem = unsafeCastGObject . toGObject
-
-instance ItemClass Item
-instance BinClass Item
-instance ContainerClass Item
-instance WidgetClass Item
-instance ObjectClass Item
-instance GObjectClass Item where
-  toGObject = GObject . castForeignPtr . unItem
-  unsafeCastGObject = Item . castForeignPtr . unGObject
-
-castToItem :: GObjectClass obj => obj -> Item
-castToItem = castTo gTypeItem "Item"
-
-gTypeItem :: GType
-gTypeItem =
-  {# call fun unsafe gtk_item_get_type #}
-
--- ******************************************************************* MenuItem
-
-{#pointer *MenuItem foreign newtype #} deriving (Eq,Ord)
-
-mkMenuItem = (MenuItem, objectUnrefFromMainloop)
-unMenuItem (MenuItem o) = o
-
-class ItemClass o => MenuItemClass o
-toMenuItem :: MenuItemClass o => o -> MenuItem
-toMenuItem = unsafeCastGObject . toGObject
-
-instance MenuItemClass MenuItem
-instance ItemClass MenuItem
-instance BinClass MenuItem
-instance ContainerClass MenuItem
-instance WidgetClass MenuItem
-instance ObjectClass MenuItem
-instance GObjectClass MenuItem where
-  toGObject = GObject . castForeignPtr . unMenuItem
-  unsafeCastGObject = MenuItem . castForeignPtr . unGObject
-
-castToMenuItem :: GObjectClass obj => obj -> MenuItem
-castToMenuItem = castTo gTypeMenuItem "MenuItem"
-
-gTypeMenuItem :: GType
-gTypeMenuItem =
-  {# call fun unsafe gtk_menu_item_get_type #}
-
--- ************************************************************** CheckMenuItem
-
-{#pointer *CheckMenuItem foreign newtype #} deriving (Eq,Ord)
-
-mkCheckMenuItem = (CheckMenuItem, objectUnrefFromMainloop)
-unCheckMenuItem (CheckMenuItem o) = o
-
-class MenuItemClass o => CheckMenuItemClass o
-toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem
-toCheckMenuItem = unsafeCastGObject . toGObject
-
-instance CheckMenuItemClass CheckMenuItem
-instance MenuItemClass CheckMenuItem
-instance ItemClass CheckMenuItem
-instance BinClass CheckMenuItem
-instance ContainerClass CheckMenuItem
-instance WidgetClass CheckMenuItem
-instance ObjectClass CheckMenuItem
-instance GObjectClass CheckMenuItem where
-  toGObject = GObject . castForeignPtr . unCheckMenuItem
-  unsafeCastGObject = CheckMenuItem . castForeignPtr . unGObject
-
-castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem
-castToCheckMenuItem = castTo gTypeCheckMenuItem "CheckMenuItem"
-
-gTypeCheckMenuItem :: GType
-gTypeCheckMenuItem =
-  {# call fun unsafe gtk_check_menu_item_get_type #}
-
--- ************************************************************** RadioMenuItem
-
-{#pointer *RadioMenuItem foreign newtype #} deriving (Eq,Ord)
-
-mkRadioMenuItem = (RadioMenuItem, objectUnrefFromMainloop)
-unRadioMenuItem (RadioMenuItem o) = o
-
-class CheckMenuItemClass o => RadioMenuItemClass o
-toRadioMenuItem :: RadioMenuItemClass o => o -> RadioMenuItem
-toRadioMenuItem = unsafeCastGObject . toGObject
-
-instance RadioMenuItemClass RadioMenuItem
-instance CheckMenuItemClass RadioMenuItem
-instance MenuItemClass RadioMenuItem
-instance ItemClass RadioMenuItem
-instance BinClass RadioMenuItem
-instance ContainerClass RadioMenuItem
-instance WidgetClass RadioMenuItem
-instance ObjectClass RadioMenuItem
-instance GObjectClass RadioMenuItem where
-  toGObject = GObject . castForeignPtr . unRadioMenuItem
-  unsafeCastGObject = RadioMenuItem . castForeignPtr . unGObject
-
-castToRadioMenuItem :: GObjectClass obj => obj -> RadioMenuItem
-castToRadioMenuItem = castTo gTypeRadioMenuItem "RadioMenuItem"
-
-gTypeRadioMenuItem :: GType
-gTypeRadioMenuItem =
-  {# call fun unsafe gtk_radio_menu_item_get_type #}
-
--- ************************************************************ TearoffMenuItem
-
-{#pointer *TearoffMenuItem foreign newtype #} deriving (Eq,Ord)
-
-mkTearoffMenuItem = (TearoffMenuItem, objectUnrefFromMainloop)
-unTearoffMenuItem (TearoffMenuItem o) = o
-
-class MenuItemClass o => TearoffMenuItemClass o
-toTearoffMenuItem :: TearoffMenuItemClass o => o -> TearoffMenuItem
-toTearoffMenuItem = unsafeCastGObject . toGObject
-
-instance TearoffMenuItemClass TearoffMenuItem
-instance MenuItemClass TearoffMenuItem
-instance ItemClass TearoffMenuItem
-instance BinClass TearoffMenuItem
-instance ContainerClass TearoffMenuItem
-instance WidgetClass TearoffMenuItem
-instance ObjectClass TearoffMenuItem
-instance GObjectClass TearoffMenuItem where
-  toGObject = GObject . castForeignPtr . unTearoffMenuItem
-  unsafeCastGObject = TearoffMenuItem . castForeignPtr . unGObject
-
-castToTearoffMenuItem :: GObjectClass obj => obj -> TearoffMenuItem
-castToTearoffMenuItem = castTo gTypeTearoffMenuItem "TearoffMenuItem"
-
-gTypeTearoffMenuItem :: GType
-gTypeTearoffMenuItem =
-  {# call fun unsafe gtk_tearoff_menu_item_get_type #}
-
--- ************************************************************** ImageMenuItem
-
-{#pointer *ImageMenuItem foreign newtype #} deriving (Eq,Ord)
-
-mkImageMenuItem = (ImageMenuItem, objectUnrefFromMainloop)
-unImageMenuItem (ImageMenuItem o) = o
-
-class MenuItemClass o => ImageMenuItemClass o
-toImageMenuItem :: ImageMenuItemClass o => o -> ImageMenuItem
-toImageMenuItem = unsafeCastGObject . toGObject
-
-instance ImageMenuItemClass ImageMenuItem
-instance MenuItemClass ImageMenuItem
-instance ItemClass ImageMenuItem
-instance BinClass ImageMenuItem
-instance ContainerClass ImageMenuItem
-instance WidgetClass ImageMenuItem
-instance ObjectClass ImageMenuItem
-instance GObjectClass ImageMenuItem where
-  toGObject = GObject . castForeignPtr . unImageMenuItem
-  unsafeCastGObject = ImageMenuItem . castForeignPtr . unGObject
-
-castToImageMenuItem :: GObjectClass obj => obj -> ImageMenuItem
-castToImageMenuItem = castTo gTypeImageMenuItem "ImageMenuItem"
-
-gTypeImageMenuItem :: GType
-gTypeImageMenuItem =
-  {# call fun unsafe gtk_image_menu_item_get_type #}
-
--- ********************************************************** SeparatorMenuItem
-
-{#pointer *SeparatorMenuItem foreign newtype #} deriving (Eq,Ord)
-
-mkSeparatorMenuItem = (SeparatorMenuItem, objectUnrefFromMainloop)
-unSeparatorMenuItem (SeparatorMenuItem o) = o
-
-class MenuItemClass o => SeparatorMenuItemClass o
-toSeparatorMenuItem :: SeparatorMenuItemClass o => o -> SeparatorMenuItem
-toSeparatorMenuItem = unsafeCastGObject . toGObject
-
-instance SeparatorMenuItemClass SeparatorMenuItem
-instance MenuItemClass SeparatorMenuItem
-instance ItemClass SeparatorMenuItem
-instance BinClass SeparatorMenuItem
-instance ContainerClass SeparatorMenuItem
-instance WidgetClass SeparatorMenuItem
-instance ObjectClass SeparatorMenuItem
-instance GObjectClass SeparatorMenuItem where
-  toGObject = GObject . castForeignPtr . unSeparatorMenuItem
-  unsafeCastGObject = SeparatorMenuItem . castForeignPtr . unGObject
-
-castToSeparatorMenuItem :: GObjectClass obj => obj -> SeparatorMenuItem
-castToSeparatorMenuItem = castTo gTypeSeparatorMenuItem "SeparatorMenuItem"
-
-gTypeSeparatorMenuItem :: GType
-gTypeSeparatorMenuItem =
-  {# call fun unsafe gtk_separator_menu_item_get_type #}
-
--- ******************************************************************* ListItem
-
-{#pointer *ListItem foreign newtype #} deriving (Eq,Ord)
-
-mkListItem = (ListItem, objectUnrefFromMainloop)
-unListItem (ListItem o) = o
-
-class ItemClass o => ListItemClass o
-toListItem :: ListItemClass o => o -> ListItem
-toListItem = unsafeCastGObject . toGObject
-
-instance ListItemClass ListItem
-instance ItemClass ListItem
-instance BinClass ListItem
-instance ContainerClass ListItem
-instance WidgetClass ListItem
-instance ObjectClass ListItem
-instance GObjectClass ListItem where
-  toGObject = GObject . castForeignPtr . unListItem
-  unsafeCastGObject = ListItem . castForeignPtr . unGObject
-
-castToListItem :: GObjectClass obj => obj -> ListItem
-castToListItem = castTo gTypeListItem "ListItem"
-
-gTypeListItem :: GType
-gTypeListItem =
-  {# call fun unsafe gtk_list_item_get_type #}
-
--- ********************************************************************* Window
-
-{#pointer *Window foreign newtype #} deriving (Eq,Ord)
-
-mkWindow = (Window, objectUnrefFromMainloop)
-unWindow (Window o) = o
-
-class BinClass o => WindowClass o
-toWindow :: WindowClass o => o -> Window
-toWindow = unsafeCastGObject . toGObject
-
-instance WindowClass Window
-instance BinClass Window
-instance ContainerClass Window
-instance WidgetClass Window
-instance ObjectClass Window
-instance GObjectClass Window where
-  toGObject = GObject . castForeignPtr . unWindow
-  unsafeCastGObject = Window . castForeignPtr . unGObject
-
-castToWindow :: GObjectClass obj => obj -> Window
-castToWindow = castTo gTypeWindow "Window"
-
-gTypeWindow :: GType
-gTypeWindow =
-  {# call fun unsafe gtk_window_get_type #}
-
--- ****************************************************************** Assistant
-
-{#pointer *Assistant foreign newtype #} deriving (Eq,Ord)
-
-mkAssistant = (Assistant, objectUnrefFromMainloop)
-unAssistant (Assistant o) = o
-
-class WindowClass o => AssistantClass o
-toAssistant :: AssistantClass o => o -> Assistant
-toAssistant = unsafeCastGObject . toGObject
-
-instance AssistantClass Assistant
-instance WindowClass Assistant
-instance BinClass Assistant
-instance ContainerClass Assistant
-instance WidgetClass Assistant
-instance ObjectClass Assistant
-instance GObjectClass Assistant where
-  toGObject = GObject . castForeignPtr . unAssistant
-  unsafeCastGObject = Assistant . castForeignPtr . unGObject
-
-castToAssistant :: GObjectClass obj => obj -> Assistant
-castToAssistant = castTo gTypeAssistant "Assistant"
-
-gTypeAssistant :: GType
-gTypeAssistant =
-  {# call fun unsafe gtk_assistant_get_type #}
-
--- ************************************************************ OffscreenWindow
-
-{#pointer *OffscreenWindow foreign newtype #} deriving (Eq,Ord)
-
-mkOffscreenWindow = (OffscreenWindow, objectUnrefFromMainloop)
-unOffscreenWindow (OffscreenWindow o) = o
-
-class WindowClass o => OffscreenWindowClass o
-toOffscreenWindow :: OffscreenWindowClass o => o -> OffscreenWindow
-toOffscreenWindow = unsafeCastGObject . toGObject
-
-instance OffscreenWindowClass OffscreenWindow
-instance WindowClass OffscreenWindow
-instance BinClass OffscreenWindow
-instance ContainerClass OffscreenWindow
-instance WidgetClass OffscreenWindow
-instance ObjectClass OffscreenWindow
-instance GObjectClass OffscreenWindow where
-  toGObject = GObject . castForeignPtr . unOffscreenWindow
-  unsafeCastGObject = OffscreenWindow . castForeignPtr . unGObject
-
-castToOffscreenWindow :: GObjectClass obj => obj -> OffscreenWindow
-castToOffscreenWindow = castTo gTypeOffscreenWindow "OffscreenWindow"
-
-gTypeOffscreenWindow :: GType
-gTypeOffscreenWindow =
-  {# call fun unsafe gtk_offscreen_window_get_type #}
-
--- ********************************************************************* Dialog
-
-{#pointer *Dialog foreign newtype #} deriving (Eq,Ord)
-
-mkDialog = (Dialog, objectUnrefFromMainloop)
-unDialog (Dialog o) = o
-
-class WindowClass o => DialogClass o
-toDialog :: DialogClass o => o -> Dialog
-toDialog = unsafeCastGObject . toGObject
-
-instance DialogClass Dialog
-instance WindowClass Dialog
-instance BinClass Dialog
-instance ContainerClass Dialog
-instance WidgetClass Dialog
-instance ObjectClass Dialog
-instance GObjectClass Dialog where
-  toGObject = GObject . castForeignPtr . unDialog
-  unsafeCastGObject = Dialog . castForeignPtr . unGObject
-
-castToDialog :: GObjectClass obj => obj -> Dialog
-castToDialog = castTo gTypeDialog "Dialog"
-
-gTypeDialog :: GType
-gTypeDialog =
-  {# call fun unsafe gtk_dialog_get_type #}
-
--- **************************************************************** AboutDialog
-
-{#pointer *AboutDialog foreign newtype #} deriving (Eq,Ord)
-
-mkAboutDialog = (AboutDialog, objectUnrefFromMainloop)
-unAboutDialog (AboutDialog o) = o
-
-class DialogClass o => AboutDialogClass o
-toAboutDialog :: AboutDialogClass o => o -> AboutDialog
-toAboutDialog = unsafeCastGObject . toGObject
-
-instance AboutDialogClass AboutDialog
-instance DialogClass AboutDialog
-instance WindowClass AboutDialog
-instance BinClass AboutDialog
-instance ContainerClass AboutDialog
-instance WidgetClass AboutDialog
-instance ObjectClass AboutDialog
-instance GObjectClass AboutDialog where
-  toGObject = GObject . castForeignPtr . unAboutDialog
-  unsafeCastGObject = AboutDialog . castForeignPtr . unGObject
-
-castToAboutDialog :: GObjectClass obj => obj -> AboutDialog
-castToAboutDialog = castTo gTypeAboutDialog "AboutDialog"
-
-gTypeAboutDialog :: GType
-gTypeAboutDialog =
-  {# call fun unsafe gtk_about_dialog_get_type #}
-
--- ******************************************************* ColorSelectionDialog
-
-{#pointer *ColorSelectionDialog foreign newtype #} deriving (Eq,Ord)
-
-mkColorSelectionDialog = (ColorSelectionDialog, objectUnrefFromMainloop)
-unColorSelectionDialog (ColorSelectionDialog o) = o
-
-class DialogClass o => ColorSelectionDialogClass o
-toColorSelectionDialog :: ColorSelectionDialogClass o => o -> ColorSelectionDialog
-toColorSelectionDialog = unsafeCastGObject . toGObject
-
-instance ColorSelectionDialogClass ColorSelectionDialog
-instance DialogClass ColorSelectionDialog
-instance WindowClass ColorSelectionDialog
-instance BinClass ColorSelectionDialog
-instance ContainerClass ColorSelectionDialog
-instance WidgetClass ColorSelectionDialog
-instance ObjectClass ColorSelectionDialog
-instance GObjectClass ColorSelectionDialog where
-  toGObject = GObject . castForeignPtr . unColorSelectionDialog
-  unsafeCastGObject = ColorSelectionDialog . castForeignPtr . unGObject
-
-castToColorSelectionDialog :: GObjectClass obj => obj -> ColorSelectionDialog
-castToColorSelectionDialog = castTo gTypeColorSelectionDialog "ColorSelectionDialog"
-
-gTypeColorSelectionDialog :: GType
-gTypeColorSelectionDialog =
-  {# call fun unsafe gtk_color_selection_dialog_get_type #}
-
--- ************************************************************** FileSelection
-
-{#pointer *FileSelection foreign newtype #} deriving (Eq,Ord)
-
-mkFileSelection = (FileSelection, objectUnrefFromMainloop)
-unFileSelection (FileSelection o) = o
-
-class DialogClass o => FileSelectionClass o
-toFileSelection :: FileSelectionClass o => o -> FileSelection
-toFileSelection = unsafeCastGObject . toGObject
-
-instance FileSelectionClass FileSelection
-instance DialogClass FileSelection
-instance WindowClass FileSelection
-instance BinClass FileSelection
-instance ContainerClass FileSelection
-instance WidgetClass FileSelection
-instance ObjectClass FileSelection
-instance GObjectClass FileSelection where
-  toGObject = GObject . castForeignPtr . unFileSelection
-  unsafeCastGObject = FileSelection . castForeignPtr . unGObject
-
-castToFileSelection :: GObjectClass obj => obj -> FileSelection
-castToFileSelection = castTo gTypeFileSelection "FileSelection"
-
-gTypeFileSelection :: GType
-gTypeFileSelection =
-  {# call fun unsafe gtk_file_selection_get_type #}
-
--- ********************************************************** FileChooserDialog
-
-{#pointer *FileChooserDialog foreign newtype #} deriving (Eq,Ord)
-
-mkFileChooserDialog = (FileChooserDialog, objectUnrefFromMainloop)
-unFileChooserDialog (FileChooserDialog o) = o
-
-class DialogClass o => FileChooserDialogClass o
-toFileChooserDialog :: FileChooserDialogClass o => o -> FileChooserDialog
-toFileChooserDialog = unsafeCastGObject . toGObject
-
-instance FileChooserDialogClass FileChooserDialog
-instance DialogClass FileChooserDialog
-instance WindowClass FileChooserDialog
-instance BinClass FileChooserDialog
-instance ContainerClass FileChooserDialog
-instance WidgetClass FileChooserDialog
-instance ObjectClass FileChooserDialog
-instance GObjectClass FileChooserDialog where
-  toGObject = GObject . castForeignPtr . unFileChooserDialog
-  unsafeCastGObject = FileChooserDialog . castForeignPtr . unGObject
-
-castToFileChooserDialog :: GObjectClass obj => obj -> FileChooserDialog
-castToFileChooserDialog = castTo gTypeFileChooserDialog "FileChooserDialog"
-
-gTypeFileChooserDialog :: GType
-gTypeFileChooserDialog =
-  {# call fun unsafe gtk_file_chooser_dialog_get_type #}
-
--- ******************************************************** FontSelectionDialog
-
-{#pointer *FontSelectionDialog foreign newtype #} deriving (Eq,Ord)
-
-mkFontSelectionDialog = (FontSelectionDialog, objectUnrefFromMainloop)
-unFontSelectionDialog (FontSelectionDialog o) = o
-
-class DialogClass o => FontSelectionDialogClass o
-toFontSelectionDialog :: FontSelectionDialogClass o => o -> FontSelectionDialog
-toFontSelectionDialog = unsafeCastGObject . toGObject
-
-instance FontSelectionDialogClass FontSelectionDialog
-instance DialogClass FontSelectionDialog
-instance WindowClass FontSelectionDialog
-instance BinClass FontSelectionDialog
-instance ContainerClass FontSelectionDialog
-instance WidgetClass FontSelectionDialog
-instance ObjectClass FontSelectionDialog
-instance GObjectClass FontSelectionDialog where
-  toGObject = GObject . castForeignPtr . unFontSelectionDialog
-  unsafeCastGObject = FontSelectionDialog . castForeignPtr . unGObject
-
-castToFontSelectionDialog :: GObjectClass obj => obj -> FontSelectionDialog
-castToFontSelectionDialog = castTo gTypeFontSelectionDialog "FontSelectionDialog"
-
-gTypeFontSelectionDialog :: GType
-gTypeFontSelectionDialog =
-  {# call fun unsafe gtk_font_selection_dialog_get_type #}
-
--- **************************************************************** InputDialog
-
-{#pointer *InputDialog foreign newtype #} deriving (Eq,Ord)
-
-mkInputDialog = (InputDialog, objectUnrefFromMainloop)
-unInputDialog (InputDialog o) = o
-
-class DialogClass o => InputDialogClass o
-toInputDialog :: InputDialogClass o => o -> InputDialog
-toInputDialog = unsafeCastGObject . toGObject
-
-instance InputDialogClass InputDialog
-instance DialogClass InputDialog
-instance WindowClass InputDialog
-instance BinClass InputDialog
-instance ContainerClass InputDialog
-instance WidgetClass InputDialog
-instance ObjectClass InputDialog
-instance GObjectClass InputDialog where
-  toGObject = GObject . castForeignPtr . unInputDialog
-  unsafeCastGObject = InputDialog . castForeignPtr . unGObject
-
-castToInputDialog :: GObjectClass obj => obj -> InputDialog
-castToInputDialog = castTo gTypeInputDialog "InputDialog"
-
-gTypeInputDialog :: GType
-gTypeInputDialog =
-  {# call fun unsafe gtk_input_dialog_get_type #}
-
--- ************************************************************** MessageDialog
-
-{#pointer *MessageDialog foreign newtype #} deriving (Eq,Ord)
-
-mkMessageDialog = (MessageDialog, objectUnrefFromMainloop)
-unMessageDialog (MessageDialog o) = o
-
-class DialogClass o => MessageDialogClass o
-toMessageDialog :: MessageDialogClass o => o -> MessageDialog
-toMessageDialog = unsafeCastGObject . toGObject
-
-instance MessageDialogClass MessageDialog
-instance DialogClass MessageDialog
-instance WindowClass MessageDialog
-instance BinClass MessageDialog
-instance ContainerClass MessageDialog
-instance WidgetClass MessageDialog
-instance ObjectClass MessageDialog
-instance GObjectClass MessageDialog where
-  toGObject = GObject . castForeignPtr . unMessageDialog
-  unsafeCastGObject = MessageDialog . castForeignPtr . unGObject
-
-castToMessageDialog :: GObjectClass obj => obj -> MessageDialog
-castToMessageDialog = castTo gTypeMessageDialog "MessageDialog"
-
-gTypeMessageDialog :: GType
-gTypeMessageDialog =
-  {# call fun unsafe gtk_message_dialog_get_type #}
-
--- *********************************************************************** Plug
-
-{#pointer *Plug foreign newtype #} deriving (Eq,Ord)
-
-mkPlug = (Plug, objectUnrefFromMainloop)
-unPlug (Plug o) = o
-
-class WindowClass o => PlugClass o
-toPlug :: PlugClass o => o -> Plug
-toPlug = unsafeCastGObject . toGObject
-
-instance PlugClass Plug
-instance WindowClass Plug
-instance BinClass Plug
-instance ContainerClass Plug
-instance WidgetClass Plug
-instance ObjectClass Plug
-instance GObjectClass Plug where
-  toGObject = GObject . castForeignPtr . unPlug
-  unsafeCastGObject = Plug . castForeignPtr . unGObject
-
-castToPlug :: GObjectClass obj => obj -> Plug
-castToPlug = castTo gTypePlug "Plug"
-
-gTypePlug :: GType
-gTypePlug =
-  {# call fun unsafe gtk_plug_get_type #}
-
--- ******************************************************************* EventBox
-
-{#pointer *EventBox foreign newtype #} deriving (Eq,Ord)
-
-mkEventBox = (EventBox, objectUnrefFromMainloop)
-unEventBox (EventBox o) = o
-
-class BinClass o => EventBoxClass o
-toEventBox :: EventBoxClass o => o -> EventBox
-toEventBox = unsafeCastGObject . toGObject
-
-instance EventBoxClass EventBox
-instance BinClass EventBox
-instance ContainerClass EventBox
-instance WidgetClass EventBox
-instance ObjectClass EventBox
-instance GObjectClass EventBox where
-  toGObject = GObject . castForeignPtr . unEventBox
-  unsafeCastGObject = EventBox . castForeignPtr . unGObject
-
-castToEventBox :: GObjectClass obj => obj -> EventBox
-castToEventBox = castTo gTypeEventBox "EventBox"
-
-gTypeEventBox :: GType
-gTypeEventBox =
-  {# call fun unsafe gtk_event_box_get_type #}
-
--- ****************************************************************** HandleBox
-
-{#pointer *HandleBox foreign newtype #} deriving (Eq,Ord)
-
-mkHandleBox = (HandleBox, objectUnrefFromMainloop)
-unHandleBox (HandleBox o) = o
-
-class BinClass o => HandleBoxClass o
-toHandleBox :: HandleBoxClass o => o -> HandleBox
-toHandleBox = unsafeCastGObject . toGObject
-
-instance HandleBoxClass HandleBox
-instance BinClass HandleBox
-instance ContainerClass HandleBox
-instance WidgetClass HandleBox
-instance ObjectClass HandleBox
-instance GObjectClass HandleBox where
-  toGObject = GObject . castForeignPtr . unHandleBox
-  unsafeCastGObject = HandleBox . castForeignPtr . unGObject
-
-castToHandleBox :: GObjectClass obj => obj -> HandleBox
-castToHandleBox = castTo gTypeHandleBox "HandleBox"
-
-gTypeHandleBox :: GType
-gTypeHandleBox =
-  {# call fun unsafe gtk_handle_box_get_type #}
-
--- ************************************************************* ScrolledWindow
-
-{#pointer *ScrolledWindow foreign newtype #} deriving (Eq,Ord)
-
-mkScrolledWindow = (ScrolledWindow, objectUnrefFromMainloop)
-unScrolledWindow (ScrolledWindow o) = o
-
-class BinClass o => ScrolledWindowClass o
-toScrolledWindow :: ScrolledWindowClass o => o -> ScrolledWindow
-toScrolledWindow = unsafeCastGObject . toGObject
-
-instance ScrolledWindowClass ScrolledWindow
-instance BinClass ScrolledWindow
-instance ContainerClass ScrolledWindow
-instance WidgetClass ScrolledWindow
-instance ObjectClass ScrolledWindow
-instance GObjectClass ScrolledWindow where
-  toGObject = GObject . castForeignPtr . unScrolledWindow
-  unsafeCastGObject = ScrolledWindow . castForeignPtr . unGObject
-
-castToScrolledWindow :: GObjectClass obj => obj -> ScrolledWindow
-castToScrolledWindow = castTo gTypeScrolledWindow "ScrolledWindow"
-
-gTypeScrolledWindow :: GType
-gTypeScrolledWindow =
-  {# call fun unsafe gtk_scrolled_window_get_type #}
-
--- ******************************************************************* Viewport
-
-{#pointer *Viewport foreign newtype #} deriving (Eq,Ord)
-
-mkViewport = (Viewport, objectUnrefFromMainloop)
-unViewport (Viewport o) = o
-
-class BinClass o => ViewportClass o
-toViewport :: ViewportClass o => o -> Viewport
-toViewport = unsafeCastGObject . toGObject
-
-instance ViewportClass Viewport
-instance BinClass Viewport
-instance ContainerClass Viewport
-instance WidgetClass Viewport
-instance ObjectClass Viewport
-instance GObjectClass Viewport where
-  toGObject = GObject . castForeignPtr . unViewport
-  unsafeCastGObject = Viewport . castForeignPtr . unGObject
-
-castToViewport :: GObjectClass obj => obj -> Viewport
-castToViewport = castTo gTypeViewport "Viewport"
-
-gTypeViewport :: GType
-gTypeViewport =
-  {# call fun unsafe gtk_viewport_get_type #}
-
--- ******************************************************************* Expander
-
-{#pointer *Expander foreign newtype #} deriving (Eq,Ord)
-
-mkExpander = (Expander, objectUnrefFromMainloop)
-unExpander (Expander o) = o
-
-class BinClass o => ExpanderClass o
-toExpander :: ExpanderClass o => o -> Expander
-toExpander = unsafeCastGObject . toGObject
-
-instance ExpanderClass Expander
-instance BinClass Expander
-instance ContainerClass Expander
-instance WidgetClass Expander
-instance ObjectClass Expander
-instance GObjectClass Expander where
-  toGObject = GObject . castForeignPtr . unExpander
-  unsafeCastGObject = Expander . castForeignPtr . unGObject
-
-castToExpander :: GObjectClass obj => obj -> Expander
-castToExpander = castTo gTypeExpander "Expander"
-
-gTypeExpander :: GType
-gTypeExpander =
-  {# call fun unsafe gtk_expander_get_type #}
-
--- ******************************************************************* ComboBox
-
-{#pointer *ComboBox foreign newtype #} deriving (Eq,Ord)
-
-mkComboBox = (ComboBox, objectUnrefFromMainloop)
-unComboBox (ComboBox o) = o
-
-class BinClass o => ComboBoxClass o
-toComboBox :: ComboBoxClass o => o -> ComboBox
-toComboBox = unsafeCastGObject . toGObject
-
-instance ComboBoxClass ComboBox
-instance BinClass ComboBox
-instance ContainerClass ComboBox
-instance WidgetClass ComboBox
-instance ObjectClass ComboBox
-instance GObjectClass ComboBox where
-  toGObject = GObject . castForeignPtr . unComboBox
-  unsafeCastGObject = ComboBox . castForeignPtr . unGObject
-
-castToComboBox :: GObjectClass obj => obj -> ComboBox
-castToComboBox = castTo gTypeComboBox "ComboBox"
-
-gTypeComboBox :: GType
-gTypeComboBox =
-  {# call fun unsafe gtk_combo_box_get_type #}
-
--- ************************************************************** ComboBoxEntry
-
-{#pointer *ComboBoxEntry foreign newtype #} deriving (Eq,Ord)
-
-mkComboBoxEntry = (ComboBoxEntry, objectUnrefFromMainloop)
-unComboBoxEntry (ComboBoxEntry o) = o
-
-class ComboBoxClass o => ComboBoxEntryClass o
-toComboBoxEntry :: ComboBoxEntryClass o => o -> ComboBoxEntry
-toComboBoxEntry = unsafeCastGObject . toGObject
-
-instance ComboBoxEntryClass ComboBoxEntry
-instance ComboBoxClass ComboBoxEntry
-instance BinClass ComboBoxEntry
-instance ContainerClass ComboBoxEntry
-instance WidgetClass ComboBoxEntry
-instance ObjectClass ComboBoxEntry
-instance GObjectClass ComboBoxEntry where
-  toGObject = GObject . castForeignPtr . unComboBoxEntry
-  unsafeCastGObject = ComboBoxEntry . castForeignPtr . unGObject
-
-castToComboBoxEntry :: GObjectClass obj => obj -> ComboBoxEntry
-castToComboBoxEntry = castTo gTypeComboBoxEntry "ComboBoxEntry"
-
-gTypeComboBoxEntry :: GType
-gTypeComboBoxEntry =
-  {# call fun unsafe gtk_combo_box_entry_get_type #}
-
--- ******************************************************************* ToolItem
-
-{#pointer *ToolItem foreign newtype #} deriving (Eq,Ord)
-
-mkToolItem = (ToolItem, objectUnrefFromMainloop)
-unToolItem (ToolItem o) = o
-
-class BinClass o => ToolItemClass o
-toToolItem :: ToolItemClass o => o -> ToolItem
-toToolItem = unsafeCastGObject . toGObject
-
-instance ToolItemClass ToolItem
-instance BinClass ToolItem
-instance ContainerClass ToolItem
-instance WidgetClass ToolItem
-instance ObjectClass ToolItem
-instance GObjectClass ToolItem where
-  toGObject = GObject . castForeignPtr . unToolItem
-  unsafeCastGObject = ToolItem . castForeignPtr . unGObject
-
-castToToolItem :: GObjectClass obj => obj -> ToolItem
-castToToolItem = castTo gTypeToolItem "ToolItem"
-
-gTypeToolItem :: GType
-gTypeToolItem =
-  {# call fun unsafe gtk_tool_item_get_type #}
-
--- ***************************************************************** ToolButton
-
-{#pointer *ToolButton foreign newtype #} deriving (Eq,Ord)
-
-mkToolButton = (ToolButton, objectUnrefFromMainloop)
-unToolButton (ToolButton o) = o
-
-class ToolItemClass o => ToolButtonClass o
-toToolButton :: ToolButtonClass o => o -> ToolButton
-toToolButton = unsafeCastGObject . toGObject
-
-instance ToolButtonClass ToolButton
-instance ToolItemClass ToolButton
-instance BinClass ToolButton
-instance ContainerClass ToolButton
-instance WidgetClass ToolButton
-instance ObjectClass ToolButton
-instance GObjectClass ToolButton where
-  toGObject = GObject . castForeignPtr . unToolButton
-  unsafeCastGObject = ToolButton . castForeignPtr . unGObject
-
-castToToolButton :: GObjectClass obj => obj -> ToolButton
-castToToolButton = castTo gTypeToolButton "ToolButton"
-
-gTypeToolButton :: GType
-gTypeToolButton =
-  {# call fun unsafe gtk_tool_button_get_type #}
-
--- ************************************************************* MenuToolButton
-
-{#pointer *MenuToolButton foreign newtype #} deriving (Eq,Ord)
-
-mkMenuToolButton = (MenuToolButton, objectUnrefFromMainloop)
-unMenuToolButton (MenuToolButton o) = o
-
-class ToolButtonClass o => MenuToolButtonClass o
-toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButton
-toMenuToolButton = unsafeCastGObject . toGObject
-
-instance MenuToolButtonClass MenuToolButton
-instance ToolButtonClass MenuToolButton
-instance ToolItemClass MenuToolButton
-instance BinClass MenuToolButton
-instance ContainerClass MenuToolButton
-instance WidgetClass MenuToolButton
-instance ObjectClass MenuToolButton
-instance GObjectClass MenuToolButton where
-  toGObject = GObject . castForeignPtr . unMenuToolButton
-  unsafeCastGObject = MenuToolButton . castForeignPtr . unGObject
-
-castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButton
-castToMenuToolButton = castTo gTypeMenuToolButton "MenuToolButton"
-
-gTypeMenuToolButton :: GType
-gTypeMenuToolButton =
-  {# call fun unsafe gtk_menu_tool_button_get_type #}
-
--- *********************************************************** ToggleToolButton
-
-{#pointer *ToggleToolButton foreign newtype #} deriving (Eq,Ord)
-
-mkToggleToolButton = (ToggleToolButton, objectUnrefFromMainloop)
-unToggleToolButton (ToggleToolButton o) = o
-
-class ToolButtonClass o => ToggleToolButtonClass o
-toToggleToolButton :: ToggleToolButtonClass o => o -> ToggleToolButton
-toToggleToolButton = unsafeCastGObject . toGObject
-
-instance ToggleToolButtonClass ToggleToolButton
-instance ToolButtonClass ToggleToolButton
-instance ToolItemClass ToggleToolButton
-instance BinClass ToggleToolButton
-instance ContainerClass ToggleToolButton
-instance WidgetClass ToggleToolButton
-instance ObjectClass ToggleToolButton
-instance GObjectClass ToggleToolButton where
-  toGObject = GObject . castForeignPtr . unToggleToolButton
-  unsafeCastGObject = ToggleToolButton . castForeignPtr . unGObject
-
-castToToggleToolButton :: GObjectClass obj => obj -> ToggleToolButton
-castToToggleToolButton = castTo gTypeToggleToolButton "ToggleToolButton"
-
-gTypeToggleToolButton :: GType
-gTypeToggleToolButton =
-  {# call fun unsafe gtk_toggle_tool_button_get_type #}
-
--- ************************************************************ RadioToolButton
-
-{#pointer *RadioToolButton foreign newtype #} deriving (Eq,Ord)
-
-mkRadioToolButton = (RadioToolButton, objectUnrefFromMainloop)
-unRadioToolButton (RadioToolButton o) = o
-
-class ToggleToolButtonClass o => RadioToolButtonClass o
-toRadioToolButton :: RadioToolButtonClass o => o -> RadioToolButton
-toRadioToolButton = unsafeCastGObject . toGObject
-
-instance RadioToolButtonClass RadioToolButton
-instance ToggleToolButtonClass RadioToolButton
-instance ToolButtonClass RadioToolButton
-instance ToolItemClass RadioToolButton
-instance BinClass RadioToolButton
-instance ContainerClass RadioToolButton
-instance WidgetClass RadioToolButton
-instance ObjectClass RadioToolButton
-instance GObjectClass RadioToolButton where
-  toGObject = GObject . castForeignPtr . unRadioToolButton
-  unsafeCastGObject = RadioToolButton . castForeignPtr . unGObject
-
-castToRadioToolButton :: GObjectClass obj => obj -> RadioToolButton
-castToRadioToolButton = castTo gTypeRadioToolButton "RadioToolButton"
-
-gTypeRadioToolButton :: GType
-gTypeRadioToolButton =
-  {# call fun unsafe gtk_radio_tool_button_get_type #}
-
--- ********************************************************** SeparatorToolItem
-
-{#pointer *SeparatorToolItem foreign newtype #} deriving (Eq,Ord)
-
-mkSeparatorToolItem = (SeparatorToolItem, objectUnrefFromMainloop)
-unSeparatorToolItem (SeparatorToolItem o) = o
-
-class ToolItemClass o => SeparatorToolItemClass o
-toSeparatorToolItem :: SeparatorToolItemClass o => o -> SeparatorToolItem
-toSeparatorToolItem = unsafeCastGObject . toGObject
-
-instance SeparatorToolItemClass SeparatorToolItem
-instance ToolItemClass SeparatorToolItem
-instance BinClass SeparatorToolItem
-instance ContainerClass SeparatorToolItem
-instance WidgetClass SeparatorToolItem
-instance ObjectClass SeparatorToolItem
-instance GObjectClass SeparatorToolItem where
-  toGObject = GObject . castForeignPtr . unSeparatorToolItem
-  unsafeCastGObject = SeparatorToolItem . castForeignPtr . unGObject
-
-castToSeparatorToolItem :: GObjectClass obj => obj -> SeparatorToolItem
-castToSeparatorToolItem = castTo gTypeSeparatorToolItem "SeparatorToolItem"
-
-gTypeSeparatorToolItem :: GType
-gTypeSeparatorToolItem =
-  {# call fun unsafe gtk_separator_tool_item_get_type #}
-
--- ************************************************************************ Box
-
-{#pointer *Box foreign newtype #} deriving (Eq,Ord)
-
-mkBox = (Box, objectUnrefFromMainloop)
-unBox (Box o) = o
-
-class ContainerClass o => BoxClass o
-toBox :: BoxClass o => o -> Box
-toBox = unsafeCastGObject . toGObject
-
-instance BoxClass Box
-instance ContainerClass Box
-instance WidgetClass Box
-instance ObjectClass Box
-instance GObjectClass Box where
-  toGObject = GObject . castForeignPtr . unBox
-  unsafeCastGObject = Box . castForeignPtr . unGObject
-
-castToBox :: GObjectClass obj => obj -> Box
-castToBox = castTo gTypeBox "Box"
-
-gTypeBox :: GType
-gTypeBox =
-  {# call fun unsafe gtk_box_get_type #}
-
--- ****************************************************************** ButtonBox
-
-{#pointer *ButtonBox foreign newtype #} deriving (Eq,Ord)
-
-mkButtonBox = (ButtonBox, objectUnrefFromMainloop)
-unButtonBox (ButtonBox o) = o
-
-class BoxClass o => ButtonBoxClass o
-toButtonBox :: ButtonBoxClass o => o -> ButtonBox
-toButtonBox = unsafeCastGObject . toGObject
-
-instance ButtonBoxClass ButtonBox
-instance BoxClass ButtonBox
-instance ContainerClass ButtonBox
-instance WidgetClass ButtonBox
-instance ObjectClass ButtonBox
-instance GObjectClass ButtonBox where
-  toGObject = GObject . castForeignPtr . unButtonBox
-  unsafeCastGObject = ButtonBox . castForeignPtr . unGObject
-
-castToButtonBox :: GObjectClass obj => obj -> ButtonBox
-castToButtonBox = castTo gTypeButtonBox "ButtonBox"
-
-gTypeButtonBox :: GType
-gTypeButtonBox =
-  {# call fun unsafe gtk_button_box_get_type #}
-
--- ***************************************************************** HButtonBox
-
-{#pointer *HButtonBox foreign newtype #} deriving (Eq,Ord)
-
-mkHButtonBox = (HButtonBox, objectUnrefFromMainloop)
-unHButtonBox (HButtonBox o) = o
-
-class ButtonBoxClass o => HButtonBoxClass o
-toHButtonBox :: HButtonBoxClass o => o -> HButtonBox
-toHButtonBox = unsafeCastGObject . toGObject
-
-instance HButtonBoxClass HButtonBox
-instance ButtonBoxClass HButtonBox
-instance BoxClass HButtonBox
-instance ContainerClass HButtonBox
-instance WidgetClass HButtonBox
-instance ObjectClass HButtonBox
-instance GObjectClass HButtonBox where
-  toGObject = GObject . castForeignPtr . unHButtonBox
-  unsafeCastGObject = HButtonBox . castForeignPtr . unGObject
-
-castToHButtonBox :: GObjectClass obj => obj -> HButtonBox
-castToHButtonBox = castTo gTypeHButtonBox "HButtonBox"
-
-gTypeHButtonBox :: GType
-gTypeHButtonBox =
-  {# call fun unsafe gtk_hbutton_box_get_type #}
-
--- ***************************************************************** VButtonBox
-
-{#pointer *VButtonBox foreign newtype #} deriving (Eq,Ord)
-
-mkVButtonBox = (VButtonBox, objectUnrefFromMainloop)
-unVButtonBox (VButtonBox o) = o
-
-class ButtonBoxClass o => VButtonBoxClass o
-toVButtonBox :: VButtonBoxClass o => o -> VButtonBox
-toVButtonBox = unsafeCastGObject . toGObject
-
-instance VButtonBoxClass VButtonBox
-instance ButtonBoxClass VButtonBox
-instance BoxClass VButtonBox
-instance ContainerClass VButtonBox
-instance WidgetClass VButtonBox
-instance ObjectClass VButtonBox
-instance GObjectClass VButtonBox where
-  toGObject = GObject . castForeignPtr . unVButtonBox
-  unsafeCastGObject = VButtonBox . castForeignPtr . unGObject
-
-castToVButtonBox :: GObjectClass obj => obj -> VButtonBox
-castToVButtonBox = castTo gTypeVButtonBox "VButtonBox"
-
-gTypeVButtonBox :: GType
-gTypeVButtonBox =
-  {# call fun unsafe gtk_vbutton_box_get_type #}
-
--- *********************************************************************** VBox
-
-{#pointer *VBox foreign newtype #} deriving (Eq,Ord)
-
-mkVBox = (VBox, objectUnrefFromMainloop)
-unVBox (VBox o) = o
-
-class BoxClass o => VBoxClass o
-toVBox :: VBoxClass o => o -> VBox
-toVBox = unsafeCastGObject . toGObject
-
-instance VBoxClass VBox
-instance BoxClass VBox
-instance ContainerClass VBox
-instance WidgetClass VBox
-instance ObjectClass VBox
-instance GObjectClass VBox where
-  toGObject = GObject . castForeignPtr . unVBox
-  unsafeCastGObject = VBox . castForeignPtr . unGObject
-
-castToVBox :: GObjectClass obj => obj -> VBox
-castToVBox = castTo gTypeVBox "VBox"
-
-gTypeVBox :: GType
-gTypeVBox =
-  {# call fun unsafe gtk_vbox_get_type #}
-
--- ******************************************************** RecentChooserWidget
-
-{#pointer *RecentChooserWidget foreign newtype #} deriving (Eq,Ord)
-
-mkRecentChooserWidget = (RecentChooserWidget, objectUnrefFromMainloop)
-unRecentChooserWidget (RecentChooserWidget o) = o
-
-class VBoxClass o => RecentChooserWidgetClass o
-toRecentChooserWidget :: RecentChooserWidgetClass o => o -> RecentChooserWidget
-toRecentChooserWidget = unsafeCastGObject . toGObject
-
-instance RecentChooserWidgetClass RecentChooserWidget
-instance VBoxClass RecentChooserWidget
-instance BoxClass RecentChooserWidget
-instance ContainerClass RecentChooserWidget
-instance WidgetClass RecentChooserWidget
-instance ObjectClass RecentChooserWidget
-instance GObjectClass RecentChooserWidget where
-  toGObject = GObject . castForeignPtr . unRecentChooserWidget
-  unsafeCastGObject = RecentChooserWidget . castForeignPtr . unGObject
-
-castToRecentChooserWidget :: GObjectClass obj => obj -> RecentChooserWidget
-castToRecentChooserWidget = castTo gTypeRecentChooserWidget "RecentChooserWidget"
-
-gTypeRecentChooserWidget :: GType
-gTypeRecentChooserWidget =
-  {# call fun unsafe gtk_recent_chooser_widget_get_type #}
-
--- ************************************************************* ColorSelection
-
-{#pointer *ColorSelection foreign newtype #} deriving (Eq,Ord)
-
-mkColorSelection = (ColorSelection, objectUnrefFromMainloop)
-unColorSelection (ColorSelection o) = o
-
-class VBoxClass o => ColorSelectionClass o
-toColorSelection :: ColorSelectionClass o => o -> ColorSelection
-toColorSelection = unsafeCastGObject . toGObject
-
-instance ColorSelectionClass ColorSelection
-instance VBoxClass ColorSelection
-instance BoxClass ColorSelection
-instance ContainerClass ColorSelection
-instance WidgetClass ColorSelection
-instance ObjectClass ColorSelection
-instance GObjectClass ColorSelection where
-  toGObject = GObject . castForeignPtr . unColorSelection
-  unsafeCastGObject = ColorSelection . castForeignPtr . unGObject
-
-castToColorSelection :: GObjectClass obj => obj -> ColorSelection
-castToColorSelection = castTo gTypeColorSelection "ColorSelection"
-
-gTypeColorSelection :: GType
-gTypeColorSelection =
-  {# call fun unsafe gtk_color_selection_get_type #}
-
--- ************************************************************** FontSelection
-
-{#pointer *FontSelection foreign newtype #} deriving (Eq,Ord)
-
-mkFontSelection = (FontSelection, objectUnrefFromMainloop)
-unFontSelection (FontSelection o) = o
-
-class VBoxClass o => FontSelectionClass o
-toFontSelection :: FontSelectionClass o => o -> FontSelection
-toFontSelection = unsafeCastGObject . toGObject
-
-instance FontSelectionClass FontSelection
-instance VBoxClass FontSelection
-instance BoxClass FontSelection
-instance ContainerClass FontSelection
-instance WidgetClass FontSelection
-instance ObjectClass FontSelection
-instance GObjectClass FontSelection where
-  toGObject = GObject . castForeignPtr . unFontSelection
-  unsafeCastGObject = FontSelection . castForeignPtr . unGObject
-
-castToFontSelection :: GObjectClass obj => obj -> FontSelection
-castToFontSelection = castTo gTypeFontSelection "FontSelection"
-
-gTypeFontSelection :: GType
-gTypeFontSelection =
-  {# call fun unsafe gtk_font_selection_get_type #}
-
--- ********************************************************** FileChooserWidget
-
-{#pointer *FileChooserWidget foreign newtype #} deriving (Eq,Ord)
-
-mkFileChooserWidget = (FileChooserWidget, objectUnrefFromMainloop)
-unFileChooserWidget (FileChooserWidget o) = o
-
-class VBoxClass o => FileChooserWidgetClass o
-toFileChooserWidget :: FileChooserWidgetClass o => o -> FileChooserWidget
-toFileChooserWidget = unsafeCastGObject . toGObject
-
-instance FileChooserWidgetClass FileChooserWidget
-instance VBoxClass FileChooserWidget
-instance BoxClass FileChooserWidget
-instance ContainerClass FileChooserWidget
-instance WidgetClass FileChooserWidget
-instance ObjectClass FileChooserWidget
-instance GObjectClass FileChooserWidget where
-  toGObject = GObject . castForeignPtr . unFileChooserWidget
-  unsafeCastGObject = FileChooserWidget . castForeignPtr . unGObject
-
-castToFileChooserWidget :: GObjectClass obj => obj -> FileChooserWidget
-castToFileChooserWidget = castTo gTypeFileChooserWidget "FileChooserWidget"
-
-gTypeFileChooserWidget :: GType
-gTypeFileChooserWidget =
-  {# call fun unsafe gtk_file_chooser_widget_get_type #}
-
--- *********************************************************************** HBox
-
-{#pointer *HBox foreign newtype #} deriving (Eq,Ord)
-
-mkHBox = (HBox, objectUnrefFromMainloop)
-unHBox (HBox o) = o
-
-class BoxClass o => HBoxClass o
-toHBox :: HBoxClass o => o -> HBox
-toHBox = unsafeCastGObject . toGObject
-
-instance HBoxClass HBox
-instance BoxClass HBox
-instance ContainerClass HBox
-instance WidgetClass HBox
-instance ObjectClass HBox
-instance GObjectClass HBox where
-  toGObject = GObject . castForeignPtr . unHBox
-  unsafeCastGObject = HBox . castForeignPtr . unGObject
-
-castToHBox :: GObjectClass obj => obj -> HBox
-castToHBox = castTo gTypeHBox "HBox"
-
-gTypeHBox :: GType
-gTypeHBox =
-  {# call fun unsafe gtk_hbox_get_type #}
-
--- ******************************************************************** InfoBar
-
-{#pointer *InfoBar foreign newtype #} deriving (Eq,Ord)
-
-mkInfoBar = (InfoBar, objectUnrefFromMainloop)
-unInfoBar (InfoBar o) = o
-
-class HBoxClass o => InfoBarClass o
-toInfoBar :: InfoBarClass o => o -> InfoBar
-toInfoBar = unsafeCastGObject . toGObject
-
-instance InfoBarClass InfoBar
-instance HBoxClass InfoBar
-instance BoxClass InfoBar
-instance ContainerClass InfoBar
-instance WidgetClass InfoBar
-instance ObjectClass InfoBar
-instance GObjectClass InfoBar where
-  toGObject = GObject . castForeignPtr . unInfoBar
-  unsafeCastGObject = InfoBar . castForeignPtr . unGObject
-
-castToInfoBar :: GObjectClass obj => obj -> InfoBar
-castToInfoBar = castTo gTypeInfoBar "InfoBar"
-
-gTypeInfoBar :: GType
-gTypeInfoBar =
-  {# call fun unsafe gtk_info_bar_get_type #}
-
--- ********************************************************************** Combo
-
-{#pointer *Combo foreign newtype #} deriving (Eq,Ord)
-
-mkCombo = (Combo, objectUnrefFromMainloop)
-unCombo (Combo o) = o
-
-class HBoxClass o => ComboClass o
-toCombo :: ComboClass o => o -> Combo
-toCombo = unsafeCastGObject . toGObject
-
-instance ComboClass Combo
-instance HBoxClass Combo
-instance BoxClass Combo
-instance ContainerClass Combo
-instance WidgetClass Combo
-instance ObjectClass Combo
-instance GObjectClass Combo where
-  toGObject = GObject . castForeignPtr . unCombo
-  unsafeCastGObject = Combo . castForeignPtr . unGObject
-
-castToCombo :: GObjectClass obj => obj -> Combo
-castToCombo = castTo gTypeCombo "Combo"
-
-gTypeCombo :: GType
-gTypeCombo =
-  {# call fun unsafe gtk_combo_get_type #}
-
--- ********************************************************** FileChooserButton
-
-{#pointer *FileChooserButton foreign newtype #} deriving (Eq,Ord)
-
-mkFileChooserButton = (FileChooserButton, objectUnrefFromMainloop)
-unFileChooserButton (FileChooserButton o) = o
-
-class HBoxClass o => FileChooserButtonClass o
-toFileChooserButton :: FileChooserButtonClass o => o -> FileChooserButton
-toFileChooserButton = unsafeCastGObject . toGObject
-
-instance FileChooserButtonClass FileChooserButton
-instance HBoxClass FileChooserButton
-instance BoxClass FileChooserButton
-instance ContainerClass FileChooserButton
-instance WidgetClass FileChooserButton
-instance ObjectClass FileChooserButton
-instance GObjectClass FileChooserButton where
-  toGObject = GObject . castForeignPtr . unFileChooserButton
-  unsafeCastGObject = FileChooserButton . castForeignPtr . unGObject
-
-castToFileChooserButton :: GObjectClass obj => obj -> FileChooserButton
-castToFileChooserButton = castTo gTypeFileChooserButton "FileChooserButton"
-
-gTypeFileChooserButton :: GType
-gTypeFileChooserButton =
-  {# call fun unsafe gtk_file_chooser_button_get_type #}
-
--- ****************************************************************** Statusbar
-
-{#pointer *Statusbar foreign newtype #} deriving (Eq,Ord)
-
-mkStatusbar = (Statusbar, objectUnrefFromMainloop)
-unStatusbar (Statusbar o) = o
-
-class HBoxClass o => StatusbarClass o
-toStatusbar :: StatusbarClass o => o -> Statusbar
-toStatusbar = unsafeCastGObject . toGObject
-
-instance StatusbarClass Statusbar
-instance HBoxClass Statusbar
-instance BoxClass Statusbar
-instance ContainerClass Statusbar
-instance WidgetClass Statusbar
-instance ObjectClass Statusbar
-instance GObjectClass Statusbar where
-  toGObject = GObject . castForeignPtr . unStatusbar
-  unsafeCastGObject = Statusbar . castForeignPtr . unGObject
-
-castToStatusbar :: GObjectClass obj => obj -> Statusbar
-castToStatusbar = castTo gTypeStatusbar "Statusbar"
-
-gTypeStatusbar :: GType
-gTypeStatusbar =
-  {# call fun unsafe gtk_statusbar_get_type #}
-
--- ********************************************************************** CList
-
-{#pointer *CList foreign newtype #} deriving (Eq,Ord)
-
-mkCList = (CList, objectUnrefFromMainloop)
-unCList (CList o) = o
-
-class ContainerClass o => CListClass o
-toCList :: CListClass o => o -> CList
-toCList = unsafeCastGObject . toGObject
-
-instance CListClass CList
-instance ContainerClass CList
-instance WidgetClass CList
-instance ObjectClass CList
-instance GObjectClass CList where
-  toGObject = GObject . castForeignPtr . unCList
-  unsafeCastGObject = CList . castForeignPtr . unGObject
-
-castToCList :: GObjectClass obj => obj -> CList
-castToCList = castTo gTypeCList "CList"
-
-gTypeCList :: GType
-gTypeCList =
-  {# call fun unsafe gtk_clist_get_type #}
-
--- ********************************************************************** CTree
-
-{#pointer *CTree foreign newtype #} deriving (Eq,Ord)
-
-mkCTree = (CTree, objectUnrefFromMainloop)
-unCTree (CTree o) = o
-
-class CListClass o => CTreeClass o
-toCTree :: CTreeClass o => o -> CTree
-toCTree = unsafeCastGObject . toGObject
-
-instance CTreeClass CTree
-instance CListClass CTree
-instance ContainerClass CTree
-instance WidgetClass CTree
-instance ObjectClass CTree
-instance GObjectClass CTree where
-  toGObject = GObject . castForeignPtr . unCTree
-  unsafeCastGObject = CTree . castForeignPtr . unGObject
-
-castToCTree :: GObjectClass obj => obj -> CTree
-castToCTree = castTo gTypeCTree "CTree"
-
-gTypeCTree :: GType
-gTypeCTree =
-  {# call fun unsafe gtk_ctree_get_type #}
-
--- ********************************************************************** Fixed
-
-{#pointer *Fixed foreign newtype #} deriving (Eq,Ord)
-
-mkFixed = (Fixed, objectUnrefFromMainloop)
-unFixed (Fixed o) = o
-
-class ContainerClass o => FixedClass o
-toFixed :: FixedClass o => o -> Fixed
-toFixed = unsafeCastGObject . toGObject
-
-instance FixedClass Fixed
-instance ContainerClass Fixed
-instance WidgetClass Fixed
-instance ObjectClass Fixed
-instance GObjectClass Fixed where
-  toGObject = GObject . castForeignPtr . unFixed
-  unsafeCastGObject = Fixed . castForeignPtr . unGObject
-
-castToFixed :: GObjectClass obj => obj -> Fixed
-castToFixed = castTo gTypeFixed "Fixed"
-
-gTypeFixed :: GType
-gTypeFixed =
-  {# call fun unsafe gtk_fixed_get_type #}
-
--- ********************************************************************** Paned
-
-{#pointer *Paned foreign newtype #} deriving (Eq,Ord)
-
-mkPaned = (Paned, objectUnrefFromMainloop)
-unPaned (Paned o) = o
-
-class ContainerClass o => PanedClass o
-toPaned :: PanedClass o => o -> Paned
-toPaned = unsafeCastGObject . toGObject
-
-instance PanedClass Paned
-instance ContainerClass Paned
-instance WidgetClass Paned
-instance ObjectClass Paned
-instance GObjectClass Paned where
-  toGObject = GObject . castForeignPtr . unPaned
-  unsafeCastGObject = Paned . castForeignPtr . unGObject
-
-castToPaned :: GObjectClass obj => obj -> Paned
-castToPaned = castTo gTypePaned "Paned"
-
-gTypePaned :: GType
-gTypePaned =
-  {# call fun unsafe gtk_paned_get_type #}
-
--- ********************************************************************* HPaned
-
-{#pointer *HPaned foreign newtype #} deriving (Eq,Ord)
-
-mkHPaned = (HPaned, objectUnrefFromMainloop)
-unHPaned (HPaned o) = o
-
-class PanedClass o => HPanedClass o
-toHPaned :: HPanedClass o => o -> HPaned
-toHPaned = unsafeCastGObject . toGObject
-
-instance HPanedClass HPaned
-instance PanedClass HPaned
-instance ContainerClass HPaned
-instance WidgetClass HPaned
-instance ObjectClass HPaned
-instance GObjectClass HPaned where
-  toGObject = GObject . castForeignPtr . unHPaned
-  unsafeCastGObject = HPaned . castForeignPtr . unGObject
-
-castToHPaned :: GObjectClass obj => obj -> HPaned
-castToHPaned = castTo gTypeHPaned "HPaned"
-
-gTypeHPaned :: GType
-gTypeHPaned =
-  {# call fun unsafe gtk_hpaned_get_type #}
-
--- ********************************************************************* VPaned
-
-{#pointer *VPaned foreign newtype #} deriving (Eq,Ord)
-
-mkVPaned = (VPaned, objectUnrefFromMainloop)
-unVPaned (VPaned o) = o
-
-class PanedClass o => VPanedClass o
-toVPaned :: VPanedClass o => o -> VPaned
-toVPaned = unsafeCastGObject . toGObject
-
-instance VPanedClass VPaned
-instance PanedClass VPaned
-instance ContainerClass VPaned
-instance WidgetClass VPaned
-instance ObjectClass VPaned
-instance GObjectClass VPaned where
-  toGObject = GObject . castForeignPtr . unVPaned
-  unsafeCastGObject = VPaned . castForeignPtr . unGObject
-
-castToVPaned :: GObjectClass obj => obj -> VPaned
-castToVPaned = castTo gTypeVPaned "VPaned"
-
-gTypeVPaned :: GType
-gTypeVPaned =
-  {# call fun unsafe gtk_vpaned_get_type #}
-
--- ******************************************************************* IconView
-
-{#pointer *IconView foreign newtype #} deriving (Eq,Ord)
-
-mkIconView = (IconView, objectUnrefFromMainloop)
-unIconView (IconView o) = o
-
-class ContainerClass o => IconViewClass o
-toIconView :: IconViewClass o => o -> IconView
-toIconView = unsafeCastGObject . toGObject
-
-instance IconViewClass IconView
-instance ContainerClass IconView
-instance WidgetClass IconView
-instance ObjectClass IconView
-instance GObjectClass IconView where
-  toGObject = GObject . castForeignPtr . unIconView
-  unsafeCastGObject = IconView . castForeignPtr . unGObject
-
-castToIconView :: GObjectClass obj => obj -> IconView
-castToIconView = castTo gTypeIconView "IconView"
-
-gTypeIconView :: GType
-gTypeIconView =
-  {# call fun unsafe gtk_icon_view_get_type #}
-
--- ********************************************************************* Layout
-
-{#pointer *Layout foreign newtype #} deriving (Eq,Ord)
-
-mkLayout = (Layout, objectUnrefFromMainloop)
-unLayout (Layout o) = o
-
-class ContainerClass o => LayoutClass o
-toLayout :: LayoutClass o => o -> Layout
-toLayout = unsafeCastGObject . toGObject
-
-instance LayoutClass Layout
-instance ContainerClass Layout
-instance WidgetClass Layout
-instance ObjectClass Layout
-instance GObjectClass Layout where
-  toGObject = GObject . castForeignPtr . unLayout
-  unsafeCastGObject = Layout . castForeignPtr . unGObject
-
-castToLayout :: GObjectClass obj => obj -> Layout
-castToLayout = castTo gTypeLayout "Layout"
-
-gTypeLayout :: GType
-gTypeLayout =
-  {# call fun unsafe gtk_layout_get_type #}
-
--- *********************************************************************** List
-
-{#pointer *List foreign newtype #} deriving (Eq,Ord)
-
-mkList = (List, objectUnrefFromMainloop)
-unList (List o) = o
-
-class ContainerClass o => ListClass o
-toList :: ListClass o => o -> List
-toList = unsafeCastGObject . toGObject
-
-instance ListClass List
-instance ContainerClass List
-instance WidgetClass List
-instance ObjectClass List
-instance GObjectClass List where
-  toGObject = GObject . castForeignPtr . unList
-  unsafeCastGObject = List . castForeignPtr . unGObject
-
-castToList :: GObjectClass obj => obj -> List
-castToList = castTo gTypeList "List"
-
-gTypeList :: GType
-gTypeList =
-  {# call fun unsafe gtk_list_get_type #}
-
--- ****************************************************************** MenuShell
-
-{#pointer *MenuShell foreign newtype #} deriving (Eq,Ord)
-
-mkMenuShell = (MenuShell, objectUnrefFromMainloop)
-unMenuShell (MenuShell o) = o
-
-class ContainerClass o => MenuShellClass o
-toMenuShell :: MenuShellClass o => o -> MenuShell
-toMenuShell = unsafeCastGObject . toGObject
-
-instance MenuShellClass MenuShell
-instance ContainerClass MenuShell
-instance WidgetClass MenuShell
-instance ObjectClass MenuShell
-instance GObjectClass MenuShell where
-  toGObject = GObject . castForeignPtr . unMenuShell
-  unsafeCastGObject = MenuShell . castForeignPtr . unGObject
-
-castToMenuShell :: GObjectClass obj => obj -> MenuShell
-castToMenuShell = castTo gTypeMenuShell "MenuShell"
-
-gTypeMenuShell :: GType
-gTypeMenuShell =
-  {# call fun unsafe gtk_menu_shell_get_type #}
-
--- *********************************************************************** Menu
-
-{#pointer *Menu foreign newtype #} deriving (Eq,Ord)
-
-mkMenu = (Menu, objectUnrefFromMainloop)
-unMenu (Menu o) = o
-
-class MenuShellClass o => MenuClass o
-toMenu :: MenuClass o => o -> Menu
-toMenu = unsafeCastGObject . toGObject
-
-instance MenuClass Menu
-instance MenuShellClass Menu
-instance ContainerClass Menu
-instance WidgetClass Menu
-instance ObjectClass Menu
-instance GObjectClass Menu where
-  toGObject = GObject . castForeignPtr . unMenu
-  unsafeCastGObject = Menu . castForeignPtr . unGObject
-
-castToMenu :: GObjectClass obj => obj -> Menu
-castToMenu = castTo gTypeMenu "Menu"
-
-gTypeMenu :: GType
-gTypeMenu =
-  {# call fun unsafe gtk_menu_get_type #}
-
--- ********************************************************** RecentChooserMenu
-
-{#pointer *RecentChooserMenu foreign newtype #} deriving (Eq,Ord)
-
-mkRecentChooserMenu = (RecentChooserMenu, objectUnrefFromMainloop)
-unRecentChooserMenu (RecentChooserMenu o) = o
-
-class MenuClass o => RecentChooserMenuClass o
-toRecentChooserMenu :: RecentChooserMenuClass o => o -> RecentChooserMenu
-toRecentChooserMenu = unsafeCastGObject . toGObject
-
-instance RecentChooserMenuClass RecentChooserMenu
-instance MenuClass RecentChooserMenu
-instance MenuShellClass RecentChooserMenu
-instance ContainerClass RecentChooserMenu
-instance WidgetClass RecentChooserMenu
-instance ObjectClass RecentChooserMenu
-instance GObjectClass RecentChooserMenu where
-  toGObject = GObject . castForeignPtr . unRecentChooserMenu
-  unsafeCastGObject = RecentChooserMenu . castForeignPtr . unGObject
-
-castToRecentChooserMenu :: GObjectClass obj => obj -> RecentChooserMenu
-castToRecentChooserMenu = castTo gTypeRecentChooserMenu "RecentChooserMenu"
-
-gTypeRecentChooserMenu :: GType
-gTypeRecentChooserMenu =
-  {# call fun unsafe gtk_recent_chooser_menu_get_type #}
-
--- ******************************************************************** MenuBar
-
-{#pointer *MenuBar foreign newtype #} deriving (Eq,Ord)
-
-mkMenuBar = (MenuBar, objectUnrefFromMainloop)
-unMenuBar (MenuBar o) = o
-
-class MenuShellClass o => MenuBarClass o
-toMenuBar :: MenuBarClass o => o -> MenuBar
-toMenuBar = unsafeCastGObject . toGObject
-
-instance MenuBarClass MenuBar
-instance MenuShellClass MenuBar
-instance ContainerClass MenuBar
-instance WidgetClass MenuBar
-instance ObjectClass MenuBar
-instance GObjectClass MenuBar where
-  toGObject = GObject . castForeignPtr . unMenuBar
-  unsafeCastGObject = MenuBar . castForeignPtr . unGObject
-
-castToMenuBar :: GObjectClass obj => obj -> MenuBar
-castToMenuBar = castTo gTypeMenuBar "MenuBar"
-
-gTypeMenuBar :: GType
-gTypeMenuBar =
-  {# call fun unsafe gtk_menu_bar_get_type #}
-
--- ******************************************************************* Notebook
-
-{#pointer *Notebook foreign newtype #} deriving (Eq,Ord)
-
-mkNotebook = (Notebook, objectUnrefFromMainloop)
-unNotebook (Notebook o) = o
-
-class ContainerClass o => NotebookClass o
-toNotebook :: NotebookClass o => o -> Notebook
-toNotebook = unsafeCastGObject . toGObject
-
-instance NotebookClass Notebook
-instance ContainerClass Notebook
-instance WidgetClass Notebook
-instance ObjectClass Notebook
-instance GObjectClass Notebook where
-  toGObject = GObject . castForeignPtr . unNotebook
-  unsafeCastGObject = Notebook . castForeignPtr . unGObject
-
-castToNotebook :: GObjectClass obj => obj -> Notebook
-castToNotebook = castTo gTypeNotebook "Notebook"
-
-gTypeNotebook :: GType
-gTypeNotebook =
-  {# call fun unsafe gtk_notebook_get_type #}
-
--- ********************************************************************* Socket
-
-{#pointer *Socket foreign newtype #} deriving (Eq,Ord)
-
-mkSocket = (Socket, objectUnrefFromMainloop)
-unSocket (Socket o) = o
-
-class ContainerClass o => SocketClass o
-toSocket :: SocketClass o => o -> Socket
-toSocket = unsafeCastGObject . toGObject
-
-instance SocketClass Socket
-instance ContainerClass Socket
-instance WidgetClass Socket
-instance ObjectClass Socket
-instance GObjectClass Socket where
-  toGObject = GObject . castForeignPtr . unSocket
-  unsafeCastGObject = Socket . castForeignPtr . unGObject
-
-castToSocket :: GObjectClass obj => obj -> Socket
-castToSocket = castTo gTypeSocket "Socket"
-
-gTypeSocket :: GType
-gTypeSocket =
-  {# call fun unsafe gtk_socket_get_type #}
-
--- ********************************************************************** Table
-
-{#pointer *Table foreign newtype #} deriving (Eq,Ord)
-
-mkTable = (Table, objectUnrefFromMainloop)
-unTable (Table o) = o
-
-class ContainerClass o => TableClass o
-toTable :: TableClass o => o -> Table
-toTable = unsafeCastGObject . toGObject
-
-instance TableClass Table
-instance ContainerClass Table
-instance WidgetClass Table
-instance ObjectClass Table
-instance GObjectClass Table where
-  toGObject = GObject . castForeignPtr . unTable
-  unsafeCastGObject = Table . castForeignPtr . unGObject
-
-castToTable :: GObjectClass obj => obj -> Table
-castToTable = castTo gTypeTable "Table"
-
-gTypeTable :: GType
-gTypeTable =
-  {# call fun unsafe gtk_table_get_type #}
-
--- ******************************************************************* TextView
-
-{#pointer *TextView foreign newtype #} deriving (Eq,Ord)
-
-mkTextView = (TextView, objectUnrefFromMainloop)
-unTextView (TextView o) = o
-
-class ContainerClass o => TextViewClass o
-toTextView :: TextViewClass o => o -> TextView
-toTextView = unsafeCastGObject . toGObject
-
-instance TextViewClass TextView
-instance ContainerClass TextView
-instance WidgetClass TextView
-instance ObjectClass TextView
-instance GObjectClass TextView where
-  toGObject = GObject . castForeignPtr . unTextView
-  unsafeCastGObject = TextView . castForeignPtr . unGObject
-
-castToTextView :: GObjectClass obj => obj -> TextView
-castToTextView = castTo gTypeTextView "TextView"
-
-gTypeTextView :: GType
-gTypeTextView =
-  {# call fun unsafe gtk_text_view_get_type #}
-
--- ******************************************************************** Toolbar
-
-{#pointer *Toolbar foreign newtype #} deriving (Eq,Ord)
-
-mkToolbar = (Toolbar, objectUnrefFromMainloop)
-unToolbar (Toolbar o) = o
-
-class ContainerClass o => ToolbarClass o
-toToolbar :: ToolbarClass o => o -> Toolbar
-toToolbar = unsafeCastGObject . toGObject
-
-instance ToolbarClass Toolbar
-instance ContainerClass Toolbar
-instance WidgetClass Toolbar
-instance ObjectClass Toolbar
-instance GObjectClass Toolbar where
-  toGObject = GObject . castForeignPtr . unToolbar
-  unsafeCastGObject = Toolbar . castForeignPtr . unGObject
-
-castToToolbar :: GObjectClass obj => obj -> Toolbar
-castToToolbar = castTo gTypeToolbar "Toolbar"
-
-gTypeToolbar :: GType
-gTypeToolbar =
-  {# call fun unsafe gtk_toolbar_get_type #}
-
--- ******************************************************************* TreeView
-
-{#pointer *TreeView foreign newtype #} deriving (Eq,Ord)
-
-mkTreeView = (TreeView, objectUnrefFromMainloop)
-unTreeView (TreeView o) = o
-
-class ContainerClass o => TreeViewClass o
-toTreeView :: TreeViewClass o => o -> TreeView
-toTreeView = unsafeCastGObject . toGObject
-
-instance TreeViewClass TreeView
-instance ContainerClass TreeView
-instance WidgetClass TreeView
-instance ObjectClass TreeView
-instance GObjectClass TreeView where
-  toGObject = GObject . castForeignPtr . unTreeView
-  unsafeCastGObject = TreeView . castForeignPtr . unGObject
-
-castToTreeView :: GObjectClass obj => obj -> TreeView
-castToTreeView = castTo gTypeTreeView "TreeView"
-
-gTypeTreeView :: GType
-gTypeTreeView =
-  {# call fun unsafe gtk_tree_view_get_type #}
-
--- ******************************************************************* Calendar
-
-{#pointer *Calendar foreign newtype #} deriving (Eq,Ord)
-
-mkCalendar = (Calendar, objectUnrefFromMainloop)
-unCalendar (Calendar o) = o
-
-class WidgetClass o => CalendarClass o
-toCalendar :: CalendarClass o => o -> Calendar
-toCalendar = unsafeCastGObject . toGObject
-
-instance CalendarClass Calendar
-instance WidgetClass Calendar
-instance ObjectClass Calendar
-instance GObjectClass Calendar where
-  toGObject = GObject . castForeignPtr . unCalendar
-  unsafeCastGObject = Calendar . castForeignPtr . unGObject
-
-castToCalendar :: GObjectClass obj => obj -> Calendar
-castToCalendar = castTo gTypeCalendar "Calendar"
-
-gTypeCalendar :: GType
-gTypeCalendar =
-  {# call fun unsafe gtk_calendar_get_type #}
-
--- ******************************************************************* CellView
-
-{#pointer *CellView foreign newtype #} deriving (Eq,Ord)
-
-mkCellView = (CellView, objectUnrefFromMainloop)
-unCellView (CellView o) = o
-
-class WidgetClass o => CellViewClass o
-toCellView :: CellViewClass o => o -> CellView
-toCellView = unsafeCastGObject . toGObject
-
-instance CellViewClass CellView
-instance WidgetClass CellView
-instance ObjectClass CellView
-instance GObjectClass CellView where
-  toGObject = GObject . castForeignPtr . unCellView
-  unsafeCastGObject = CellView . castForeignPtr . unGObject
-
-castToCellView :: GObjectClass obj => obj -> CellView
-castToCellView = castTo gTypeCellView "CellView"
-
-gTypeCellView :: GType
-gTypeCellView =
-  {# call fun unsafe gtk_cell_view_get_type #}
-
--- **************************************************************** DrawingArea
-
-{#pointer *DrawingArea foreign newtype #} deriving (Eq,Ord)
-
-mkDrawingArea = (DrawingArea, objectUnrefFromMainloop)
-unDrawingArea (DrawingArea o) = o
-
-class WidgetClass o => DrawingAreaClass o
-toDrawingArea :: DrawingAreaClass o => o -> DrawingArea
-toDrawingArea = unsafeCastGObject . toGObject
-
-instance DrawingAreaClass DrawingArea
-instance WidgetClass DrawingArea
-instance ObjectClass DrawingArea
-instance GObjectClass DrawingArea where
-  toGObject = GObject . castForeignPtr . unDrawingArea
-  unsafeCastGObject = DrawingArea . castForeignPtr . unGObject
-
-castToDrawingArea :: GObjectClass obj => obj -> DrawingArea
-castToDrawingArea = castTo gTypeDrawingArea "DrawingArea"
-
-gTypeDrawingArea :: GType
-gTypeDrawingArea =
-  {# call fun unsafe gtk_drawing_area_get_type #}
-
--- ******************************************************************** Spinner
-
-{#pointer *Spinner foreign newtype #} deriving (Eq,Ord)
-
-mkSpinner = (Spinner, objectUnrefFromMainloop)
-unSpinner (Spinner o) = o
-
-class DrawingAreaClass o => SpinnerClass o
-toSpinner :: SpinnerClass o => o -> Spinner
-toSpinner = unsafeCastGObject . toGObject
-
-instance SpinnerClass Spinner
-instance DrawingAreaClass Spinner
-instance WidgetClass Spinner
-instance ObjectClass Spinner
-instance GObjectClass Spinner where
-  toGObject = GObject . castForeignPtr . unSpinner
-  unsafeCastGObject = Spinner . castForeignPtr . unGObject
-
-castToSpinner :: GObjectClass obj => obj -> Spinner
-castToSpinner = castTo gTypeSpinner "Spinner"
-
-gTypeSpinner :: GType
-gTypeSpinner =
-  {# call fun unsafe gtk_spinner_get_type #}
-
--- ********************************************************************** Entry
-
-{#pointer *Entry foreign newtype #} deriving (Eq,Ord)
-
-mkEntry = (Entry, objectUnrefFromMainloop)
-unEntry (Entry o) = o
-
-class WidgetClass o => EntryClass o
-toEntry :: EntryClass o => o -> Entry
-toEntry = unsafeCastGObject . toGObject
-
-instance EntryClass Entry
-instance WidgetClass Entry
-instance ObjectClass Entry
-instance GObjectClass Entry where
-  toGObject = GObject . castForeignPtr . unEntry
-  unsafeCastGObject = Entry . castForeignPtr . unGObject
-
-castToEntry :: GObjectClass obj => obj -> Entry
-castToEntry = castTo gTypeEntry "Entry"
-
-gTypeEntry :: GType
-gTypeEntry =
-  {# call fun unsafe gtk_entry_get_type #}
-
--- ***************************************************************** SpinButton
-
-{#pointer *SpinButton foreign newtype #} deriving (Eq,Ord)
-
-mkSpinButton = (SpinButton, objectUnrefFromMainloop)
-unSpinButton (SpinButton o) = o
-
-class EntryClass o => SpinButtonClass o
-toSpinButton :: SpinButtonClass o => o -> SpinButton
-toSpinButton = unsafeCastGObject . toGObject
-
-instance SpinButtonClass SpinButton
-instance EntryClass SpinButton
-instance WidgetClass SpinButton
-instance ObjectClass SpinButton
-instance GObjectClass SpinButton where
-  toGObject = GObject . castForeignPtr . unSpinButton
-  unsafeCastGObject = SpinButton . castForeignPtr . unGObject
-
-castToSpinButton :: GObjectClass obj => obj -> SpinButton
-castToSpinButton = castTo gTypeSpinButton "SpinButton"
-
-gTypeSpinButton :: GType
-gTypeSpinButton =
-  {# call fun unsafe gtk_spin_button_get_type #}
-
--- ********************************************************************** Ruler
-
-{#pointer *Ruler foreign newtype #} deriving (Eq,Ord)
-
-mkRuler = (Ruler, objectUnrefFromMainloop)
-unRuler (Ruler o) = o
-
-class WidgetClass o => RulerClass o
-toRuler :: RulerClass o => o -> Ruler
-toRuler = unsafeCastGObject . toGObject
-
-instance RulerClass Ruler
-instance WidgetClass Ruler
-instance ObjectClass Ruler
-instance GObjectClass Ruler where
-  toGObject = GObject . castForeignPtr . unRuler
-  unsafeCastGObject = Ruler . castForeignPtr . unGObject
-
-castToRuler :: GObjectClass obj => obj -> Ruler
-castToRuler = castTo gTypeRuler "Ruler"
-
-gTypeRuler :: GType
-gTypeRuler =
-  {# call fun unsafe gtk_ruler_get_type #}
-
--- ********************************************************************* HRuler
-
-{#pointer *HRuler foreign newtype #} deriving (Eq,Ord)
-
-mkHRuler = (HRuler, objectUnrefFromMainloop)
-unHRuler (HRuler o) = o
-
-class RulerClass o => HRulerClass o
-toHRuler :: HRulerClass o => o -> HRuler
-toHRuler = unsafeCastGObject . toGObject
-
-instance HRulerClass HRuler
-instance RulerClass HRuler
-instance WidgetClass HRuler
-instance ObjectClass HRuler
-instance GObjectClass HRuler where
-  toGObject = GObject . castForeignPtr . unHRuler
-  unsafeCastGObject = HRuler . castForeignPtr . unGObject
-
-castToHRuler :: GObjectClass obj => obj -> HRuler
-castToHRuler = castTo gTypeHRuler "HRuler"
-
-gTypeHRuler :: GType
-gTypeHRuler =
-  {# call fun unsafe gtk_hruler_get_type #}
-
--- ********************************************************************* VRuler
-
-{#pointer *VRuler foreign newtype #} deriving (Eq,Ord)
-
-mkVRuler = (VRuler, objectUnrefFromMainloop)
-unVRuler (VRuler o) = o
-
-class RulerClass o => VRulerClass o
-toVRuler :: VRulerClass o => o -> VRuler
-toVRuler = unsafeCastGObject . toGObject
-
-instance VRulerClass VRuler
-instance RulerClass VRuler
-instance WidgetClass VRuler
-instance ObjectClass VRuler
-instance GObjectClass VRuler where
-  toGObject = GObject . castForeignPtr . unVRuler
-  unsafeCastGObject = VRuler . castForeignPtr . unGObject
-
-castToVRuler :: GObjectClass obj => obj -> VRuler
-castToVRuler = castTo gTypeVRuler "VRuler"
-
-gTypeVRuler :: GType
-gTypeVRuler =
-  {# call fun unsafe gtk_vruler_get_type #}
-
--- ********************************************************************** Range
-
-{#pointer *Range foreign newtype #} deriving (Eq,Ord)
-
-mkRange = (Range, objectUnrefFromMainloop)
-unRange (Range o) = o
-
-class WidgetClass o => RangeClass o
-toRange :: RangeClass o => o -> Range
-toRange = unsafeCastGObject . toGObject
-
-instance RangeClass Range
-instance WidgetClass Range
-instance ObjectClass Range
-instance GObjectClass Range where
-  toGObject = GObject . castForeignPtr . unRange
-  unsafeCastGObject = Range . castForeignPtr . unGObject
-
-castToRange :: GObjectClass obj => obj -> Range
-castToRange = castTo gTypeRange "Range"
-
-gTypeRange :: GType
-gTypeRange =
-  {# call fun unsafe gtk_range_get_type #}
-
--- ********************************************************************** Scale
-
-{#pointer *Scale foreign newtype #} deriving (Eq,Ord)
-
-mkScale = (Scale, objectUnrefFromMainloop)
-unScale (Scale o) = o
-
-class RangeClass o => ScaleClass o
-toScale :: ScaleClass o => o -> Scale
-toScale = unsafeCastGObject . toGObject
-
-instance ScaleClass Scale
-instance RangeClass Scale
-instance WidgetClass Scale
-instance ObjectClass Scale
-instance GObjectClass Scale where
-  toGObject = GObject . castForeignPtr . unScale
-  unsafeCastGObject = Scale . castForeignPtr . unGObject
-
-castToScale :: GObjectClass obj => obj -> Scale
-castToScale = castTo gTypeScale "Scale"
-
-gTypeScale :: GType
-gTypeScale =
-  {# call fun unsafe gtk_scale_get_type #}
-
--- ********************************************************************* HScale
-
-{#pointer *HScale foreign newtype #} deriving (Eq,Ord)
-
-mkHScale = (HScale, objectUnrefFromMainloop)
-unHScale (HScale o) = o
-
-class ScaleClass o => HScaleClass o
-toHScale :: HScaleClass o => o -> HScale
-toHScale = unsafeCastGObject . toGObject
-
-instance HScaleClass HScale
-instance ScaleClass HScale
-instance RangeClass HScale
-instance WidgetClass HScale
-instance ObjectClass HScale
-instance GObjectClass HScale where
-  toGObject = GObject . castForeignPtr . unHScale
-  unsafeCastGObject = HScale . castForeignPtr . unGObject
-
-castToHScale :: GObjectClass obj => obj -> HScale
-castToHScale = castTo gTypeHScale "HScale"
-
-gTypeHScale :: GType
-gTypeHScale =
-  {# call fun unsafe gtk_hscale_get_type #}
-
--- ********************************************************************* VScale
-
-{#pointer *VScale foreign newtype #} deriving (Eq,Ord)
-
-mkVScale = (VScale, objectUnrefFromMainloop)
-unVScale (VScale o) = o
-
-class ScaleClass o => VScaleClass o
-toVScale :: VScaleClass o => o -> VScale
-toVScale = unsafeCastGObject . toGObject
-
-instance VScaleClass VScale
-instance ScaleClass VScale
-instance RangeClass VScale
-instance WidgetClass VScale
-instance ObjectClass VScale
-instance GObjectClass VScale where
-  toGObject = GObject . castForeignPtr . unVScale
-  unsafeCastGObject = VScale . castForeignPtr . unGObject
-
-castToVScale :: GObjectClass obj => obj -> VScale
-castToVScale = castTo gTypeVScale "VScale"
-
-gTypeVScale :: GType
-gTypeVScale =
-  {# call fun unsafe gtk_vscale_get_type #}
-
--- ****************************************************************** Scrollbar
-
-{#pointer *Scrollbar foreign newtype #} deriving (Eq,Ord)
-
-mkScrollbar = (Scrollbar, objectUnrefFromMainloop)
-unScrollbar (Scrollbar o) = o
-
-class RangeClass o => ScrollbarClass o
-toScrollbar :: ScrollbarClass o => o -> Scrollbar
-toScrollbar = unsafeCastGObject . toGObject
-
-instance ScrollbarClass Scrollbar
-instance RangeClass Scrollbar
-instance WidgetClass Scrollbar
-instance ObjectClass Scrollbar
-instance GObjectClass Scrollbar where
-  toGObject = GObject . castForeignPtr . unScrollbar
-  unsafeCastGObject = Scrollbar . castForeignPtr . unGObject
-
-castToScrollbar :: GObjectClass obj => obj -> Scrollbar
-castToScrollbar = castTo gTypeScrollbar "Scrollbar"
-
-gTypeScrollbar :: GType
-gTypeScrollbar =
-  {# call fun unsafe gtk_scrollbar_get_type #}
-
--- ***************************************************************** HScrollbar
-
-{#pointer *HScrollbar foreign newtype #} deriving (Eq,Ord)
-
-mkHScrollbar = (HScrollbar, objectUnrefFromMainloop)
-unHScrollbar (HScrollbar o) = o
-
-class ScrollbarClass o => HScrollbarClass o
-toHScrollbar :: HScrollbarClass o => o -> HScrollbar
-toHScrollbar = unsafeCastGObject . toGObject
-
-instance HScrollbarClass HScrollbar
-instance ScrollbarClass HScrollbar
-instance RangeClass HScrollbar
-instance WidgetClass HScrollbar
-instance ObjectClass HScrollbar
-instance GObjectClass HScrollbar where
-  toGObject = GObject . castForeignPtr . unHScrollbar
-  unsafeCastGObject = HScrollbar . castForeignPtr . unGObject
-
-castToHScrollbar :: GObjectClass obj => obj -> HScrollbar
-castToHScrollbar = castTo gTypeHScrollbar "HScrollbar"
-
-gTypeHScrollbar :: GType
-gTypeHScrollbar =
-  {# call fun unsafe gtk_hscrollbar_get_type #}
-
--- ***************************************************************** VScrollbar
-
-{#pointer *VScrollbar foreign newtype #} deriving (Eq,Ord)
-
-mkVScrollbar = (VScrollbar, objectUnrefFromMainloop)
-unVScrollbar (VScrollbar o) = o
-
-class ScrollbarClass o => VScrollbarClass o
-toVScrollbar :: VScrollbarClass o => o -> VScrollbar
-toVScrollbar = unsafeCastGObject . toGObject
-
-instance VScrollbarClass VScrollbar
-instance ScrollbarClass VScrollbar
-instance RangeClass VScrollbar
-instance WidgetClass VScrollbar
-instance ObjectClass VScrollbar
-instance GObjectClass VScrollbar where
-  toGObject = GObject . castForeignPtr . unVScrollbar
-  unsafeCastGObject = VScrollbar . castForeignPtr . unGObject
-
-castToVScrollbar :: GObjectClass obj => obj -> VScrollbar
-castToVScrollbar = castTo gTypeVScrollbar "VScrollbar"
-
-gTypeVScrollbar :: GType
-gTypeVScrollbar =
-  {# call fun unsafe gtk_vscrollbar_get_type #}
-
--- ****************************************************************** Separator
-
-{#pointer *Separator foreign newtype #} deriving (Eq,Ord)
-
-mkSeparator = (Separator, objectUnrefFromMainloop)
-unSeparator (Separator o) = o
-
-class WidgetClass o => SeparatorClass o
-toSeparator :: SeparatorClass o => o -> Separator
-toSeparator = unsafeCastGObject . toGObject
-
-instance SeparatorClass Separator
-instance WidgetClass Separator
-instance ObjectClass Separator
-instance GObjectClass Separator where
-  toGObject = GObject . castForeignPtr . unSeparator
-  unsafeCastGObject = Separator . castForeignPtr . unGObject
-
-castToSeparator :: GObjectClass obj => obj -> Separator
-castToSeparator = castTo gTypeSeparator "Separator"
-
-gTypeSeparator :: GType
-gTypeSeparator =
-  {# call fun unsafe gtk_separator_get_type #}
-
--- ***************************************************************** HSeparator
-
-{#pointer *HSeparator foreign newtype #} deriving (Eq,Ord)
-
-mkHSeparator = (HSeparator, objectUnrefFromMainloop)
-unHSeparator (HSeparator o) = o
-
-class SeparatorClass o => HSeparatorClass o
-toHSeparator :: HSeparatorClass o => o -> HSeparator
-toHSeparator = unsafeCastGObject . toGObject
-
-instance HSeparatorClass HSeparator
-instance SeparatorClass HSeparator
-instance WidgetClass HSeparator
-instance ObjectClass HSeparator
-instance GObjectClass HSeparator where
-  toGObject = GObject . castForeignPtr . unHSeparator
-  unsafeCastGObject = HSeparator . castForeignPtr . unGObject
-
-castToHSeparator :: GObjectClass obj => obj -> HSeparator
-castToHSeparator = castTo gTypeHSeparator "HSeparator"
-
-gTypeHSeparator :: GType
-gTypeHSeparator =
-  {# call fun unsafe gtk_hseparator_get_type #}
-
--- ***************************************************************** VSeparator
-
-{#pointer *VSeparator foreign newtype #} deriving (Eq,Ord)
-
-mkVSeparator = (VSeparator, objectUnrefFromMainloop)
-unVSeparator (VSeparator o) = o
-
-class SeparatorClass o => VSeparatorClass o
-toVSeparator :: VSeparatorClass o => o -> VSeparator
-toVSeparator = unsafeCastGObject . toGObject
-
-instance VSeparatorClass VSeparator
-instance SeparatorClass VSeparator
-instance WidgetClass VSeparator
-instance ObjectClass VSeparator
-instance GObjectClass VSeparator where
-  toGObject = GObject . castForeignPtr . unVSeparator
-  unsafeCastGObject = VSeparator . castForeignPtr . unGObject
-
-castToVSeparator :: GObjectClass obj => obj -> VSeparator
-castToVSeparator = castTo gTypeVSeparator "VSeparator"
-
-gTypeVSeparator :: GType
-gTypeVSeparator =
-  {# call fun unsafe gtk_vseparator_get_type #}
-
--- ****************************************************************** Invisible
-
-{#pointer *Invisible foreign newtype #} deriving (Eq,Ord)
-
-mkInvisible = (Invisible, objectUnrefFromMainloop)
-unInvisible (Invisible o) = o
-
-class WidgetClass o => InvisibleClass o
-toInvisible :: InvisibleClass o => o -> Invisible
-toInvisible = unsafeCastGObject . toGObject
-
-instance InvisibleClass Invisible
-instance WidgetClass Invisible
-instance ObjectClass Invisible
-instance GObjectClass Invisible where
-  toGObject = GObject . castForeignPtr . unInvisible
-  unsafeCastGObject = Invisible . castForeignPtr . unGObject
-
-castToInvisible :: GObjectClass obj => obj -> Invisible
-castToInvisible = castTo gTypeInvisible "Invisible"
-
-gTypeInvisible :: GType
-gTypeInvisible =
-  {# call fun unsafe gtk_invisible_get_type #}
-
--- ******************************************************************** Preview
-
-{#pointer *Preview foreign newtype #} deriving (Eq,Ord)
-
-mkPreview = (Preview, objectUnrefFromMainloop)
-unPreview (Preview o) = o
-
-class WidgetClass o => PreviewClass o
-toPreview :: PreviewClass o => o -> Preview
-toPreview = unsafeCastGObject . toGObject
-
-instance PreviewClass Preview
-instance WidgetClass Preview
-instance ObjectClass Preview
-instance GObjectClass Preview where
-  toGObject = GObject . castForeignPtr . unPreview
-  unsafeCastGObject = Preview . castForeignPtr . unGObject
-
-castToPreview :: GObjectClass obj => obj -> Preview
-castToPreview = castTo gTypePreview "Preview"
-
-gTypePreview :: GType
-gTypePreview =
-  {# call fun unsafe gtk_preview_get_type #}
-
--- **************************************************************** ProgressBar
-
-{#pointer *ProgressBar foreign newtype #} deriving (Eq,Ord)
-
-mkProgressBar = (ProgressBar, objectUnrefFromMainloop)
-unProgressBar (ProgressBar o) = o
-
-class WidgetClass o => ProgressBarClass o
-toProgressBar :: ProgressBarClass o => o -> ProgressBar
-toProgressBar = unsafeCastGObject . toGObject
-
-instance ProgressBarClass ProgressBar
-instance WidgetClass ProgressBar
-instance ObjectClass ProgressBar
-instance GObjectClass ProgressBar where
-  toGObject = GObject . castForeignPtr . unProgressBar
-  unsafeCastGObject = ProgressBar . castForeignPtr . unGObject
-
-castToProgressBar :: GObjectClass obj => obj -> ProgressBar
-castToProgressBar = castTo gTypeProgressBar "ProgressBar"
-
-gTypeProgressBar :: GType
-gTypeProgressBar =
-  {# call fun unsafe gtk_progress_bar_get_type #}
-
--- ***************************************************************** Adjustment
-
-{#pointer *Adjustment foreign newtype #} deriving (Eq,Ord)
-
-mkAdjustment = (Adjustment, objectUnrefFromMainloop)
-unAdjustment (Adjustment o) = o
-
-class ObjectClass o => AdjustmentClass o
-toAdjustment :: AdjustmentClass o => o -> Adjustment
-toAdjustment = unsafeCastGObject . toGObject
-
-instance AdjustmentClass Adjustment
-instance ObjectClass Adjustment
-instance GObjectClass Adjustment where
-  toGObject = GObject . castForeignPtr . unAdjustment
-  unsafeCastGObject = Adjustment . castForeignPtr . unGObject
-
-castToAdjustment :: GObjectClass obj => obj -> Adjustment
-castToAdjustment = castTo gTypeAdjustment "Adjustment"
-
-gTypeAdjustment :: GType
-gTypeAdjustment =
-  {# call fun unsafe gtk_adjustment_get_type #}
-
--- ****************************************************************** IMContext
-
-{#pointer *IMContext foreign newtype #} deriving (Eq,Ord)
-
-mkIMContext = (IMContext, objectUnrefFromMainloop)
-unIMContext (IMContext o) = o
-
-class ObjectClass o => IMContextClass o
-toIMContext :: IMContextClass o => o -> IMContext
-toIMContext = unsafeCastGObject . toGObject
-
-instance IMContextClass IMContext
-instance ObjectClass IMContext
-instance GObjectClass IMContext where
-  toGObject = GObject . castForeignPtr . unIMContext
-  unsafeCastGObject = IMContext . castForeignPtr . unGObject
-
-castToIMContext :: GObjectClass obj => obj -> IMContext
-castToIMContext = castTo gTypeIMContext "IMContext"
-
-gTypeIMContext :: GType
-gTypeIMContext =
-  {# call fun unsafe gtk_im_context_get_type #}
-
--- ************************************************************* IMMulticontext
-
-{#pointer *IMMulticontext foreign newtype #} deriving (Eq,Ord)
-
-mkIMMulticontext = (IMMulticontext, objectUnrefFromMainloop)
-unIMMulticontext (IMMulticontext o) = o
-
-class IMContextClass o => IMMulticontextClass o
-toIMMulticontext :: IMMulticontextClass o => o -> IMMulticontext
-toIMMulticontext = unsafeCastGObject . toGObject
-
-instance IMMulticontextClass IMMulticontext
-instance IMContextClass IMMulticontext
-instance ObjectClass IMMulticontext
-instance GObjectClass IMMulticontext where
-  toGObject = GObject . castForeignPtr . unIMMulticontext
-  unsafeCastGObject = IMMulticontext . castForeignPtr . unGObject
-
-castToIMMulticontext :: GObjectClass obj => obj -> IMMulticontext
-castToIMMulticontext = castTo gTypeIMMulticontext "IMMulticontext"
-
-gTypeIMMulticontext :: GType
-gTypeIMMulticontext =
-  {# call fun unsafe gtk_im_multicontext_get_type #}
-
--- ************************************************************ IMContextSimple
-
-{#pointer *IMContextSimple foreign newtype #} deriving (Eq,Ord)
-
-mkIMContextSimple = (IMContextSimple, objectUnrefFromMainloop)
-unIMContextSimple (IMContextSimple o) = o
-
-class IMContextClass o => IMContextSimpleClass o
-toIMContextSimple :: IMContextSimpleClass o => o -> IMContextSimple
-toIMContextSimple = unsafeCastGObject . toGObject
-
-instance IMContextSimpleClass IMContextSimple
-instance IMContextClass IMContextSimple
-instance ObjectClass IMContextSimple
-instance GObjectClass IMContextSimple where
-  toGObject = GObject . castForeignPtr . unIMContextSimple
-  unsafeCastGObject = IMContextSimple . castForeignPtr . unGObject
-
-castToIMContextSimple :: GObjectClass obj => obj -> IMContextSimple
-castToIMContextSimple = castTo gTypeIMContextSimple "IMContextSimple"
-
-gTypeIMContextSimple :: GType
-gTypeIMContextSimple =
-  {# call fun unsafe gtk_im_context_simple_get_type #}
-
--- **************************************************************** ItemFactory
-
-{#pointer *ItemFactory foreign newtype #} deriving (Eq,Ord)
-
-mkItemFactory = (ItemFactory, objectUnrefFromMainloop)
-unItemFactory (ItemFactory o) = o
-
-class ObjectClass o => ItemFactoryClass o
-toItemFactory :: ItemFactoryClass o => o -> ItemFactory
-toItemFactory = unsafeCastGObject . toGObject
-
-instance ItemFactoryClass ItemFactory
-instance ObjectClass ItemFactory
-instance GObjectClass ItemFactory where
-  toGObject = GObject . castForeignPtr . unItemFactory
-  unsafeCastGObject = ItemFactory . castForeignPtr . unGObject
-
-castToItemFactory :: GObjectClass obj => obj -> ItemFactory
-castToItemFactory = castTo gTypeItemFactory "ItemFactory"
-
-gTypeItemFactory :: GType
-gTypeItemFactory =
-  {# call fun unsafe gtk_item_factory_get_type #}
-
--- ******************************************************************* Tooltips
-
-{#pointer *Tooltips foreign newtype #} deriving (Eq,Ord)
-
-mkTooltips = (Tooltips, objectUnrefFromMainloop)
-unTooltips (Tooltips o) = o
-
-class ObjectClass o => TooltipsClass o
-toTooltips :: TooltipsClass o => o -> Tooltips
-toTooltips = unsafeCastGObject . toGObject
-
-instance TooltipsClass Tooltips
-instance ObjectClass Tooltips
-instance GObjectClass Tooltips where
-  toGObject = GObject . castForeignPtr . unTooltips
-  unsafeCastGObject = Tooltips . castForeignPtr . unGObject
-
-castToTooltips :: GObjectClass obj => obj -> Tooltips
-castToTooltips = castTo gTypeTooltips "Tooltips"
-
-gTypeTooltips :: GType
-gTypeTooltips =
-  {# call fun unsafe gtk_tooltips_get_type #}
-
--- ************************************************************* TreeViewColumn
-
-{#pointer *TreeViewColumn foreign newtype #} deriving (Eq,Ord)
-
-mkTreeViewColumn = (TreeViewColumn, objectUnrefFromMainloop)
-unTreeViewColumn (TreeViewColumn o) = o
-
-class ObjectClass o => TreeViewColumnClass o
-toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn
-toTreeViewColumn = unsafeCastGObject . toGObject
-
-instance TreeViewColumnClass TreeViewColumn
-instance ObjectClass TreeViewColumn
-instance GObjectClass TreeViewColumn where
-  toGObject = GObject . castForeignPtr . unTreeViewColumn
-  unsafeCastGObject = TreeViewColumn . castForeignPtr . unGObject
-
-castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn
-castToTreeViewColumn = castTo gTypeTreeViewColumn "TreeViewColumn"
-
-gTypeTreeViewColumn :: GType
-gTypeTreeViewColumn =
-  {# call fun unsafe gtk_tree_view_column_get_type #}
-
--- *************************************************************** CellRenderer
-
-{#pointer *CellRenderer foreign newtype #} deriving (Eq,Ord)
-
-mkCellRenderer = (CellRenderer, objectUnrefFromMainloop)
-unCellRenderer (CellRenderer o) = o
-
-class ObjectClass o => CellRendererClass o
-toCellRenderer :: CellRendererClass o => o -> CellRenderer
-toCellRenderer = unsafeCastGObject . toGObject
-
-instance CellRendererClass CellRenderer
-instance ObjectClass CellRenderer
-instance GObjectClass CellRenderer where
-  toGObject = GObject . castForeignPtr . unCellRenderer
-  unsafeCastGObject = CellRenderer . castForeignPtr . unGObject
-
-castToCellRenderer :: GObjectClass obj => obj -> CellRenderer
-castToCellRenderer = castTo gTypeCellRenderer "CellRenderer"
-
-gTypeCellRenderer :: GType
-gTypeCellRenderer =
-  {# call fun unsafe gtk_cell_renderer_get_type #}
-
--- ******************************************************** CellRendererSpinner
-
-{#pointer *CellRendererSpinner foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererSpinner = (CellRendererSpinner, objectUnrefFromMainloop)
-unCellRendererSpinner (CellRendererSpinner o) = o
-
-class CellRendererClass o => CellRendererSpinnerClass o
-toCellRendererSpinner :: CellRendererSpinnerClass o => o -> CellRendererSpinner
-toCellRendererSpinner = unsafeCastGObject . toGObject
-
-instance CellRendererSpinnerClass CellRendererSpinner
-instance CellRendererClass CellRendererSpinner
-instance ObjectClass CellRendererSpinner
-instance GObjectClass CellRendererSpinner where
-  toGObject = GObject . castForeignPtr . unCellRendererSpinner
-  unsafeCastGObject = CellRendererSpinner . castForeignPtr . unGObject
-
-castToCellRendererSpinner :: GObjectClass obj => obj -> CellRendererSpinner
-castToCellRendererSpinner = castTo gTypeCellRendererSpinner "CellRendererSpinner"
-
-gTypeCellRendererSpinner :: GType
-gTypeCellRendererSpinner =
-  {# call fun unsafe gtk_cell_renderer_spinner_get_type #}
-
--- ********************************************************* CellRendererPixbuf
-
-{#pointer *CellRendererPixbuf foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererPixbuf = (CellRendererPixbuf, objectUnrefFromMainloop)
-unCellRendererPixbuf (CellRendererPixbuf o) = o
-
-class CellRendererClass o => CellRendererPixbufClass o
-toCellRendererPixbuf :: CellRendererPixbufClass o => o -> CellRendererPixbuf
-toCellRendererPixbuf = unsafeCastGObject . toGObject
-
-instance CellRendererPixbufClass CellRendererPixbuf
-instance CellRendererClass CellRendererPixbuf
-instance ObjectClass CellRendererPixbuf
-instance GObjectClass CellRendererPixbuf where
-  toGObject = GObject . castForeignPtr . unCellRendererPixbuf
-  unsafeCastGObject = CellRendererPixbuf . castForeignPtr . unGObject
-
-castToCellRendererPixbuf :: GObjectClass obj => obj -> CellRendererPixbuf
-castToCellRendererPixbuf = castTo gTypeCellRendererPixbuf "CellRendererPixbuf"
-
-gTypeCellRendererPixbuf :: GType
-gTypeCellRendererPixbuf =
-  {# call fun unsafe gtk_cell_renderer_pixbuf_get_type #}
-
--- *********************************************************** CellRendererText
-
-{#pointer *CellRendererText foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererText = (CellRendererText, objectUnrefFromMainloop)
-unCellRendererText (CellRendererText o) = o
-
-class CellRendererClass o => CellRendererTextClass o
-toCellRendererText :: CellRendererTextClass o => o -> CellRendererText
-toCellRendererText = unsafeCastGObject . toGObject
-
-instance CellRendererTextClass CellRendererText
-instance CellRendererClass CellRendererText
-instance ObjectClass CellRendererText
-instance GObjectClass CellRendererText where
-  toGObject = GObject . castForeignPtr . unCellRendererText
-  unsafeCastGObject = CellRendererText . castForeignPtr . unGObject
-
-castToCellRendererText :: GObjectClass obj => obj -> CellRendererText
-castToCellRendererText = castTo gTypeCellRendererText "CellRendererText"
-
-gTypeCellRendererText :: GType
-gTypeCellRendererText =
-  {# call fun unsafe gtk_cell_renderer_text_get_type #}
-
--- ********************************************************** CellRendererAccel
-
-{#pointer *CellRendererAccel foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererAccel = (CellRendererAccel, objectUnrefFromMainloop)
-unCellRendererAccel (CellRendererAccel o) = o
-
-class CellRendererTextClass o => CellRendererAccelClass o
-toCellRendererAccel :: CellRendererAccelClass o => o -> CellRendererAccel
-toCellRendererAccel = unsafeCastGObject . toGObject
-
-instance CellRendererAccelClass CellRendererAccel
-instance CellRendererTextClass CellRendererAccel
-instance CellRendererClass CellRendererAccel
-instance ObjectClass CellRendererAccel
-instance GObjectClass CellRendererAccel where
-  toGObject = GObject . castForeignPtr . unCellRendererAccel
-  unsafeCastGObject = CellRendererAccel . castForeignPtr . unGObject
-
-castToCellRendererAccel :: GObjectClass obj => obj -> CellRendererAccel
-castToCellRendererAccel = castTo gTypeCellRendererAccel "CellRendererAccel"
-
-gTypeCellRendererAccel :: GType
-gTypeCellRendererAccel =
-  {# call fun unsafe gtk_cell_renderer_accel_get_type #}
-
--- *********************************************************** CellRendererSpin
-
-{#pointer *CellRendererSpin foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererSpin = (CellRendererSpin, objectUnrefFromMainloop)
-unCellRendererSpin (CellRendererSpin o) = o
-
-class CellRendererTextClass o => CellRendererSpinClass o
-toCellRendererSpin :: CellRendererSpinClass o => o -> CellRendererSpin
-toCellRendererSpin = unsafeCastGObject . toGObject
-
-instance CellRendererSpinClass CellRendererSpin
-instance CellRendererTextClass CellRendererSpin
-instance CellRendererClass CellRendererSpin
-instance ObjectClass CellRendererSpin
-instance GObjectClass CellRendererSpin where
-  toGObject = GObject . castForeignPtr . unCellRendererSpin
-  unsafeCastGObject = CellRendererSpin . castForeignPtr . unGObject
-
-castToCellRendererSpin :: GObjectClass obj => obj -> CellRendererSpin
-castToCellRendererSpin = castTo gTypeCellRendererSpin "CellRendererSpin"
-
-gTypeCellRendererSpin :: GType
-gTypeCellRendererSpin =
-  {# call fun unsafe gtk_cell_renderer_spin_get_type #}
-
--- ********************************************************** CellRendererCombo
-
-{#pointer *CellRendererCombo foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererCombo = (CellRendererCombo, objectUnrefFromMainloop)
-unCellRendererCombo (CellRendererCombo o) = o
-
-class CellRendererTextClass o => CellRendererComboClass o
-toCellRendererCombo :: CellRendererComboClass o => o -> CellRendererCombo
-toCellRendererCombo = unsafeCastGObject . toGObject
-
-instance CellRendererComboClass CellRendererCombo
-instance CellRendererTextClass CellRendererCombo
-instance CellRendererClass CellRendererCombo
-instance ObjectClass CellRendererCombo
-instance GObjectClass CellRendererCombo where
-  toGObject = GObject . castForeignPtr . unCellRendererCombo
-  unsafeCastGObject = CellRendererCombo . castForeignPtr . unGObject
-
-castToCellRendererCombo :: GObjectClass obj => obj -> CellRendererCombo
-castToCellRendererCombo = castTo gTypeCellRendererCombo "CellRendererCombo"
-
-gTypeCellRendererCombo :: GType
-gTypeCellRendererCombo =
-  {# call fun unsafe gtk_cell_renderer_combo_get_type #}
-
--- ********************************************************* CellRendererToggle
-
-{#pointer *CellRendererToggle foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererToggle = (CellRendererToggle, objectUnrefFromMainloop)
-unCellRendererToggle (CellRendererToggle o) = o
-
-class CellRendererClass o => CellRendererToggleClass o
-toCellRendererToggle :: CellRendererToggleClass o => o -> CellRendererToggle
-toCellRendererToggle = unsafeCastGObject . toGObject
-
-instance CellRendererToggleClass CellRendererToggle
-instance CellRendererClass CellRendererToggle
-instance ObjectClass CellRendererToggle
-instance GObjectClass CellRendererToggle where
-  toGObject = GObject . castForeignPtr . unCellRendererToggle
-  unsafeCastGObject = CellRendererToggle . castForeignPtr . unGObject
-
-castToCellRendererToggle :: GObjectClass obj => obj -> CellRendererToggle
-castToCellRendererToggle = castTo gTypeCellRendererToggle "CellRendererToggle"
-
-gTypeCellRendererToggle :: GType
-gTypeCellRendererToggle =
-  {# call fun unsafe gtk_cell_renderer_toggle_get_type #}
-
--- ******************************************************* CellRendererProgress
-
-{#pointer *CellRendererProgress foreign newtype #} deriving (Eq,Ord)
-
-mkCellRendererProgress = (CellRendererProgress, objectUnrefFromMainloop)
-unCellRendererProgress (CellRendererProgress o) = o
-
-class CellRendererClass o => CellRendererProgressClass o
-toCellRendererProgress :: CellRendererProgressClass o => o -> CellRendererProgress
-toCellRendererProgress = unsafeCastGObject . toGObject
-
-instance CellRendererProgressClass CellRendererProgress
-instance CellRendererClass CellRendererProgress
-instance ObjectClass CellRendererProgress
-instance GObjectClass CellRendererProgress where
-  toGObject = GObject . castForeignPtr . unCellRendererProgress
-  unsafeCastGObject = CellRendererProgress . castForeignPtr . unGObject
-
-castToCellRendererProgress :: GObjectClass obj => obj -> CellRendererProgress
-castToCellRendererProgress = castTo gTypeCellRendererProgress "CellRendererProgress"
-
-gTypeCellRendererProgress :: GType
-gTypeCellRendererProgress =
-  {# call fun unsafe gtk_cell_renderer_progress_get_type #}
-
--- ***************************************************************** FileFilter
-
-{#pointer *FileFilter foreign newtype #} deriving (Eq,Ord)
-
-mkFileFilter = (FileFilter, objectUnrefFromMainloop)
-unFileFilter (FileFilter o) = o
-
-class ObjectClass o => FileFilterClass o
-toFileFilter :: FileFilterClass o => o -> FileFilter
-toFileFilter = unsafeCastGObject . toGObject
-
-instance FileFilterClass FileFilter
-instance ObjectClass FileFilter
-instance GObjectClass FileFilter where
-  toGObject = GObject . castForeignPtr . unFileFilter
-  unsafeCastGObject = FileFilter . castForeignPtr . unGObject
-
-castToFileFilter :: GObjectClass obj => obj -> FileFilter
-castToFileFilter = castTo gTypeFileFilter "FileFilter"
-
-gTypeFileFilter :: GType
-gTypeFileFilter =
-  {# call fun unsafe gtk_file_filter_get_type #}
-
--- ******************************************************************** Builder
-
-{#pointer *Builder foreign newtype #} deriving (Eq,Ord)
-
-mkBuilder = (Builder, objectUnrefFromMainloop)
-unBuilder (Builder o) = o
-
-class ObjectClass o => BuilderClass o
-toBuilder :: BuilderClass o => o -> Builder
-toBuilder = unsafeCastGObject . toGObject
-
-instance BuilderClass Builder
-instance ObjectClass Builder
-instance GObjectClass Builder where
-  toGObject = GObject . castForeignPtr . unBuilder
-  unsafeCastGObject = Builder . castForeignPtr . unGObject
-
-castToBuilder :: GObjectClass obj => obj -> Builder
-castToBuilder = castTo gTypeBuilder "Builder"
-
-gTypeBuilder :: GType
-gTypeBuilder =
-  {# call fun unsafe gtk_builder_get_type #}
-
--- ***************************************************************** CellLayout
-
-{#pointer *CellLayout foreign newtype #} deriving (Eq,Ord)
-
-mkCellLayout = (CellLayout, objectUnrefFromMainloop)
-unCellLayout (CellLayout o) = o
-
-class GObjectClass o => CellLayoutClass o
-toCellLayout :: CellLayoutClass o => o -> CellLayout
-toCellLayout = unsafeCastGObject . toGObject
-
-instance CellLayoutClass CellLayout
-instance GObjectClass CellLayout where
-  toGObject = GObject . castForeignPtr . unCellLayout
-  unsafeCastGObject = CellLayout . castForeignPtr . unGObject
-
-castToCellLayout :: GObjectClass obj => obj -> CellLayout
-castToCellLayout = castTo gTypeCellLayout "CellLayout"
-
-gTypeCellLayout :: GType
-gTypeCellLayout =
-  {# call fun unsafe gtk_cell_layout_get_type #}
-
--- *************************************************************** TreeSortable
-
-{#pointer *TreeSortable foreign newtype #} deriving (Eq,Ord)
-
-mkTreeSortable = (TreeSortable, objectUnrefFromMainloop)
-unTreeSortable (TreeSortable o) = o
-
-class GObjectClass o => TreeSortableClass o
-toTreeSortable :: TreeSortableClass o => o -> TreeSortable
-toTreeSortable = unsafeCastGObject . toGObject
-
-instance TreeSortableClass TreeSortable
-instance GObjectClass TreeSortable where
-  toGObject = GObject . castForeignPtr . unTreeSortable
-  unsafeCastGObject = TreeSortable . castForeignPtr . unGObject
-
-castToTreeSortable :: GObjectClass obj => obj -> TreeSortable
-castToTreeSortable = castTo gTypeTreeSortable "TreeSortable"
-
-gTypeTreeSortable :: GType
-gTypeTreeSortable =
-  {# call fun unsafe gtk_tree_sortable_get_type #}
-
--- ******************************************************************** Tooltip
-
-{#pointer *Tooltip foreign newtype #} deriving (Eq,Ord)
-
-mkTooltip = (Tooltip, objectUnrefFromMainloop)
-unTooltip (Tooltip o) = o
-
-class GObjectClass o => TooltipClass o
-toTooltip :: TooltipClass o => o -> Tooltip
-toTooltip = unsafeCastGObject . toGObject
-
-instance TooltipClass Tooltip
-instance GObjectClass Tooltip where
-  toGObject = GObject . castForeignPtr . unTooltip
-  unsafeCastGObject = Tooltip . castForeignPtr . unGObject
-
-castToTooltip :: GObjectClass obj => obj -> Tooltip
-castToTooltip = castTo gTypeTooltip "Tooltip"
-
-gTypeTooltip :: GType
-gTypeTooltip =
-  {# call fun unsafe gtk_tooltip_get_type #}
-
--- ***************************************************************** StatusIcon
-
-{#pointer *StatusIcon foreign newtype #} deriving (Eq,Ord)
-
-mkStatusIcon = (StatusIcon, objectUnrefFromMainloop)
-unStatusIcon (StatusIcon o) = o
-
-class TooltipClass o => StatusIconClass o
-toStatusIcon :: StatusIconClass o => o -> StatusIcon
-toStatusIcon = unsafeCastGObject . toGObject
-
-instance StatusIconClass StatusIcon
-instance TooltipClass StatusIcon
-instance GObjectClass StatusIcon where
-  toGObject = GObject . castForeignPtr . unStatusIcon
-  unsafeCastGObject = StatusIcon . castForeignPtr . unGObject
-
-castToStatusIcon :: GObjectClass obj => obj -> StatusIcon
-castToStatusIcon = castTo gTypeStatusIcon "StatusIcon"
-
-gTypeStatusIcon :: GType
-gTypeStatusIcon =
-  {# call fun unsafe gtk_status_icon_get_type #}
-
--- ************************************************************** TreeSelection
-
-{#pointer *TreeSelection foreign newtype #} deriving (Eq,Ord)
-
-mkTreeSelection = (TreeSelection, objectUnrefFromMainloop)
-unTreeSelection (TreeSelection o) = o
-
-class GObjectClass o => TreeSelectionClass o
-toTreeSelection :: TreeSelectionClass o => o -> TreeSelection
-toTreeSelection = unsafeCastGObject . toGObject
-
-instance TreeSelectionClass TreeSelection
-instance GObjectClass TreeSelection where
-  toGObject = GObject . castForeignPtr . unTreeSelection
-  unsafeCastGObject = TreeSelection . castForeignPtr . unGObject
-
-castToTreeSelection :: GObjectClass obj => obj -> TreeSelection
-castToTreeSelection = castTo gTypeTreeSelection "TreeSelection"
-
-gTypeTreeSelection :: GType
-gTypeTreeSelection =
-  {# call fun unsafe gtk_tree_selection_get_type #}
-
--- ****************************************************************** TreeModel
-
-{#pointer *TreeModel foreign newtype #} deriving (Eq,Ord)
-
-mkTreeModel = (TreeModel, objectUnrefFromMainloop)
-unTreeModel (TreeModel o) = o
-
-class GObjectClass o => TreeModelClass o
-toTreeModel :: TreeModelClass o => o -> TreeModel
-toTreeModel = unsafeCastGObject . toGObject
-
-instance TreeModelClass TreeModel
-instance GObjectClass TreeModel where
-  toGObject = GObject . castForeignPtr . unTreeModel
-  unsafeCastGObject = TreeModel . castForeignPtr . unGObject
-
-castToTreeModel :: GObjectClass obj => obj -> TreeModel
-castToTreeModel = castTo gTypeTreeModel "TreeModel"
-
-gTypeTreeModel :: GType
-gTypeTreeModel =
-  {# call fun unsafe gtk_tree_model_get_type #}
-
--- ****************************************************************** TreeStore
-
-{#pointer *TreeStore foreign newtype #} deriving (Eq,Ord)
-
-mkTreeStore = (TreeStore, objectUnrefFromMainloop)
-unTreeStore (TreeStore o) = o
-
-class TreeModelClass o => TreeStoreClass o
-toTreeStore :: TreeStoreClass o => o -> TreeStore
-toTreeStore = unsafeCastGObject . toGObject
-
-instance TreeStoreClass TreeStore
-instance TreeModelClass TreeStore
-instance GObjectClass TreeStore where
-  toGObject = GObject . castForeignPtr . unTreeStore
-  unsafeCastGObject = TreeStore . castForeignPtr . unGObject
-
-castToTreeStore :: GObjectClass obj => obj -> TreeStore
-castToTreeStore = castTo gTypeTreeStore "TreeStore"
-
-gTypeTreeStore :: GType
-gTypeTreeStore =
-  {# call fun unsafe gtk_tree_store_get_type #}
-
--- ****************************************************************** ListStore
-
-{#pointer *ListStore foreign newtype #} deriving (Eq,Ord)
-
-mkListStore = (ListStore, objectUnrefFromMainloop)
-unListStore (ListStore o) = o
-
-class TreeModelClass o => ListStoreClass o
-toListStore :: ListStoreClass o => o -> ListStore
-toListStore = unsafeCastGObject . toGObject
-
-instance ListStoreClass ListStore
-instance TreeModelClass ListStore
-instance GObjectClass ListStore where
-  toGObject = GObject . castForeignPtr . unListStore
-  unsafeCastGObject = ListStore . castForeignPtr . unGObject
-
-castToListStore :: GObjectClass obj => obj -> ListStore
-castToListStore = castTo gTypeListStore "ListStore"
-
-gTypeListStore :: GType
-gTypeListStore =
-  {# call fun unsafe gtk_list_store_get_type #}
-
--- ************************************************************** TreeModelSort
-
-{#pointer *TreeModelSort foreign newtype #} deriving (Eq,Ord)
-
-mkTreeModelSort = (TreeModelSort, objectUnrefFromMainloop)
-unTreeModelSort (TreeModelSort o) = o
-
-class GObjectClass o => TreeModelSortClass o
-toTreeModelSort :: TreeModelSortClass o => o -> TreeModelSort
-toTreeModelSort = unsafeCastGObject . toGObject
-
-instance TreeModelSortClass TreeModelSort
-instance GObjectClass TreeModelSort where
-  toGObject = GObject . castForeignPtr . unTreeModelSort
-  unsafeCastGObject = TreeModelSort . castForeignPtr . unGObject
-
-castToTreeModelSort :: GObjectClass obj => obj -> TreeModelSort
-castToTreeModelSort = castTo gTypeTreeModelSort "TreeModelSort"
-
-gTypeTreeModelSort :: GType
-gTypeTreeModelSort =
-  {# call fun unsafe gtk_tree_model_sort_get_type #}
-
--- ************************************************************ TreeModelFilter
-
-{#pointer *TreeModelFilter foreign newtype #} deriving (Eq,Ord)
-
-mkTreeModelFilter = (TreeModelFilter, objectUnrefFromMainloop)
-unTreeModelFilter (TreeModelFilter o) = o
-
-class GObjectClass o => TreeModelFilterClass o
-toTreeModelFilter :: TreeModelFilterClass o => o -> TreeModelFilter
-toTreeModelFilter = unsafeCastGObject . toGObject
-
-instance TreeModelFilterClass TreeModelFilter
-instance GObjectClass TreeModelFilter where
-  toGObject = GObject . castForeignPtr . unTreeModelFilter
-  unsafeCastGObject = TreeModelFilter . castForeignPtr . unGObject
-
-castToTreeModelFilter :: GObjectClass obj => obj -> TreeModelFilter
-castToTreeModelFilter = castTo gTypeTreeModelFilter "TreeModelFilter"
-
-gTypeTreeModelFilter :: GType
-gTypeTreeModelFilter =
-  {# call fun unsafe gtk_tree_model_filter_get_type #}
-
--- **************************************************************** IconFactory
-
-{#pointer *IconFactory foreign newtype #} deriving (Eq,Ord)
-
-mkIconFactory = (IconFactory, objectUnrefFromMainloop)
-unIconFactory (IconFactory o) = o
-
-class GObjectClass o => IconFactoryClass o
-toIconFactory :: IconFactoryClass o => o -> IconFactory
-toIconFactory = unsafeCastGObject . toGObject
-
-instance IconFactoryClass IconFactory
-instance GObjectClass IconFactory where
-  toGObject = GObject . castForeignPtr . unIconFactory
-  unsafeCastGObject = IconFactory . castForeignPtr . unGObject
-
-castToIconFactory :: GObjectClass obj => obj -> IconFactory
-castToIconFactory = castTo gTypeIconFactory "IconFactory"
-
-gTypeIconFactory :: GType
-gTypeIconFactory =
-  {# call fun unsafe gtk_icon_factory_get_type #}
-
--- ****************************************************************** IconTheme
-
-{#pointer *IconTheme foreign newtype #} deriving (Eq,Ord)
-
-mkIconTheme = (IconTheme, objectUnrefFromMainloop)
-unIconTheme (IconTheme o) = o
-
-class GObjectClass o => IconThemeClass o
-toIconTheme :: IconThemeClass o => o -> IconTheme
-toIconTheme = unsafeCastGObject . toGObject
-
-instance IconThemeClass IconTheme
-instance GObjectClass IconTheme where
-  toGObject = GObject . castForeignPtr . unIconTheme
-  unsafeCastGObject = IconTheme . castForeignPtr . unGObject
-
-castToIconTheme :: GObjectClass obj => obj -> IconTheme
-castToIconTheme = castTo gTypeIconTheme "IconTheme"
-
-gTypeIconTheme :: GType
-gTypeIconTheme =
-  {# call fun unsafe gtk_icon_theme_get_type #}
-
--- ****************************************************************** SizeGroup
-
-{#pointer *SizeGroup foreign newtype #} deriving (Eq,Ord)
-
-mkSizeGroup = (SizeGroup, objectUnrefFromMainloop)
-unSizeGroup (SizeGroup o) = o
-
-class GObjectClass o => SizeGroupClass o
-toSizeGroup :: SizeGroupClass o => o -> SizeGroup
-toSizeGroup = unsafeCastGObject . toGObject
-
-instance SizeGroupClass SizeGroup
-instance GObjectClass SizeGroup where
-  toGObject = GObject . castForeignPtr . unSizeGroup
-  unsafeCastGObject = SizeGroup . castForeignPtr . unGObject
-
-castToSizeGroup :: GObjectClass obj => obj -> SizeGroup
-castToSizeGroup = castTo gTypeSizeGroup "SizeGroup"
-
-gTypeSizeGroup :: GType
-gTypeSizeGroup =
-  {# call fun unsafe gtk_size_group_get_type #}
-
--- ****************************************************************** Clipboard
-
-{#pointer *Clipboard foreign newtype #} deriving (Eq,Ord)
-
-mkClipboard = (Clipboard, objectUnrefFromMainloop)
-unClipboard (Clipboard o) = o
-
-class GObjectClass o => ClipboardClass o
-toClipboard :: ClipboardClass o => o -> Clipboard
-toClipboard = unsafeCastGObject . toGObject
-
-instance ClipboardClass Clipboard
-instance GObjectClass Clipboard where
-  toGObject = GObject . castForeignPtr . unClipboard
-  unsafeCastGObject = Clipboard . castForeignPtr . unGObject
-
-castToClipboard :: GObjectClass obj => obj -> Clipboard
-castToClipboard = castTo gTypeClipboard "Clipboard"
-
-gTypeClipboard :: GType
-gTypeClipboard =
-  {# call fun unsafe gtk_clipboard_get_type #}
-
--- ***************************************************************** AccelGroup
-
-{#pointer *AccelGroup foreign newtype #} deriving (Eq,Ord)
-
-mkAccelGroup = (AccelGroup, objectUnrefFromMainloop)
-unAccelGroup (AccelGroup o) = o
-
-class GObjectClass o => AccelGroupClass o
-toAccelGroup :: AccelGroupClass o => o -> AccelGroup
-toAccelGroup = unsafeCastGObject . toGObject
-
-instance AccelGroupClass AccelGroup
-instance GObjectClass AccelGroup where
-  toGObject = GObject . castForeignPtr . unAccelGroup
-  unsafeCastGObject = AccelGroup . castForeignPtr . unGObject
-
-castToAccelGroup :: GObjectClass obj => obj -> AccelGroup
-castToAccelGroup = castTo gTypeAccelGroup "AccelGroup"
-
-gTypeAccelGroup :: GType
-gTypeAccelGroup =
-  {# call fun unsafe gtk_accel_group_get_type #}
-
--- ******************************************************************* AccelMap
-
-{#pointer *AccelMap foreign newtype #} deriving (Eq,Ord)
-
-mkAccelMap = (AccelMap, objectUnrefFromMainloop)
-unAccelMap (AccelMap o) = o
-
-class GObjectClass o => AccelMapClass o
-toAccelMap :: AccelMapClass o => o -> AccelMap
-toAccelMap = unsafeCastGObject . toGObject
-
-instance AccelMapClass AccelMap
-instance GObjectClass AccelMap where
-  toGObject = GObject . castForeignPtr . unAccelMap
-  unsafeCastGObject = AccelMap . castForeignPtr . unGObject
-
-castToAccelMap :: GObjectClass obj => obj -> AccelMap
-castToAccelMap = castTo gTypeAccelMap "AccelMap"
-
-gTypeAccelMap :: GType
-gTypeAccelMap =
-  {# call fun unsafe gtk_accel_map_get_type #}
-
--- ************************************************************ EntryCompletion
-
-{#pointer *EntryCompletion foreign newtype #} deriving (Eq,Ord)
-
-mkEntryCompletion = (EntryCompletion, objectUnrefFromMainloop)
-unEntryCompletion (EntryCompletion o) = o
-
-class GObjectClass o => EntryCompletionClass o
-toEntryCompletion :: EntryCompletionClass o => o -> EntryCompletion
-toEntryCompletion = unsafeCastGObject . toGObject
-
-instance EntryCompletionClass EntryCompletion
-instance GObjectClass EntryCompletion where
-  toGObject = GObject . castForeignPtr . unEntryCompletion
-  unsafeCastGObject = EntryCompletion . castForeignPtr . unGObject
-
-castToEntryCompletion :: GObjectClass obj => obj -> EntryCompletion
-castToEntryCompletion = castTo gTypeEntryCompletion "EntryCompletion"
-
-gTypeEntryCompletion :: GType
-gTypeEntryCompletion =
-  {# call fun unsafe gtk_entry_completion_get_type #}
-
--- **************************************************************** EntryBuffer
-
-{#pointer *EntryBuffer foreign newtype #} deriving (Eq,Ord)
-
-mkEntryBuffer = (EntryBuffer, objectUnrefFromMainloop)
-unEntryBuffer (EntryBuffer o) = o
-
-class GObjectClass o => EntryBufferClass o
-toEntryBuffer :: EntryBufferClass o => o -> EntryBuffer
-toEntryBuffer = unsafeCastGObject . toGObject
-
-instance EntryBufferClass EntryBuffer
-instance GObjectClass EntryBuffer where
-  toGObject = GObject . castForeignPtr . unEntryBuffer
-  unsafeCastGObject = EntryBuffer . castForeignPtr . unGObject
-
-castToEntryBuffer :: GObjectClass obj => obj -> EntryBuffer
-castToEntryBuffer = castTo gTypeEntryBuffer "EntryBuffer"
-
-gTypeEntryBuffer :: GType
-gTypeEntryBuffer =
-  {# call fun unsafe gtk_entry_buffer_get_type #}
-
--- ********************************************************************* Action
-
-{#pointer *Action foreign newtype #} deriving (Eq,Ord)
-
-mkAction = (Action, objectUnrefFromMainloop)
-unAction (Action o) = o
-
-class GObjectClass o => ActionClass o
-toAction :: ActionClass o => o -> Action
-toAction = unsafeCastGObject . toGObject
-
-instance ActionClass Action
-instance GObjectClass Action where
-  toGObject = GObject . castForeignPtr . unAction
-  unsafeCastGObject = Action . castForeignPtr . unGObject
-
-castToAction :: GObjectClass obj => obj -> Action
-castToAction = castTo gTypeAction "Action"
-
-gTypeAction :: GType
-gTypeAction =
-  {# call fun unsafe gtk_action_get_type #}
-
--- *************************************************************** RecentAction
-
-{#pointer *RecentAction foreign newtype #} deriving (Eq,Ord)
-
-mkRecentAction = (RecentAction, objectUnrefFromMainloop)
-unRecentAction (RecentAction o) = o
-
-class ActionClass o => RecentActionClass o
-toRecentAction :: RecentActionClass o => o -> RecentAction
-toRecentAction = unsafeCastGObject . toGObject
-
-instance RecentActionClass RecentAction
-instance ActionClass RecentAction
-instance GObjectClass RecentAction where
-  toGObject = GObject . castForeignPtr . unRecentAction
-  unsafeCastGObject = RecentAction . castForeignPtr . unGObject
-
-castToRecentAction :: GObjectClass obj => obj -> RecentAction
-castToRecentAction = castTo gTypeRecentAction "RecentAction"
-
-gTypeRecentAction :: GType
-gTypeRecentAction =
-  {# call fun unsafe gtk_recent_action_get_type #}
-
--- *************************************************************** ToggleAction
-
-{#pointer *ToggleAction foreign newtype #} deriving (Eq,Ord)
-
-mkToggleAction = (ToggleAction, objectUnrefFromMainloop)
-unToggleAction (ToggleAction o) = o
-
-class ActionClass o => ToggleActionClass o
-toToggleAction :: ToggleActionClass o => o -> ToggleAction
-toToggleAction = unsafeCastGObject . toGObject
-
-instance ToggleActionClass ToggleAction
-instance ActionClass ToggleAction
-instance GObjectClass ToggleAction where
-  toGObject = GObject . castForeignPtr . unToggleAction
-  unsafeCastGObject = ToggleAction . castForeignPtr . unGObject
-
-castToToggleAction :: GObjectClass obj => obj -> ToggleAction
-castToToggleAction = castTo gTypeToggleAction "ToggleAction"
-
-gTypeToggleAction :: GType
-gTypeToggleAction =
-  {# call fun unsafe gtk_toggle_action_get_type #}
-
--- **************************************************************** RadioAction
-
-{#pointer *RadioAction foreign newtype #} deriving (Eq,Ord)
-
-mkRadioAction = (RadioAction, objectUnrefFromMainloop)
-unRadioAction (RadioAction o) = o
-
-class ToggleActionClass o => RadioActionClass o
-toRadioAction :: RadioActionClass o => o -> RadioAction
-toRadioAction = unsafeCastGObject . toGObject
-
-instance RadioActionClass RadioAction
-instance ToggleActionClass RadioAction
-instance ActionClass RadioAction
-instance GObjectClass RadioAction where
-  toGObject = GObject . castForeignPtr . unRadioAction
-  unsafeCastGObject = RadioAction . castForeignPtr . unGObject
-
-castToRadioAction :: GObjectClass obj => obj -> RadioAction
-castToRadioAction = castTo gTypeRadioAction "RadioAction"
-
-gTypeRadioAction :: GType
-gTypeRadioAction =
-  {# call fun unsafe gtk_radio_action_get_type #}
-
--- **************************************************************** ActionGroup
-
-{#pointer *ActionGroup foreign newtype #} deriving (Eq,Ord)
-
-mkActionGroup = (ActionGroup, objectUnrefFromMainloop)
-unActionGroup (ActionGroup o) = o
-
-class GObjectClass o => ActionGroupClass o
-toActionGroup :: ActionGroupClass o => o -> ActionGroup
-toActionGroup = unsafeCastGObject . toGObject
-
-instance ActionGroupClass ActionGroup
-instance GObjectClass ActionGroup where
-  toGObject = GObject . castForeignPtr . unActionGroup
-  unsafeCastGObject = ActionGroup . castForeignPtr . unGObject
-
-castToActionGroup :: GObjectClass obj => obj -> ActionGroup
-castToActionGroup = castTo gTypeActionGroup "ActionGroup"
-
-gTypeActionGroup :: GType
-gTypeActionGroup =
-  {# call fun unsafe gtk_action_group_get_type #}
-
--- ****************************************************************** UIManager
-
-{#pointer *UIManager foreign newtype #} deriving (Eq,Ord)
-
-mkUIManager = (UIManager, objectUnrefFromMainloop)
-unUIManager (UIManager o) = o
-
-class GObjectClass o => UIManagerClass o
-toUIManager :: UIManagerClass o => o -> UIManager
-toUIManager = unsafeCastGObject . toGObject
-
-instance UIManagerClass UIManager
-instance GObjectClass UIManager where
-  toGObject = GObject . castForeignPtr . unUIManager
-  unsafeCastGObject = UIManager . castForeignPtr . unGObject
-
-castToUIManager :: GObjectClass obj => obj -> UIManager
-castToUIManager = castTo gTypeUIManager "UIManager"
-
-gTypeUIManager :: GType
-gTypeUIManager =
-  {# call fun unsafe gtk_ui_manager_get_type #}
-
--- **************************************************************** WindowGroup
-
-{#pointer *WindowGroup foreign newtype #} deriving (Eq,Ord)
-
-mkWindowGroup = (WindowGroup, objectUnrefFromMainloop)
-unWindowGroup (WindowGroup o) = o
-
-class GObjectClass o => WindowGroupClass o
-toWindowGroup :: WindowGroupClass o => o -> WindowGroup
-toWindowGroup = unsafeCastGObject . toGObject
-
-instance WindowGroupClass WindowGroup
-instance GObjectClass WindowGroup where
-  toGObject = GObject . castForeignPtr . unWindowGroup
-  unsafeCastGObject = WindowGroup . castForeignPtr . unGObject
-
-castToWindowGroup :: GObjectClass obj => obj -> WindowGroup
-castToWindowGroup = castTo gTypeWindowGroup "WindowGroup"
-
-gTypeWindowGroup :: GType
-gTypeWindowGroup =
-  {# call fun unsafe gtk_window_group_get_type #}
-
--- *************************************************************** CellEditable
-
-{#pointer *CellEditable foreign newtype #} deriving (Eq,Ord)
-
-mkCellEditable = (CellEditable, objectUnrefFromMainloop)
-unCellEditable (CellEditable o) = o
-
-class GObjectClass o => CellEditableClass o
-toCellEditable :: CellEditableClass o => o -> CellEditable
-toCellEditable = unsafeCastGObject . toGObject
-
-instance CellEditableClass CellEditable
-instance GObjectClass CellEditable where
-  toGObject = GObject . castForeignPtr . unCellEditable
-  unsafeCastGObject = CellEditable . castForeignPtr . unGObject
-
-castToCellEditable :: GObjectClass obj => obj -> CellEditable
-castToCellEditable = castTo gTypeCellEditable "CellEditable"
-
-gTypeCellEditable :: GType
-gTypeCellEditable =
-  {# call fun unsafe gtk_cell_editable_get_type #}
-
--- ******************************************************************* Editable
-
-{#pointer *Editable foreign newtype #} deriving (Eq,Ord)
-
-mkEditable = (Editable, objectUnrefFromMainloop)
-unEditable (Editable o) = o
-
-class GObjectClass o => EditableClass o
-toEditable :: EditableClass o => o -> Editable
-toEditable = unsafeCastGObject . toGObject
-
-instance EditableClass Editable
-instance GObjectClass Editable where
-  toGObject = GObject . castForeignPtr . unEditable
-  unsafeCastGObject = Editable . castForeignPtr . unGObject
-
-castToEditable :: GObjectClass obj => obj -> Editable
-castToEditable = castTo gTypeEditable "Editable"
-
-gTypeEditable :: GType
-gTypeEditable =
-  {# call fun unsafe gtk_editable_get_type #}
-
--- **************************************************************** FileChooser
-
-{#pointer *FileChooser foreign newtype #} deriving (Eq,Ord)
-
-mkFileChooser = (FileChooser, objectUnrefFromMainloop)
-unFileChooser (FileChooser o) = o
-
-class GObjectClass o => FileChooserClass o
-toFileChooser :: FileChooserClass o => o -> FileChooser
-toFileChooser = unsafeCastGObject . toGObject
-
-instance FileChooserClass FileChooser
-instance GObjectClass FileChooser where
-  toGObject = GObject . castForeignPtr . unFileChooser
-  unsafeCastGObject = FileChooser . castForeignPtr . unGObject
-
-castToFileChooser :: GObjectClass obj => obj -> FileChooser
-castToFileChooser = castTo gTypeFileChooser "FileChooser"
-
-gTypeFileChooser :: GType
-gTypeFileChooser =
-  {# call fun unsafe gtk_file_chooser_get_type #}
-
--- ************************************************************************* GC
-
-{#pointer *GdkGC as GC foreign newtype #} deriving (Eq,Ord)
-
-mkGC = (GC, objectUnrefFromMainloop)
-unGC (GC o) = o
-
-class GObjectClass o => GCClass o
-toGC :: GCClass o => o -> GC
-toGC = unsafeCastGObject . toGObject
-
-instance GCClass GC
-instance GObjectClass GC where
-  toGObject = GObject . castForeignPtr . unGC
-  unsafeCastGObject = GC . castForeignPtr . unGObject
-
-castToGC :: GObjectClass obj => obj -> GC
-castToGC = castTo gTypeGC "GC"
-
-gTypeGC :: GType
-gTypeGC =
-  {# call fun unsafe gdk_gc_get_type #}
+-- -*-haskell-*-
+-- -------------------- automatically generated file - do not edit ----------
+--  Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell
+--
+--  Author : Axel Simon
+--
+--  Copyright (C) 2001-2005 Axel Simon
+--
+--  This library is free software; you can redistribute it and/or
+--  modify it under the terms of the GNU Lesser General Public
+--  License as published by the Free Software Foundation; either
+--  version 2.1 of the License, or (at your option) any later version.
+--
+--  This library is distributed in the hope that it will be useful,
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+--  Lesser General Public License for more details.
+--
+-- #hide
+
+-- |
+-- Maintainer  : gtk2hs-users@lists.sourceforge.net
+-- Stability   : provisional
+-- Portability : portable (depends on GHC)
+--
+-- This file reflects the Gtk+ object hierarchy in terms of Haskell classes.
+--
+-- Note: the mk... functions were originally meant to simply be an alias
+-- for the constructor. However, in order to communicate the destructor
+-- of an object to objectNew, the mk... functions are now a tuple containing
+-- Haskell constructor and the destructor function pointer. This hack avoids
+-- changing all modules that simply pass mk... to objectNew.
+--
+module Graphics.UI.Gtk.Types (
+
+  module System.Glib.GObject,
+  module Graphics.UI.Gtk.General.Threading,
+  AtkObject(AtkObject), AtkObjectClass,
+  toAtkObject, 
+  mkAtkObject, unAtkObject,
+  castToAtkObject, gTypeAtkObject,
+  Accessible(Accessible), AccessibleClass,
+  toAccessible, 
+  mkAccessible, unAccessible,
+  castToAccessible, gTypeAccessible,
+  Keymap(Keymap), KeymapClass,
+  toKeymap, 
+  mkKeymap, unKeymap,
+  castToKeymap, gTypeKeymap,
+  DisplayManager(DisplayManager), DisplayManagerClass,
+  toDisplayManager, 
+  mkDisplayManager, unDisplayManager,
+  castToDisplayManager, gTypeDisplayManager,
+  AppLaunchContext(AppLaunchContext), AppLaunchContextClass,
+  toAppLaunchContext, 
+  mkAppLaunchContext, unAppLaunchContext,
+  castToAppLaunchContext, gTypeAppLaunchContext,
+  PrintSettings(PrintSettings), PrintSettingsClass,
+  toPrintSettings, 
+  mkPrintSettings, unPrintSettings,
+  castToPrintSettings, gTypePrintSettings,
+  PrintOperation(PrintOperation), PrintOperationClass,
+  toPrintOperation, 
+  mkPrintOperation, unPrintOperation,
+  castToPrintOperation, gTypePrintOperation,
+  PrintOperationPreview(PrintOperationPreview), PrintOperationPreviewClass,
+  toPrintOperationPreview, 
+  mkPrintOperationPreview, unPrintOperationPreview,
+  castToPrintOperationPreview, gTypePrintOperationPreview,
+  PageSetup(PageSetup), PageSetupClass,
+  toPageSetup, 
+  mkPageSetup, unPageSetup,
+  castToPageSetup, gTypePageSetup,
+  PrintContext(PrintContext), PrintContextClass,
+  toPrintContext, 
+  mkPrintContext, unPrintContext,
+  castToPrintContext, gTypePrintContext,
+  RecentChooser(RecentChooser), RecentChooserClass,
+  toRecentChooser, 
+  mkRecentChooser, unRecentChooser,
+  castToRecentChooser, gTypeRecentChooser,
+  RecentManager(RecentManager), RecentManagerClass,
+  toRecentManager, 
+  mkRecentManager, unRecentManager,
+  castToRecentManager, gTypeRecentManager,
+  DrawWindow(DrawWindow), DrawWindowClass,
+  toDrawWindow, 
+  mkDrawWindow, unDrawWindow,
+  castToDrawWindow, gTypeDrawWindow,
+  Screen(Screen), ScreenClass,
+  toScreen, 
+  mkScreen, unScreen,
+  castToScreen, gTypeScreen,
+  Display(Display), DisplayClass,
+  toDisplay, 
+  mkDisplay, unDisplay,
+  castToDisplay, gTypeDisplay,
+  Visual(Visual), VisualClass,
+  toVisual, 
+  mkVisual, unVisual,
+  castToVisual, gTypeVisual,
+  Device(Device), DeviceClass,
+  toDevice, 
+  mkDevice, unDevice,
+  castToDevice, gTypeDevice,
+  Settings(Settings), SettingsClass,
+  toSettings, 
+  mkSettings, unSettings,
+  castToSettings, gTypeSettings,
+  TextBuffer(TextBuffer), TextBufferClass,
+  toTextBuffer, 
+  mkTextBuffer, unTextBuffer,
+  castToTextBuffer, gTypeTextBuffer,
+  TextTag(TextTag), TextTagClass,
+  toTextTag, 
+  mkTextTag, unTextTag,
+  castToTextTag, gTypeTextTag,
+  TextTagTable(TextTagTable), TextTagTableClass,
+  toTextTagTable, 
+  mkTextTagTable, unTextTagTable,
+  castToTextTagTable, gTypeTextTagTable,
+  Style(Style), StyleClass,
+  toStyle, 
+  mkStyle, unStyle,
+  castToStyle, gTypeStyle,
+  RcStyle(RcStyle), RcStyleClass,
+  toRcStyle, 
+  mkRcStyle, unRcStyle,
+  castToRcStyle, gTypeRcStyle,
+  DragContext(DragContext), DragContextClass,
+  toDragContext, 
+  mkDragContext, unDragContext,
+  castToDragContext, gTypeDragContext,
+  Pixbuf(Pixbuf), PixbufClass,
+  toPixbuf, 
+  mkPixbuf, unPixbuf,
+  castToPixbuf, gTypePixbuf,
+  PixbufAnimation(PixbufAnimation), PixbufAnimationClass,
+  toPixbufAnimation, 
+  mkPixbufAnimation, unPixbufAnimation,
+  castToPixbufAnimation, gTypePixbufAnimation,
+  PixbufSimpleAnim(PixbufSimpleAnim), PixbufSimpleAnimClass,
+  toPixbufSimpleAnim, 
+  mkPixbufSimpleAnim, unPixbufSimpleAnim,
+  castToPixbufSimpleAnim, gTypePixbufSimpleAnim,
+  PixbufAnimationIter(PixbufAnimationIter), PixbufAnimationIterClass,
+  toPixbufAnimationIter, 
+  mkPixbufAnimationIter, unPixbufAnimationIter,
+  castToPixbufAnimationIter, gTypePixbufAnimationIter,
+  TextChildAnchor(TextChildAnchor), TextChildAnchorClass,
+  toTextChildAnchor, 
+  mkTextChildAnchor, unTextChildAnchor,
+  castToTextChildAnchor, gTypeTextChildAnchor,
+  TextMark(TextMark), TextMarkClass,
+  toTextMark, 
+  mkTextMark, unTextMark,
+  castToTextMark, gTypeTextMark,
+  RecentFilter(RecentFilter), RecentFilterClass,
+  toRecentFilter, 
+  mkRecentFilter, unRecentFilter,
+  castToRecentFilter, gTypeRecentFilter,
+  Widget(Widget), WidgetClass,
+  toWidget, 
+  mkWidget, unWidget,
+  castToWidget, gTypeWidget,
+  HSV(HSV), HSVClass,
+  toHSV, 
+  mkHSV, unHSV,
+  castToHSV, gTypeHSV,
+  Misc(Misc), MiscClass,
+  toMisc, 
+  mkMisc, unMisc,
+  castToMisc, gTypeMisc,
+  Label(Label), LabelClass,
+  toLabel, 
+  mkLabel, unLabel,
+  castToLabel, gTypeLabel,
+  AccelLabel(AccelLabel), AccelLabelClass,
+  toAccelLabel, 
+  mkAccelLabel, unAccelLabel,
+  castToAccelLabel, gTypeAccelLabel,
+  Arrow(Arrow), ArrowClass,
+  toArrow, 
+  mkArrow, unArrow,
+  castToArrow, gTypeArrow,
+  Image(Image), ImageClass,
+  toImage, 
+  mkImage, unImage,
+  castToImage, gTypeImage,
+  Container(Container), ContainerClass,
+  toContainer, 
+  mkContainer, unContainer,
+  castToContainer, gTypeContainer,
+  ToolPalette(ToolPalette), ToolPaletteClass,
+  toToolPalette, 
+  mkToolPalette, unToolPalette,
+  castToToolPalette, gTypeToolPalette,
+  ToolItemGroup(ToolItemGroup), ToolItemGroupClass,
+  toToolItemGroup, 
+  mkToolItemGroup, unToolItemGroup,
+  castToToolItemGroup, gTypeToolItemGroup,
+  Bin(Bin), BinClass,
+  toBin, 
+  mkBin, unBin,
+  castToBin, gTypeBin,
+  Alignment(Alignment), AlignmentClass,
+  toAlignment, 
+  mkAlignment, unAlignment,
+  castToAlignment, gTypeAlignment,
+  Frame(Frame), FrameClass,
+  toFrame, 
+  mkFrame, unFrame,
+  castToFrame, gTypeFrame,
+  AspectFrame(AspectFrame), AspectFrameClass,
+  toAspectFrame, 
+  mkAspectFrame, unAspectFrame,
+  castToAspectFrame, gTypeAspectFrame,
+  Button(Button), ButtonClass,
+  toButton, 
+  mkButton, unButton,
+  castToButton, gTypeButton,
+  ScaleButton(ScaleButton), ScaleButtonClass,
+  toScaleButton, 
+  mkScaleButton, unScaleButton,
+  castToScaleButton, gTypeScaleButton,
+  VolumeButton(VolumeButton), VolumeButtonClass,
+  toVolumeButton, 
+  mkVolumeButton, unVolumeButton,
+  castToVolumeButton, gTypeVolumeButton,
+  LinkButton(LinkButton), LinkButtonClass,
+  toLinkButton, 
+  mkLinkButton, unLinkButton,
+  castToLinkButton, gTypeLinkButton,
+  ToggleButton(ToggleButton), ToggleButtonClass,
+  toToggleButton, 
+  mkToggleButton, unToggleButton,
+  castToToggleButton, gTypeToggleButton,
+  CheckButton(CheckButton), CheckButtonClass,
+  toCheckButton, 
+  mkCheckButton, unCheckButton,
+  castToCheckButton, gTypeCheckButton,
+  RadioButton(RadioButton), RadioButtonClass,
+  toRadioButton, 
+  mkRadioButton, unRadioButton,
+  castToRadioButton, gTypeRadioButton,
+  ColorButton(ColorButton), ColorButtonClass,
+  toColorButton, 
+  mkColorButton, unColorButton,
+  castToColorButton, gTypeColorButton,
+  FontButton(FontButton), FontButtonClass,
+  toFontButton, 
+  mkFontButton, unFontButton,
+  castToFontButton, gTypeFontButton,
+  MenuItem(MenuItem), MenuItemClass,
+  toMenuItem, 
+  mkMenuItem, unMenuItem,
+  castToMenuItem, gTypeMenuItem,
+  CheckMenuItem(CheckMenuItem), CheckMenuItemClass,
+  toCheckMenuItem, 
+  mkCheckMenuItem, unCheckMenuItem,
+  castToCheckMenuItem, gTypeCheckMenuItem,
+  RadioMenuItem(RadioMenuItem), RadioMenuItemClass,
+  toRadioMenuItem, 
+  mkRadioMenuItem, unRadioMenuItem,
+  castToRadioMenuItem, gTypeRadioMenuItem,
+  TearoffMenuItem(TearoffMenuItem), TearoffMenuItemClass,
+  toTearoffMenuItem, 
+  mkTearoffMenuItem, unTearoffMenuItem,
+  castToTearoffMenuItem, gTypeTearoffMenuItem,
+  ImageMenuItem(ImageMenuItem), ImageMenuItemClass,
+  toImageMenuItem, 
+  mkImageMenuItem, unImageMenuItem,
+  castToImageMenuItem, gTypeImageMenuItem,
+  SeparatorMenuItem(SeparatorMenuItem), SeparatorMenuItemClass,
+  toSeparatorMenuItem, 
+  mkSeparatorMenuItem, unSeparatorMenuItem,
+  castToSeparatorMenuItem, gTypeSeparatorMenuItem,
+  Window(Window), WindowClass,
+  toWindow, 
+  mkWindow, unWindow,
+  castToWindow, gTypeWindow,
+  Assistant(Assistant), AssistantClass,
+  toAssistant, 
+  mkAssistant, unAssistant,
+  castToAssistant, gTypeAssistant,
+  OffscreenWindow(OffscreenWindow), OffscreenWindowClass,
+  toOffscreenWindow, 
+  mkOffscreenWindow, unOffscreenWindow,
+  castToOffscreenWindow, gTypeOffscreenWindow,
+  Dialog(Dialog), DialogClass,
+  toDialog, 
+  mkDialog, unDialog,
+  castToDialog, gTypeDialog,
+  AboutDialog(AboutDialog), AboutDialogClass,
+  toAboutDialog, 
+  mkAboutDialog, unAboutDialog,
+  castToAboutDialog, gTypeAboutDialog,
+  ColorSelectionDialog(ColorSelectionDialog), ColorSelectionDialogClass,
+  toColorSelectionDialog, 
+  mkColorSelectionDialog, unColorSelectionDialog,
+  castToColorSelectionDialog, gTypeColorSelectionDialog,
+  FileChooserDialog(FileChooserDialog), FileChooserDialogClass,
+  toFileChooserDialog, 
+  mkFileChooserDialog, unFileChooserDialog,
+  castToFileChooserDialog, gTypeFileChooserDialog,
+  FontSelectionDialog(FontSelectionDialog), FontSelectionDialogClass,
+  toFontSelectionDialog, 
+  mkFontSelectionDialog, unFontSelectionDialog,
+  castToFontSelectionDialog, gTypeFontSelectionDialog,
+  MessageDialog(MessageDialog), MessageDialogClass,
+  toMessageDialog, 
+  mkMessageDialog, unMessageDialog,
+  castToMessageDialog, gTypeMessageDialog,
+  EventBox(EventBox), EventBoxClass,
+  toEventBox, 
+  mkEventBox, unEventBox,
+  castToEventBox, gTypeEventBox,
+  HandleBox(HandleBox), HandleBoxClass,
+  toHandleBox, 
+  mkHandleBox, unHandleBox,
+  castToHandleBox, gTypeHandleBox,
+  ScrolledWindow(ScrolledWindow), ScrolledWindowClass,
+  toScrolledWindow, 
+  mkScrolledWindow, unScrolledWindow,
+  castToScrolledWindow, gTypeScrolledWindow,
+  Viewport(Viewport), ViewportClass,
+  toViewport, 
+  mkViewport, unViewport,
+  castToViewport, gTypeViewport,
+  Expander(Expander), ExpanderClass,
+  toExpander, 
+  mkExpander, unExpander,
+  castToExpander, gTypeExpander,
+  ComboBox(ComboBox), ComboBoxClass,
+  toComboBox, 
+  mkComboBox, unComboBox,
+  castToComboBox, gTypeComboBox,
+  ToolItem(ToolItem), ToolItemClass,
+  toToolItem, 
+  mkToolItem, unToolItem,
+  castToToolItem, gTypeToolItem,
+  ToolButton(ToolButton), ToolButtonClass,
+  toToolButton, 
+  mkToolButton, unToolButton,
+  castToToolButton, gTypeToolButton,
+  MenuToolButton(MenuToolButton), MenuToolButtonClass,
+  toMenuToolButton, 
+  mkMenuToolButton, unMenuToolButton,
+  castToMenuToolButton, gTypeMenuToolButton,
+  ToggleToolButton(ToggleToolButton), ToggleToolButtonClass,
+  toToggleToolButton, 
+  mkToggleToolButton, unToggleToolButton,
+  castToToggleToolButton, gTypeToggleToolButton,
+  RadioToolButton(RadioToolButton), RadioToolButtonClass,
+  toRadioToolButton, 
+  mkRadioToolButton, unRadioToolButton,
+  castToRadioToolButton, gTypeRadioToolButton,
+  SeparatorToolItem(SeparatorToolItem), SeparatorToolItemClass,
+  toSeparatorToolItem, 
+  mkSeparatorToolItem, unSeparatorToolItem,
+  castToSeparatorToolItem, gTypeSeparatorToolItem,
+  Box(Box), BoxClass,
+  toBox, 
+  mkBox, unBox,
+  castToBox, gTypeBox,
+  ButtonBox(ButtonBox), ButtonBoxClass,
+  toButtonBox, 
+  mkButtonBox, unButtonBox,
+  castToButtonBox, gTypeButtonBox,
+  HButtonBox(HButtonBox), HButtonBoxClass,
+  toHButtonBox, 
+  mkHButtonBox, unHButtonBox,
+  castToHButtonBox, gTypeHButtonBox,
+  VButtonBox(VButtonBox), VButtonBoxClass,
+  toVButtonBox, 
+  mkVButtonBox, unVButtonBox,
+  castToVButtonBox, gTypeVButtonBox,
+  VBox(VBox), VBoxClass,
+  toVBox, 
+  mkVBox, unVBox,
+  castToVBox, gTypeVBox,
+  RecentChooserWidget(RecentChooserWidget), RecentChooserWidgetClass,
+  toRecentChooserWidget, 
+  mkRecentChooserWidget, unRecentChooserWidget,
+  castToRecentChooserWidget, gTypeRecentChooserWidget,
+  ColorSelection(ColorSelection), ColorSelectionClass,
+  toColorSelection, 
+  mkColorSelection, unColorSelection,
+  castToColorSelection, gTypeColorSelection,
+  FontSelection(FontSelection), FontSelectionClass,
+  toFontSelection, 
+  mkFontSelection, unFontSelection,
+  castToFontSelection, gTypeFontSelection,
+  FileChooserWidget(FileChooserWidget), FileChooserWidgetClass,
+  toFileChooserWidget, 
+  mkFileChooserWidget, unFileChooserWidget,
+  castToFileChooserWidget, gTypeFileChooserWidget,
+  HBox(HBox), HBoxClass,
+  toHBox, 
+  mkHBox, unHBox,
+  castToHBox, gTypeHBox,
+  InfoBar(InfoBar), InfoBarClass,
+  toInfoBar, 
+  mkInfoBar, unInfoBar,
+  castToInfoBar, gTypeInfoBar,
+  FileChooserButton(FileChooserButton), FileChooserButtonClass,
+  toFileChooserButton, 
+  mkFileChooserButton, unFileChooserButton,
+  castToFileChooserButton, gTypeFileChooserButton,
+  Statusbar(Statusbar), StatusbarClass,
+  toStatusbar, 
+  mkStatusbar, unStatusbar,
+  castToStatusbar, gTypeStatusbar,
+  Fixed(Fixed), FixedClass,
+  toFixed, 
+  mkFixed, unFixed,
+  castToFixed, gTypeFixed,
+  Paned(Paned), PanedClass,
+  toPaned, 
+  mkPaned, unPaned,
+  castToPaned, gTypePaned,
+  HPaned(HPaned), HPanedClass,
+  toHPaned, 
+  mkHPaned, unHPaned,
+  castToHPaned, gTypeHPaned,
+  VPaned(VPaned), VPanedClass,
+  toVPaned, 
+  mkVPaned, unVPaned,
+  castToVPaned, gTypeVPaned,
+  IconView(IconView), IconViewClass,
+  toIconView, 
+  mkIconView, unIconView,
+  castToIconView, gTypeIconView,
+  Layout(Layout), LayoutClass,
+  toLayout, 
+  mkLayout, unLayout,
+  castToLayout, gTypeLayout,
+  MenuShell(MenuShell), MenuShellClass,
+  toMenuShell, 
+  mkMenuShell, unMenuShell,
+  castToMenuShell, gTypeMenuShell,
+  Menu(Menu), MenuClass,
+  toMenu, 
+  mkMenu, unMenu,
+  castToMenu, gTypeMenu,
+  RecentChooserMenu(RecentChooserMenu), RecentChooserMenuClass,
+  toRecentChooserMenu, 
+  mkRecentChooserMenu, unRecentChooserMenu,
+  castToRecentChooserMenu, gTypeRecentChooserMenu,
+  MenuBar(MenuBar), MenuBarClass,
+  toMenuBar, 
+  mkMenuBar, unMenuBar,
+  castToMenuBar, gTypeMenuBar,
+  Notebook(Notebook), NotebookClass,
+  toNotebook, 
+  mkNotebook, unNotebook,
+  castToNotebook, gTypeNotebook,
+  Table(Table), TableClass,
+  toTable, 
+  mkTable, unTable,
+  castToTable, gTypeTable,
+  TextView(TextView), TextViewClass,
+  toTextView, 
+  mkTextView, unTextView,
+  castToTextView, gTypeTextView,
+  Toolbar(Toolbar), ToolbarClass,
+  toToolbar, 
+  mkToolbar, unToolbar,
+  castToToolbar, gTypeToolbar,
+  TreeView(TreeView), TreeViewClass,
+  toTreeView, 
+  mkTreeView, unTreeView,
+  castToTreeView, gTypeTreeView,
+  Calendar(Calendar), CalendarClass,
+  toCalendar, 
+  mkCalendar, unCalendar,
+  castToCalendar, gTypeCalendar,
+  CellView(CellView), CellViewClass,
+  toCellView, 
+  mkCellView, unCellView,
+  castToCellView, gTypeCellView,
+  DrawingArea(DrawingArea), DrawingAreaClass,
+  toDrawingArea, 
+  mkDrawingArea, unDrawingArea,
+  castToDrawingArea, gTypeDrawingArea,
+  Spinner(Spinner), SpinnerClass,
+  toSpinner, 
+  mkSpinner, unSpinner,
+  castToSpinner, gTypeSpinner,
+  Entry(Entry), EntryClass,
+  toEntry, 
+  mkEntry, unEntry,
+  castToEntry, gTypeEntry,
+  SpinButton(SpinButton), SpinButtonClass,
+  toSpinButton, 
+  mkSpinButton, unSpinButton,
+  castToSpinButton, gTypeSpinButton,
+  Range(Range), RangeClass,
+  toRange, 
+  mkRange, unRange,
+  castToRange, gTypeRange,
+  Scale(Scale), ScaleClass,
+  toScale, 
+  mkScale, unScale,
+  castToScale, gTypeScale,
+  HScale(HScale), HScaleClass,
+  toHScale, 
+  mkHScale, unHScale,
+  castToHScale, gTypeHScale,
+  VScale(VScale), VScaleClass,
+  toVScale, 
+  mkVScale, unVScale,
+  castToVScale, gTypeVScale,
+  Scrollbar(Scrollbar), ScrollbarClass,
+  toScrollbar, 
+  mkScrollbar, unScrollbar,
+  castToScrollbar, gTypeScrollbar,
+  HScrollbar(HScrollbar), HScrollbarClass,
+  toHScrollbar, 
+  mkHScrollbar, unHScrollbar,
+  castToHScrollbar, gTypeHScrollbar,
+  VScrollbar(VScrollbar), VScrollbarClass,
+  toVScrollbar, 
+  mkVScrollbar, unVScrollbar,
+  castToVScrollbar, gTypeVScrollbar,
+  Separator(Separator), SeparatorClass,
+  toSeparator, 
+  mkSeparator, unSeparator,
+  castToSeparator, gTypeSeparator,
+  HSeparator(HSeparator), HSeparatorClass,
+  toHSeparator, 
+  mkHSeparator, unHSeparator,
+  castToHSeparator, gTypeHSeparator,
+  VSeparator(VSeparator), VSeparatorClass,
+  toVSeparator, 
+  mkVSeparator, unVSeparator,
+  castToVSeparator, gTypeVSeparator,
+  Invisible(Invisible), InvisibleClass,
+  toInvisible, 
+  mkInvisible, unInvisible,
+  castToInvisible, gTypeInvisible,
+  ProgressBar(ProgressBar), ProgressBarClass,
+  toProgressBar, 
+  mkProgressBar, unProgressBar,
+  castToProgressBar, gTypeProgressBar,
+  Adjustment(Adjustment), AdjustmentClass,
+  toAdjustment, 
+  mkAdjustment, unAdjustment,
+  castToAdjustment, gTypeAdjustment,
+  IMContext(IMContext), IMContextClass,
+  toIMContext, 
+  mkIMContext, unIMContext,
+  castToIMContext, gTypeIMContext,
+  IMMulticontext(IMMulticontext), IMMulticontextClass,
+  toIMMulticontext, 
+  mkIMMulticontext, unIMMulticontext,
+  castToIMMulticontext, gTypeIMMulticontext,
+  IMContextSimple(IMContextSimple), IMContextSimpleClass,
+  toIMContextSimple, 
+  mkIMContextSimple, unIMContextSimple,
+  castToIMContextSimple, gTypeIMContextSimple,
+  TreeViewColumn(TreeViewColumn), TreeViewColumnClass,
+  toTreeViewColumn, 
+  mkTreeViewColumn, unTreeViewColumn,
+  castToTreeViewColumn, gTypeTreeViewColumn,
+  CellRenderer(CellRenderer), CellRendererClass,
+  toCellRenderer, 
+  mkCellRenderer, unCellRenderer,
+  castToCellRenderer, gTypeCellRenderer,
+  CellRendererSpinner(CellRendererSpinner), CellRendererSpinnerClass,
+  toCellRendererSpinner, 
+  mkCellRendererSpinner, unCellRendererSpinner,
+  castToCellRendererSpinner, gTypeCellRendererSpinner,
+  CellRendererPixbuf(CellRendererPixbuf), CellRendererPixbufClass,
+  toCellRendererPixbuf, 
+  mkCellRendererPixbuf, unCellRendererPixbuf,
+  castToCellRendererPixbuf, gTypeCellRendererPixbuf,
+  CellRendererText(CellRendererText), CellRendererTextClass,
+  toCellRendererText, 
+  mkCellRendererText, unCellRendererText,
+  castToCellRendererText, gTypeCellRendererText,
+  CellRendererAccel(CellRendererAccel), CellRendererAccelClass,
+  toCellRendererAccel, 
+  mkCellRendererAccel, unCellRendererAccel,
+  castToCellRendererAccel, gTypeCellRendererAccel,
+  CellRendererSpin(CellRendererSpin), CellRendererSpinClass,
+  toCellRendererSpin, 
+  mkCellRendererSpin, unCellRendererSpin,
+  castToCellRendererSpin, gTypeCellRendererSpin,
+  CellRendererCombo(CellRendererCombo), CellRendererComboClass,
+  toCellRendererCombo, 
+  mkCellRendererCombo, unCellRendererCombo,
+  castToCellRendererCombo, gTypeCellRendererCombo,
+  CellRendererToggle(CellRendererToggle), CellRendererToggleClass,
+  toCellRendererToggle, 
+  mkCellRendererToggle, unCellRendererToggle,
+  castToCellRendererToggle, gTypeCellRendererToggle,
+  CellRendererProgress(CellRendererProgress), CellRendererProgressClass,
+  toCellRendererProgress, 
+  mkCellRendererProgress, unCellRendererProgress,
+  castToCellRendererProgress, gTypeCellRendererProgress,
+  FileFilter(FileFilter), FileFilterClass,
+  toFileFilter, 
+  mkFileFilter, unFileFilter,
+  castToFileFilter, gTypeFileFilter,
+  Builder(Builder), BuilderClass,
+  toBuilder, 
+  mkBuilder, unBuilder,
+  castToBuilder, gTypeBuilder,
+  StyleContext(StyleContext), StyleContextClass,
+  toStyleContext, 
+  mkStyleContext, unStyleContext,
+  castToStyleContext, gTypeStyleContext,
+  StyleProvider(StyleProvider), StyleProviderClass,
+  toStyleProvider, 
+  mkStyleProvider, unStyleProvider,
+  castToStyleProvider, gTypeStyleProvider,
+  CssProvider(CssProvider), CssProviderClass,
+  toCssProvider, 
+  mkCssProvider, unCssProvider,
+  castToCssProvider, gTypeCssProvider,
+  CellLayout(CellLayout), CellLayoutClass,
+  toCellLayout, 
+  mkCellLayout, unCellLayout,
+  castToCellLayout, gTypeCellLayout,
+  TreeSortable(TreeSortable), TreeSortableClass,
+  toTreeSortable, 
+  mkTreeSortable, unTreeSortable,
+  castToTreeSortable, gTypeTreeSortable,
+  Tooltip(Tooltip), TooltipClass,
+  toTooltip, 
+  mkTooltip, unTooltip,
+  castToTooltip, gTypeTooltip,
+  StatusIcon(StatusIcon), StatusIconClass,
+  toStatusIcon, 
+  mkStatusIcon, unStatusIcon,
+  castToStatusIcon, gTypeStatusIcon,
+  TreeSelection(TreeSelection), TreeSelectionClass,
+  toTreeSelection, 
+  mkTreeSelection, unTreeSelection,
+  castToTreeSelection, gTypeTreeSelection,
+  TreeModel(TreeModel), TreeModelClass,
+  toTreeModel, 
+  mkTreeModel, unTreeModel,
+  castToTreeModel, gTypeTreeModel,
+  TreeStore(TreeStore), TreeStoreClass,
+  toTreeStore, 
+  mkTreeStore, unTreeStore,
+  castToTreeStore, gTypeTreeStore,
+  ListStore(ListStore), ListStoreClass,
+  toListStore, 
+  mkListStore, unListStore,
+  castToListStore, gTypeListStore,
+  TreeModelSort(TreeModelSort), TreeModelSortClass,
+  toTreeModelSort, 
+  mkTreeModelSort, unTreeModelSort,
+  castToTreeModelSort, gTypeTreeModelSort,
+  TreeModelFilter(TreeModelFilter), TreeModelFilterClass,
+  toTreeModelFilter, 
+  mkTreeModelFilter, unTreeModelFilter,
+  castToTreeModelFilter, gTypeTreeModelFilter,
+  IconFactory(IconFactory), IconFactoryClass,
+  toIconFactory, 
+  mkIconFactory, unIconFactory,
+  castToIconFactory, gTypeIconFactory,
+  IconTheme(IconTheme), IconThemeClass,
+  toIconTheme, 
+  mkIconTheme, unIconTheme,
+  castToIconTheme, gTypeIconTheme,
+  SizeGroup(SizeGroup), SizeGroupClass,
+  toSizeGroup, 
+  mkSizeGroup, unSizeGroup,
+  castToSizeGroup, gTypeSizeGroup,
+  Clipboard(Clipboard), ClipboardClass,
+  toClipboard, 
+  mkClipboard, unClipboard,
+  castToClipboard, gTypeClipboard,
+  AccelGroup(AccelGroup), AccelGroupClass,
+  toAccelGroup, 
+  mkAccelGroup, unAccelGroup,
+  castToAccelGroup, gTypeAccelGroup,
+  AccelMap(AccelMap), AccelMapClass,
+  toAccelMap, 
+  mkAccelMap, unAccelMap,
+  castToAccelMap, gTypeAccelMap,
+  EntryCompletion(EntryCompletion), EntryCompletionClass,
+  toEntryCompletion, 
+  mkEntryCompletion, unEntryCompletion,
+  castToEntryCompletion, gTypeEntryCompletion,
+  EntryBuffer(EntryBuffer), EntryBufferClass,
+  toEntryBuffer, 
+  mkEntryBuffer, unEntryBuffer,
+  castToEntryBuffer, gTypeEntryBuffer,
+  Action(Action), ActionClass,
+  toAction, 
+  mkAction, unAction,
+  castToAction, gTypeAction,
+  RecentAction(RecentAction), RecentActionClass,
+  toRecentAction, 
+  mkRecentAction, unRecentAction,
+  castToRecentAction, gTypeRecentAction,
+  ToggleAction(ToggleAction), ToggleActionClass,
+  toToggleAction, 
+  mkToggleAction, unToggleAction,
+  castToToggleAction, gTypeToggleAction,
+  RadioAction(RadioAction), RadioActionClass,
+  toRadioAction, 
+  mkRadioAction, unRadioAction,
+  castToRadioAction, gTypeRadioAction,
+  ActionGroup(ActionGroup), ActionGroupClass,
+  toActionGroup, 
+  mkActionGroup, unActionGroup,
+  castToActionGroup, gTypeActionGroup,
+  UIManager(UIManager), UIManagerClass,
+  toUIManager, 
+  mkUIManager, unUIManager,
+  castToUIManager, gTypeUIManager,
+  WindowGroup(WindowGroup), WindowGroupClass,
+  toWindowGroup, 
+  mkWindowGroup, unWindowGroup,
+  castToWindowGroup, gTypeWindowGroup,
+  CellEditable(CellEditable), CellEditableClass,
+  toCellEditable, 
+  mkCellEditable, unCellEditable,
+  castToCellEditable, gTypeCellEditable,
+  Editable(Editable), EditableClass,
+  toEditable, 
+  mkEditable, unEditable,
+  castToEditable, gTypeEditable,
+  FileChooser(FileChooser), FileChooserClass,
+  toFileChooser, 
+  mkFileChooser, unFileChooser,
+  castToFileChooser, gTypeFileChooser
+  ) where
+
+import Foreign.ForeignPtr (ForeignPtr, castForeignPtr)
+#if __GLASGOW_HASKELL__ >= 707
+import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
+#else
+import Foreign.ForeignPtr (unsafeForeignPtrToPtr)
+#endif
+import Foreign.C.Types    (CULong(..), CUInt(..))
+import System.Glib.GType  (GType, typeInstanceIsA)
+{#import System.Glib.GObject#}
+import Graphics.UI.Gtk.General.Threading
+
+{# context lib="gtk" prefix="gtk" #}
+
+-- The usage of foreignPtrToPtr should be safe as the evaluation will only be
+-- forced if the object is used afterwards
+--
+castTo :: (GObjectClass obj, GObjectClass obj') => GType -> String
+                                                -> (obj -> obj')
+castTo gtype objTypeName obj =
+  case toGObject obj of
+    gobj@(GObject objFPtr)
+      | typeInstanceIsA ((unsafeForeignPtrToPtr.castForeignPtr) objFPtr) gtype
+                  -> unsafeCastGObject gobj
+      | otherwise -> error $ "Cannot cast object to " ++ objTypeName
+
+
+-- ****************************************************************** AtkObject
+
+{#pointer *AtkObject as AtkObject foreign newtype #} deriving (Eq,Ord)
+
+mkAtkObject = (AtkObject, objectUnrefFromMainloop)
+unAtkObject (AtkObject o) = o
+
+class GObjectClass o => AtkObjectClass o
+toAtkObject :: AtkObjectClass o => o -> AtkObject
+toAtkObject = unsafeCastGObject . toGObject
+
+instance AtkObjectClass AtkObject
+instance GObjectClass AtkObject where
+  toGObject = GObject . castForeignPtr . unAtkObject
+  unsafeCastGObject = AtkObject . castForeignPtr . unGObject
+
+castToAtkObject :: GObjectClass obj => obj -> AtkObject
+castToAtkObject = castTo gTypeAtkObject "AtkObject"
+
+gTypeAtkObject :: GType
+gTypeAtkObject =
+  {# call fun unsafe atk_object_get_type #}
+
+-- ***************************************************************** Accessible
+
+{#pointer *GtkAccessible as Accessible foreign newtype #} deriving (Eq,Ord)
+
+mkAccessible = (Accessible, objectUnrefFromMainloop)
+unAccessible (Accessible o) = o
+
+class AtkObjectClass o => AccessibleClass o
+toAccessible :: AccessibleClass o => o -> Accessible
+toAccessible = unsafeCastGObject . toGObject
+
+instance AccessibleClass Accessible
+instance AtkObjectClass Accessible
+instance GObjectClass Accessible where
+  toGObject = GObject . castForeignPtr . unAccessible
+  unsafeCastGObject = Accessible . castForeignPtr . unGObject
+
+castToAccessible :: GObjectClass obj => obj -> Accessible
+castToAccessible = castTo gTypeAccessible "Accessible"
+
+gTypeAccessible :: GType
+gTypeAccessible =
+  {# call fun unsafe gtk_accessible_get_type #}
+
+-- ********************************************************************* Keymap
+
+{#pointer *GdkKeymap as Keymap foreign newtype #} deriving (Eq,Ord)
+
+mkKeymap = (Keymap, objectUnrefFromMainloop)
+unKeymap (Keymap o) = o
+
+class GObjectClass o => KeymapClass o
+toKeymap :: KeymapClass o => o -> Keymap
+toKeymap = unsafeCastGObject . toGObject
+
+instance KeymapClass Keymap
+instance GObjectClass Keymap where
+  toGObject = GObject . castForeignPtr . unKeymap
+  unsafeCastGObject = Keymap . castForeignPtr . unGObject
+
+castToKeymap :: GObjectClass obj => obj -> Keymap
+castToKeymap = castTo gTypeKeymap "Keymap"
+
+gTypeKeymap :: GType
+gTypeKeymap =
+  {# call fun unsafe gdk_keymap_get_type #}
+
+-- ************************************************************* DisplayManager
+
+{#pointer *GdkDisplayManager as DisplayManager foreign newtype #} deriving (Eq,Ord)
+
+mkDisplayManager = (DisplayManager, objectUnrefFromMainloop)
+unDisplayManager (DisplayManager o) = o
+
+class GObjectClass o => DisplayManagerClass o
+toDisplayManager :: DisplayManagerClass o => o -> DisplayManager
+toDisplayManager = unsafeCastGObject . toGObject
+
+instance DisplayManagerClass DisplayManager
+instance GObjectClass DisplayManager where
+  toGObject = GObject . castForeignPtr . unDisplayManager
+  unsafeCastGObject = DisplayManager . castForeignPtr . unGObject
+
+castToDisplayManager :: GObjectClass obj => obj -> DisplayManager
+castToDisplayManager = castTo gTypeDisplayManager "DisplayManager"
+
+gTypeDisplayManager :: GType
+gTypeDisplayManager =
+  {# call fun unsafe gdk_display_manager_get_type #}
+
+-- *********************************************************** AppLaunchContext
+
+{#pointer *GdkAppLaunchContext as AppLaunchContext foreign newtype #} deriving (Eq,Ord)
+
+mkAppLaunchContext = (AppLaunchContext, objectUnrefFromMainloop)
+unAppLaunchContext (AppLaunchContext o) = o
+
+class GObjectClass o => AppLaunchContextClass o
+toAppLaunchContext :: AppLaunchContextClass o => o -> AppLaunchContext
+toAppLaunchContext = unsafeCastGObject . toGObject
+
+instance AppLaunchContextClass AppLaunchContext
+instance GObjectClass AppLaunchContext where
+  toGObject = GObject . castForeignPtr . unAppLaunchContext
+  unsafeCastGObject = AppLaunchContext . castForeignPtr . unGObject
+
+castToAppLaunchContext :: GObjectClass obj => obj -> AppLaunchContext
+castToAppLaunchContext = castTo gTypeAppLaunchContext "AppLaunchContext"
+
+gTypeAppLaunchContext :: GType
+gTypeAppLaunchContext =
+  {# call fun unsafe gdk_app_launch_context_get_type #}
+
+-- ************************************************************** PrintSettings
+
+{#pointer *GtkPrintSettings as PrintSettings foreign newtype #} deriving (Eq,Ord)
+
+mkPrintSettings = (PrintSettings, objectUnrefFromMainloop)
+unPrintSettings (PrintSettings o) = o
+
+class GObjectClass o => PrintSettingsClass o
+toPrintSettings :: PrintSettingsClass o => o -> PrintSettings
+toPrintSettings = unsafeCastGObject . toGObject
+
+instance PrintSettingsClass PrintSettings
+instance GObjectClass PrintSettings where
+  toGObject = GObject . castForeignPtr . unPrintSettings
+  unsafeCastGObject = PrintSettings . castForeignPtr . unGObject
+
+castToPrintSettings :: GObjectClass obj => obj -> PrintSettings
+castToPrintSettings = castTo gTypePrintSettings "PrintSettings"
+
+gTypePrintSettings :: GType
+gTypePrintSettings =
+  {# call fun unsafe gtk_print_settings_get_type #}
+
+-- ************************************************************* PrintOperation
+
+{#pointer *GtkPrintOperation as PrintOperation foreign newtype #} deriving (Eq,Ord)
+
+mkPrintOperation = (PrintOperation, objectUnrefFromMainloop)
+unPrintOperation (PrintOperation o) = o
+
+class GObjectClass o => PrintOperationClass o
+toPrintOperation :: PrintOperationClass o => o -> PrintOperation
+toPrintOperation = unsafeCastGObject . toGObject
+
+instance PrintOperationClass PrintOperation
+instance GObjectClass PrintOperation where
+  toGObject = GObject . castForeignPtr . unPrintOperation
+  unsafeCastGObject = PrintOperation . castForeignPtr . unGObject
+
+castToPrintOperation :: GObjectClass obj => obj -> PrintOperation
+castToPrintOperation = castTo gTypePrintOperation "PrintOperation"
+
+gTypePrintOperation :: GType
+gTypePrintOperation =
+  {# call fun unsafe gtk_print_operation_get_type #}
+
+-- ****************************************************** PrintOperationPreview
+
+{#pointer *GtkPrintOperationPreview as PrintOperationPreview foreign newtype #} deriving (Eq,Ord)
+
+mkPrintOperationPreview = (PrintOperationPreview, objectUnrefFromMainloop)
+unPrintOperationPreview (PrintOperationPreview o) = o
+
+class GObjectClass o => PrintOperationPreviewClass o
+toPrintOperationPreview :: PrintOperationPreviewClass o => o -> PrintOperationPreview
+toPrintOperationPreview = unsafeCastGObject . toGObject
+
+instance PrintOperationPreviewClass PrintOperationPreview
+instance GObjectClass PrintOperationPreview where
+  toGObject = GObject . castForeignPtr . unPrintOperationPreview
+  unsafeCastGObject = PrintOperationPreview . castForeignPtr . unGObject
+
+castToPrintOperationPreview :: GObjectClass obj => obj -> PrintOperationPreview
+castToPrintOperationPreview = castTo gTypePrintOperationPreview "PrintOperationPreview"
+
+gTypePrintOperationPreview :: GType
+gTypePrintOperationPreview =
+  {# call fun unsafe gtk_print_operation_preview_get_type #}
+
+-- ****************************************************************** PageSetup
+
+{#pointer *GtkPageSetup as PageSetup foreign newtype #} deriving (Eq,Ord)
+
+mkPageSetup = (PageSetup, objectUnrefFromMainloop)
+unPageSetup (PageSetup o) = o
+
+class GObjectClass o => PageSetupClass o
+toPageSetup :: PageSetupClass o => o -> PageSetup
+toPageSetup = unsafeCastGObject . toGObject
+
+instance PageSetupClass PageSetup
+instance GObjectClass PageSetup where
+  toGObject = GObject . castForeignPtr . unPageSetup
+  unsafeCastGObject = PageSetup . castForeignPtr . unGObject
+
+castToPageSetup :: GObjectClass obj => obj -> PageSetup
+castToPageSetup = castTo gTypePageSetup "PageSetup"
+
+gTypePageSetup :: GType
+gTypePageSetup =
+  {# call fun unsafe gtk_page_setup_get_type #}
+
+-- *************************************************************** PrintContext
+
+{#pointer *GtkPrintContext as PrintContext foreign newtype #} deriving (Eq,Ord)
+
+mkPrintContext = (PrintContext, objectUnrefFromMainloop)
+unPrintContext (PrintContext o) = o
+
+class GObjectClass o => PrintContextClass o
+toPrintContext :: PrintContextClass o => o -> PrintContext
+toPrintContext = unsafeCastGObject . toGObject
+
+instance PrintContextClass PrintContext
+instance GObjectClass PrintContext where
+  toGObject = GObject . castForeignPtr . unPrintContext
+  unsafeCastGObject = PrintContext . castForeignPtr . unGObject
+
+castToPrintContext :: GObjectClass obj => obj -> PrintContext
+castToPrintContext = castTo gTypePrintContext "PrintContext"
+
+gTypePrintContext :: GType
+gTypePrintContext =
+  {# call fun unsafe gtk_print_context_get_type #}
+
+-- ************************************************************** RecentChooser
+
+{#pointer *GtkRecentChooser as RecentChooser foreign newtype #} deriving (Eq,Ord)
+
+mkRecentChooser = (RecentChooser, objectUnrefFromMainloop)
+unRecentChooser (RecentChooser o) = o
+
+class GObjectClass o => RecentChooserClass o
+toRecentChooser :: RecentChooserClass o => o -> RecentChooser
+toRecentChooser = unsafeCastGObject . toGObject
+
+instance RecentChooserClass RecentChooser
+instance GObjectClass RecentChooser where
+  toGObject = GObject . castForeignPtr . unRecentChooser
+  unsafeCastGObject = RecentChooser . castForeignPtr . unGObject
+
+castToRecentChooser :: GObjectClass obj => obj -> RecentChooser
+castToRecentChooser = castTo gTypeRecentChooser "RecentChooser"
+
+gTypeRecentChooser :: GType
+gTypeRecentChooser =
+  {# call fun unsafe gtk_recent_chooser_get_type #}
+
+-- ************************************************************** RecentManager
+
+{#pointer *GtkRecentManager as RecentManager foreign newtype #} deriving (Eq,Ord)
+
+mkRecentManager = (RecentManager, objectUnrefFromMainloop)
+unRecentManager (RecentManager o) = o
+
+class GObjectClass o => RecentManagerClass o
+toRecentManager :: RecentManagerClass o => o -> RecentManager
+toRecentManager = unsafeCastGObject . toGObject
+
+instance RecentManagerClass RecentManager
+instance GObjectClass RecentManager where
+  toGObject = GObject . castForeignPtr . unRecentManager
+  unsafeCastGObject = RecentManager . castForeignPtr . unGObject
+
+castToRecentManager :: GObjectClass obj => obj -> RecentManager
+castToRecentManager = castTo gTypeRecentManager "RecentManager"
+
+gTypeRecentManager :: GType
+gTypeRecentManager =
+  {# call fun unsafe gtk_recent_manager_get_type #}
+
+-- ***************************************************************** DrawWindow
+
+{#pointer *GdkWindow as DrawWindow foreign newtype #} deriving (Eq,Ord)
+
+mkDrawWindow = (DrawWindow, objectUnrefFromMainloop)
+unDrawWindow (DrawWindow o) = o
+
+class GObjectClass o => DrawWindowClass o
+toDrawWindow :: DrawWindowClass o => o -> DrawWindow
+toDrawWindow = unsafeCastGObject . toGObject
+
+instance DrawWindowClass DrawWindow
+instance GObjectClass DrawWindow where
+  toGObject = GObject . castForeignPtr . unDrawWindow
+  unsafeCastGObject = DrawWindow . castForeignPtr . unGObject
+
+castToDrawWindow :: GObjectClass obj => obj -> DrawWindow
+castToDrawWindow = castTo gTypeDrawWindow "DrawWindow"
+
+gTypeDrawWindow :: GType
+gTypeDrawWindow =
+  {# call fun unsafe gdk_window_get_type #}
+
+-- ********************************************************************* Screen
+
+{#pointer *GdkScreen as Screen foreign newtype #} deriving (Eq,Ord)
+
+mkScreen = (Screen, objectUnrefFromMainloop)
+unScreen (Screen o) = o
+
+class GObjectClass o => ScreenClass o
+toScreen :: ScreenClass o => o -> Screen
+toScreen = unsafeCastGObject . toGObject
+
+instance ScreenClass Screen
+instance GObjectClass Screen where
+  toGObject = GObject . castForeignPtr . unScreen
+  unsafeCastGObject = Screen . castForeignPtr . unGObject
+
+castToScreen :: GObjectClass obj => obj -> Screen
+castToScreen = castTo gTypeScreen "Screen"
+
+gTypeScreen :: GType
+gTypeScreen =
+  {# call fun unsafe gdk_screen_get_type #}
+
+-- ******************************************************************** Display
+
+{#pointer *GdkDisplay as Display foreign newtype #} deriving (Eq,Ord)
+
+mkDisplay = (Display, objectUnrefFromMainloop)
+unDisplay (Display o) = o
+
+class GObjectClass o => DisplayClass o
+toDisplay :: DisplayClass o => o -> Display
+toDisplay = unsafeCastGObject . toGObject
+
+instance DisplayClass Display
+instance GObjectClass Display where
+  toGObject = GObject . castForeignPtr . unDisplay
+  unsafeCastGObject = Display . castForeignPtr . unGObject
+
+castToDisplay :: GObjectClass obj => obj -> Display
+castToDisplay = castTo gTypeDisplay "Display"
+
+gTypeDisplay :: GType
+gTypeDisplay =
+  {# call fun unsafe gdk_display_get_type #}
+
+-- ********************************************************************* Visual
+
+{#pointer *GdkVisual as Visual foreign newtype #} deriving (Eq,Ord)
+
+mkVisual = (Visual, objectUnrefFromMainloop)
+unVisual (Visual o) = o
+
+class GObjectClass o => VisualClass o
+toVisual :: VisualClass o => o -> Visual
+toVisual = unsafeCastGObject . toGObject
+
+instance VisualClass Visual
+instance GObjectClass Visual where
+  toGObject = GObject . castForeignPtr . unVisual
+  unsafeCastGObject = Visual . castForeignPtr . unGObject
+
+castToVisual :: GObjectClass obj => obj -> Visual
+castToVisual = castTo gTypeVisual "Visual"
+
+gTypeVisual :: GType
+gTypeVisual =
+  {# call fun unsafe gdk_visual_get_type #}
+
+-- ********************************************************************* Device
+
+{#pointer *GdkDevice as Device foreign newtype #} deriving (Eq,Ord)
+
+mkDevice = (Device, objectUnrefFromMainloop)
+unDevice (Device o) = o
+
+class GObjectClass o => DeviceClass o
+toDevice :: DeviceClass o => o -> Device
+toDevice = unsafeCastGObject . toGObject
+
+instance DeviceClass Device
+instance GObjectClass Device where
+  toGObject = GObject . castForeignPtr . unDevice
+  unsafeCastGObject = Device . castForeignPtr . unGObject
+
+castToDevice :: GObjectClass obj => obj -> Device
+castToDevice = castTo gTypeDevice "Device"
+
+gTypeDevice :: GType
+gTypeDevice =
+  {# call fun unsafe gdk_device_get_type #}
+
+-- ******************************************************************* Settings
+
+{#pointer *GtkSettings as Settings foreign newtype #} deriving (Eq,Ord)
+
+mkSettings = (Settings, objectUnrefFromMainloop)
+unSettings (Settings o) = o
+
+class GObjectClass o => SettingsClass o
+toSettings :: SettingsClass o => o -> Settings
+toSettings = unsafeCastGObject . toGObject
+
+instance SettingsClass Settings
+instance GObjectClass Settings where
+  toGObject = GObject . castForeignPtr . unSettings
+  unsafeCastGObject = Settings . castForeignPtr . unGObject
+
+castToSettings :: GObjectClass obj => obj -> Settings
+castToSettings = castTo gTypeSettings "Settings"
+
+gTypeSettings :: GType
+gTypeSettings =
+  {# call fun unsafe gtk_settings_get_type #}
+
+-- ***************************************************************** TextBuffer
+
+{#pointer *GtkTextBuffer as TextBuffer foreign newtype #} deriving (Eq,Ord)
+
+mkTextBuffer = (TextBuffer, objectUnrefFromMainloop)
+unTextBuffer (TextBuffer o) = o
+
+class GObjectClass o => TextBufferClass o
+toTextBuffer :: TextBufferClass o => o -> TextBuffer
+toTextBuffer = unsafeCastGObject . toGObject
+
+instance TextBufferClass TextBuffer
+instance GObjectClass TextBuffer where
+  toGObject = GObject . castForeignPtr . unTextBuffer
+  unsafeCastGObject = TextBuffer . castForeignPtr . unGObject
+
+castToTextBuffer :: GObjectClass obj => obj -> TextBuffer
+castToTextBuffer = castTo gTypeTextBuffer "TextBuffer"
+
+gTypeTextBuffer :: GType
+gTypeTextBuffer =
+  {# call fun unsafe gtk_text_buffer_get_type #}
+
+-- ******************************************************************** TextTag
+
+{#pointer *GtkTextTag as TextTag foreign newtype #} deriving (Eq,Ord)
+
+mkTextTag = (TextTag, objectUnrefFromMainloop)
+unTextTag (TextTag o) = o
+
+class GObjectClass o => TextTagClass o
+toTextTag :: TextTagClass o => o -> TextTag
+toTextTag = unsafeCastGObject . toGObject
+
+instance TextTagClass TextTag
+instance GObjectClass TextTag where
+  toGObject = GObject . castForeignPtr . unTextTag
+  unsafeCastGObject = TextTag . castForeignPtr . unGObject
+
+castToTextTag :: GObjectClass obj => obj -> TextTag
+castToTextTag = castTo gTypeTextTag "TextTag"
+
+gTypeTextTag :: GType
+gTypeTextTag =
+  {# call fun unsafe gtk_text_tag_get_type #}
+
+-- *************************************************************** TextTagTable
+
+{#pointer *GtkTextTagTable as TextTagTable foreign newtype #} deriving (Eq,Ord)
+
+mkTextTagTable = (TextTagTable, objectUnrefFromMainloop)
+unTextTagTable (TextTagTable o) = o
+
+class GObjectClass o => TextTagTableClass o
+toTextTagTable :: TextTagTableClass o => o -> TextTagTable
+toTextTagTable = unsafeCastGObject . toGObject
+
+instance TextTagTableClass TextTagTable
+instance GObjectClass TextTagTable where
+  toGObject = GObject . castForeignPtr . unTextTagTable
+  unsafeCastGObject = TextTagTable . castForeignPtr . unGObject
+
+castToTextTagTable :: GObjectClass obj => obj -> TextTagTable
+castToTextTagTable = castTo gTypeTextTagTable "TextTagTable"
+
+gTypeTextTagTable :: GType
+gTypeTextTagTable =
+  {# call fun unsafe gtk_text_tag_table_get_type #}
+
+-- ********************************************************************** Style
+
+{#pointer *GtkStyle as Style foreign newtype #} deriving (Eq,Ord)
+
+mkStyle = (Style, objectUnrefFromMainloop)
+unStyle (Style o) = o
+
+class GObjectClass o => StyleClass o
+toStyle :: StyleClass o => o -> Style
+toStyle = unsafeCastGObject . toGObject
+
+instance StyleClass Style
+instance GObjectClass Style where
+  toGObject = GObject . castForeignPtr . unStyle
+  unsafeCastGObject = Style . castForeignPtr . unGObject
+
+castToStyle :: GObjectClass obj => obj -> Style
+castToStyle = castTo gTypeStyle "Style"
+
+gTypeStyle :: GType
+gTypeStyle =
+  {# call fun unsafe gtk_style_get_type #}
+
+-- ******************************************************************** RcStyle
+
+{#pointer *GtkRcStyle as RcStyle foreign newtype #} deriving (Eq,Ord)
+
+mkRcStyle = (RcStyle, objectUnrefFromMainloop)
+unRcStyle (RcStyle o) = o
+
+class GObjectClass o => RcStyleClass o
+toRcStyle :: RcStyleClass o => o -> RcStyle
+toRcStyle = unsafeCastGObject . toGObject
+
+instance RcStyleClass RcStyle
+instance GObjectClass RcStyle where
+  toGObject = GObject . castForeignPtr . unRcStyle
+  unsafeCastGObject = RcStyle . castForeignPtr . unGObject
+
+castToRcStyle :: GObjectClass obj => obj -> RcStyle
+castToRcStyle = castTo gTypeRcStyle "RcStyle"
+
+gTypeRcStyle :: GType
+gTypeRcStyle =
+  {# call fun unsafe gtk_rc_style_get_type #}
+
+-- **************************************************************** DragContext
+
+{#pointer *GdkDragContext as DragContext foreign newtype #} deriving (Eq,Ord)
+
+mkDragContext = (DragContext, objectUnrefFromMainloop)
+unDragContext (DragContext o) = o
+
+class GObjectClass o => DragContextClass o
+toDragContext :: DragContextClass o => o -> DragContext
+toDragContext = unsafeCastGObject . toGObject
+
+instance DragContextClass DragContext
+instance GObjectClass DragContext where
+  toGObject = GObject . castForeignPtr . unDragContext
+  unsafeCastGObject = DragContext . castForeignPtr . unGObject
+
+castToDragContext :: GObjectClass obj => obj -> DragContext
+castToDragContext = castTo gTypeDragContext "DragContext"
+
+gTypeDragContext :: GType
+gTypeDragContext =
+  {# call fun unsafe gdk_drag_context_get_type #}
+
+-- ********************************************************************* Pixbuf
+
+{#pointer *GdkPixbuf as Pixbuf foreign newtype #} deriving (Eq,Ord)
+
+mkPixbuf = (Pixbuf, objectUnref)
+unPixbuf (Pixbuf o) = o
+
+class GObjectClass o => PixbufClass o
+toPixbuf :: PixbufClass o => o -> Pixbuf
+toPixbuf = unsafeCastGObject . toGObject
+
+instance PixbufClass Pixbuf
+instance GObjectClass Pixbuf where
+  toGObject = GObject . castForeignPtr . unPixbuf
+  unsafeCastGObject = Pixbuf . castForeignPtr . unGObject
+
+castToPixbuf :: GObjectClass obj => obj -> Pixbuf
+castToPixbuf = castTo gTypePixbuf "Pixbuf"
+
+gTypePixbuf :: GType
+gTypePixbuf =
+  {# call fun unsafe gdk_pixbuf_get_type #}
+
+-- ************************************************************ PixbufAnimation
+
+{#pointer *GdkPixbufAnimation as PixbufAnimation foreign newtype #} deriving (Eq,Ord)
+
+mkPixbufAnimation = (PixbufAnimation, objectUnref)
+unPixbufAnimation (PixbufAnimation o) = o
+
+class GObjectClass o => PixbufAnimationClass o
+toPixbufAnimation :: PixbufAnimationClass o => o -> PixbufAnimation
+toPixbufAnimation = unsafeCastGObject . toGObject
+
+instance PixbufAnimationClass PixbufAnimation
+instance GObjectClass PixbufAnimation where
+  toGObject = GObject . castForeignPtr . unPixbufAnimation
+  unsafeCastGObject = PixbufAnimation . castForeignPtr . unGObject
+
+castToPixbufAnimation :: GObjectClass obj => obj -> PixbufAnimation
+castToPixbufAnimation = castTo gTypePixbufAnimation "PixbufAnimation"
+
+gTypePixbufAnimation :: GType
+gTypePixbufAnimation =
+  {# call fun unsafe gdk_pixbuf_animation_get_type #}
+
+-- *********************************************************** PixbufSimpleAnim
+
+{#pointer *GdkPixbufSimpleAnim as PixbufSimpleAnim foreign newtype #} deriving (Eq,Ord)
+
+mkPixbufSimpleAnim = (PixbufSimpleAnim, objectUnref)
+unPixbufSimpleAnim (PixbufSimpleAnim o) = o
+
+class PixbufAnimationClass o => PixbufSimpleAnimClass o
+toPixbufSimpleAnim :: PixbufSimpleAnimClass o => o -> PixbufSimpleAnim
+toPixbufSimpleAnim = unsafeCastGObject . toGObject
+
+instance PixbufSimpleAnimClass PixbufSimpleAnim
+instance PixbufAnimationClass PixbufSimpleAnim
+instance GObjectClass PixbufSimpleAnim where
+  toGObject = GObject . castForeignPtr . unPixbufSimpleAnim
+  unsafeCastGObject = PixbufSimpleAnim . castForeignPtr . unGObject
+
+castToPixbufSimpleAnim :: GObjectClass obj => obj -> PixbufSimpleAnim
+castToPixbufSimpleAnim = castTo gTypePixbufSimpleAnim "PixbufSimpleAnim"
+
+gTypePixbufSimpleAnim :: GType
+gTypePixbufSimpleAnim =
+  {# call fun unsafe gdk_pixbuf_simple_anim_get_type #}
+
+-- ******************************************************** PixbufAnimationIter
+
+{#pointer *GdkPixbufAnimationIter as PixbufAnimationIter foreign newtype #} deriving (Eq,Ord)
+
+mkPixbufAnimationIter = (PixbufAnimationIter, objectUnref)
+unPixbufAnimationIter (PixbufAnimationIter o) = o
+
+class GObjectClass o => PixbufAnimationIterClass o
+toPixbufAnimationIter :: PixbufAnimationIterClass o => o -> PixbufAnimationIter
+toPixbufAnimationIter = unsafeCastGObject . toGObject
+
+instance PixbufAnimationIterClass PixbufAnimationIter
+instance GObjectClass PixbufAnimationIter where
+  toGObject = GObject . castForeignPtr . unPixbufAnimationIter
+  unsafeCastGObject = PixbufAnimationIter . castForeignPtr . unGObject
+
+castToPixbufAnimationIter :: GObjectClass obj => obj -> PixbufAnimationIter
+castToPixbufAnimationIter = castTo gTypePixbufAnimationIter "PixbufAnimationIter"
+
+gTypePixbufAnimationIter :: GType
+gTypePixbufAnimationIter =
+  {# call fun unsafe gdk_pixbuf_animation_iter_get_type #}
+
+-- ************************************************************ TextChildAnchor
+
+{#pointer *GtkTextChildAnchor as TextChildAnchor foreign newtype #} deriving (Eq,Ord)
+
+mkTextChildAnchor = (TextChildAnchor, objectUnrefFromMainloop)
+unTextChildAnchor (TextChildAnchor o) = o
+
+class GObjectClass o => TextChildAnchorClass o
+toTextChildAnchor :: TextChildAnchorClass o => o -> TextChildAnchor
+toTextChildAnchor = unsafeCastGObject . toGObject
+
+instance TextChildAnchorClass TextChildAnchor
+instance GObjectClass TextChildAnchor where
+  toGObject = GObject . castForeignPtr . unTextChildAnchor
+  unsafeCastGObject = TextChildAnchor . castForeignPtr . unGObject
+
+castToTextChildAnchor :: GObjectClass obj => obj -> TextChildAnchor
+castToTextChildAnchor = castTo gTypeTextChildAnchor "TextChildAnchor"
+
+gTypeTextChildAnchor :: GType
+gTypeTextChildAnchor =
+  {# call fun unsafe gtk_text_child_anchor_get_type #}
+
+-- ******************************************************************* TextMark
+
+{#pointer *GtkTextMark as TextMark foreign newtype #} deriving (Eq,Ord)
+
+mkTextMark = (TextMark, objectUnrefFromMainloop)
+unTextMark (TextMark o) = o
+
+class GObjectClass o => TextMarkClass o
+toTextMark :: TextMarkClass o => o -> TextMark
+toTextMark = unsafeCastGObject . toGObject
+
+instance TextMarkClass TextMark
+instance GObjectClass TextMark where
+  toGObject = GObject . castForeignPtr . unTextMark
+  unsafeCastGObject = TextMark . castForeignPtr . unGObject
+
+castToTextMark :: GObjectClass obj => obj -> TextMark
+castToTextMark = castTo gTypeTextMark "TextMark"
+
+gTypeTextMark :: GType
+gTypeTextMark =
+  {# call fun unsafe gtk_text_mark_get_type #}
+
+-- *************************************************************** RecentFilter
+
+{#pointer *GtkRecentFilter as RecentFilter foreign newtype #} deriving (Eq,Ord)
+
+mkRecentFilter = (RecentFilter, objectUnrefFromMainloop)
+unRecentFilter (RecentFilter o) = o
+
+class GObjectClass o => RecentFilterClass o
+toRecentFilter :: RecentFilterClass o => o -> RecentFilter
+toRecentFilter = unsafeCastGObject . toGObject
+
+instance RecentFilterClass RecentFilter
+instance GObjectClass RecentFilter where
+  toGObject = GObject . castForeignPtr . unRecentFilter
+  unsafeCastGObject = RecentFilter . castForeignPtr . unGObject
+
+castToRecentFilter :: GObjectClass obj => obj -> RecentFilter
+castToRecentFilter = castTo gTypeRecentFilter "RecentFilter"
+
+gTypeRecentFilter :: GType
+gTypeRecentFilter =
+  {# call fun unsafe gtk_recent_filter_get_type #}
+
+-- ********************************************************************* Widget
+
+{#pointer *GtkWidget as Widget foreign newtype #} deriving (Eq,Ord)
+
+mkWidget = (Widget, objectUnrefFromMainloop)
+unWidget (Widget o) = o
+
+class GObjectClass o => WidgetClass o
+toWidget :: WidgetClass o => o -> Widget
+toWidget = unsafeCastGObject . toGObject
+
+instance WidgetClass Widget
+instance GObjectClass Widget where
+  toGObject = GObject . castForeignPtr . unWidget
+  unsafeCastGObject = Widget . castForeignPtr . unGObject
+
+castToWidget :: GObjectClass obj => obj -> Widget
+castToWidget = castTo gTypeWidget "Widget"
+
+gTypeWidget :: GType
+gTypeWidget =
+  {# call fun unsafe gtk_widget_get_type #}
+
+-- ************************************************************************ HSV
+
+{#pointer *GtkHSV as HSV foreign newtype #} deriving (Eq,Ord)
+
+mkHSV = (HSV, objectUnrefFromMainloop)
+unHSV (HSV o) = o
+
+class WidgetClass o => HSVClass o
+toHSV :: HSVClass o => o -> HSV
+toHSV = unsafeCastGObject . toGObject
+
+instance HSVClass HSV
+instance WidgetClass HSV
+instance GObjectClass HSV where
+  toGObject = GObject . castForeignPtr . unHSV
+  unsafeCastGObject = HSV . castForeignPtr . unGObject
+
+castToHSV :: GObjectClass obj => obj -> HSV
+castToHSV = castTo gTypeHSV "HSV"
+
+gTypeHSV :: GType
+gTypeHSV =
+  {# call fun unsafe gtk_hsv_get_type #}
+
+-- *********************************************************************** Misc
+
+{#pointer *GtkMisc as Misc foreign newtype #} deriving (Eq,Ord)
+
+mkMisc = (Misc, objectUnrefFromMainloop)
+unMisc (Misc o) = o
+
+class WidgetClass o => MiscClass o
+toMisc :: MiscClass o => o -> Misc
+toMisc = unsafeCastGObject . toGObject
+
+instance MiscClass Misc
+instance WidgetClass Misc
+instance GObjectClass Misc where
+  toGObject = GObject . castForeignPtr . unMisc
+  unsafeCastGObject = Misc . castForeignPtr . unGObject
+
+castToMisc :: GObjectClass obj => obj -> Misc
+castToMisc = castTo gTypeMisc "Misc"
+
+gTypeMisc :: GType
+gTypeMisc =
+  {# call fun unsafe gtk_misc_get_type #}
+
+-- ********************************************************************** Label
+
+{#pointer *GtkLabel as Label foreign newtype #} deriving (Eq,Ord)
+
+mkLabel = (Label, objectUnrefFromMainloop)
+unLabel (Label o) = o
+
+class MiscClass o => LabelClass o
+toLabel :: LabelClass o => o -> Label
+toLabel = unsafeCastGObject . toGObject
+
+instance LabelClass Label
+instance MiscClass Label
+instance WidgetClass Label
+instance GObjectClass Label where
+  toGObject = GObject . castForeignPtr . unLabel
+  unsafeCastGObject = Label . castForeignPtr . unGObject
+
+castToLabel :: GObjectClass obj => obj -> Label
+castToLabel = castTo gTypeLabel "Label"
+
+gTypeLabel :: GType
+gTypeLabel =
+  {# call fun unsafe gtk_label_get_type #}
+
+-- ***************************************************************** AccelLabel
+
+{#pointer *GtkAccelLabel as AccelLabel foreign newtype #} deriving (Eq,Ord)
+
+mkAccelLabel = (AccelLabel, objectUnrefFromMainloop)
+unAccelLabel (AccelLabel o) = o
+
+class LabelClass o => AccelLabelClass o
+toAccelLabel :: AccelLabelClass o => o -> AccelLabel
+toAccelLabel = unsafeCastGObject . toGObject
+
+instance AccelLabelClass AccelLabel
+instance LabelClass AccelLabel
+instance MiscClass AccelLabel
+instance WidgetClass AccelLabel
+instance GObjectClass AccelLabel where
+  toGObject = GObject . castForeignPtr . unAccelLabel
+  unsafeCastGObject = AccelLabel . castForeignPtr . unGObject
+
+castToAccelLabel :: GObjectClass obj => obj -> AccelLabel
+castToAccelLabel = castTo gTypeAccelLabel "AccelLabel"
+
+gTypeAccelLabel :: GType
+gTypeAccelLabel =
+  {# call fun unsafe gtk_accel_label_get_type #}
+
+-- ********************************************************************** Arrow
+
+{#pointer *GtkArrow as Arrow foreign newtype #} deriving (Eq,Ord)
+
+mkArrow = (Arrow, objectUnrefFromMainloop)
+unArrow (Arrow o) = o
+
+class MiscClass o => ArrowClass o
+toArrow :: ArrowClass o => o -> Arrow
+toArrow = unsafeCastGObject . toGObject
+
+instance ArrowClass Arrow
+instance MiscClass Arrow
+instance WidgetClass Arrow
+instance GObjectClass Arrow where
+  toGObject = GObject . castForeignPtr . unArrow
+  unsafeCastGObject = Arrow . castForeignPtr . unGObject
+
+castToArrow :: GObjectClass obj => obj -> Arrow
+castToArrow = castTo gTypeArrow "Arrow"
+
+gTypeArrow :: GType
+gTypeArrow =
+  {# call fun unsafe gtk_arrow_get_type #}
+
+-- ********************************************************************** Image
+
+{#pointer *GtkImage as Image foreign newtype #} deriving (Eq,Ord)
+
+mkImage = (Image, objectUnrefFromMainloop)
+unImage (Image o) = o
+
+class MiscClass o => ImageClass o
+toImage :: ImageClass o => o -> Image
+toImage = unsafeCastGObject . toGObject
+
+instance ImageClass Image
+instance MiscClass Image
+instance WidgetClass Image
+instance GObjectClass Image where
+  toGObject = GObject . castForeignPtr . unImage
+  unsafeCastGObject = Image . castForeignPtr . unGObject
+
+castToImage :: GObjectClass obj => obj -> Image
+castToImage = castTo gTypeImage "Image"
+
+gTypeImage :: GType
+gTypeImage =
+  {# call fun unsafe gtk_image_get_type #}
+
+-- ****************************************************************** Container
+
+{#pointer *GtkContainer as Container foreign newtype #} deriving (Eq,Ord)
+
+mkContainer = (Container, objectUnrefFromMainloop)
+unContainer (Container o) = o
+
+class WidgetClass o => ContainerClass o
+toContainer :: ContainerClass o => o -> Container
+toContainer = unsafeCastGObject . toGObject
+
+instance ContainerClass Container
+instance WidgetClass Container
+instance GObjectClass Container where
+  toGObject = GObject . castForeignPtr . unContainer
+  unsafeCastGObject = Container . castForeignPtr . unGObject
+
+castToContainer :: GObjectClass obj => obj -> Container
+castToContainer = castTo gTypeContainer "Container"
+
+gTypeContainer :: GType
+gTypeContainer =
+  {# call fun unsafe gtk_container_get_type #}
+
+-- **************************************************************** ToolPalette
+
+{#pointer *GtkToolPalette as ToolPalette foreign newtype #} deriving (Eq,Ord)
+
+mkToolPalette = (ToolPalette, objectUnrefFromMainloop)
+unToolPalette (ToolPalette o) = o
+
+class ContainerClass o => ToolPaletteClass o
+toToolPalette :: ToolPaletteClass o => o -> ToolPalette
+toToolPalette = unsafeCastGObject . toGObject
+
+instance ToolPaletteClass ToolPalette
+instance ContainerClass ToolPalette
+instance WidgetClass ToolPalette
+instance GObjectClass ToolPalette where
+  toGObject = GObject . castForeignPtr . unToolPalette
+  unsafeCastGObject = ToolPalette . castForeignPtr . unGObject
+
+castToToolPalette :: GObjectClass obj => obj -> ToolPalette
+castToToolPalette = castTo gTypeToolPalette "ToolPalette"
+
+gTypeToolPalette :: GType
+gTypeToolPalette =
+  {# call fun unsafe gtk_tool_palette_get_type #}
+
+-- ************************************************************** ToolItemGroup
+
+{#pointer *GtkToolItemGroup as ToolItemGroup foreign newtype #} deriving (Eq,Ord)
+
+mkToolItemGroup = (ToolItemGroup, objectUnrefFromMainloop)
+unToolItemGroup (ToolItemGroup o) = o
+
+class ContainerClass o => ToolItemGroupClass o
+toToolItemGroup :: ToolItemGroupClass o => o -> ToolItemGroup
+toToolItemGroup = unsafeCastGObject . toGObject
+
+instance ToolItemGroupClass ToolItemGroup
+instance ContainerClass ToolItemGroup
+instance WidgetClass ToolItemGroup
+instance GObjectClass ToolItemGroup where
+  toGObject = GObject . castForeignPtr . unToolItemGroup
+  unsafeCastGObject = ToolItemGroup . castForeignPtr . unGObject
+
+castToToolItemGroup :: GObjectClass obj => obj -> ToolItemGroup
+castToToolItemGroup = castTo gTypeToolItemGroup "ToolItemGroup"
+
+gTypeToolItemGroup :: GType
+gTypeToolItemGroup =
+  {# call fun unsafe gtk_tool_item_group_get_type #}
+
+-- ************************************************************************ Bin
+
+{#pointer *GtkBin as Bin foreign newtype #} deriving (Eq,Ord)
+
+mkBin = (Bin, objectUnrefFromMainloop)
+unBin (Bin o) = o
+
+class ContainerClass o => BinClass o
+toBin :: BinClass o => o -> Bin
+toBin = unsafeCastGObject . toGObject
+
+instance BinClass Bin
+instance ContainerClass Bin
+instance WidgetClass Bin
+instance GObjectClass Bin where
+  toGObject = GObject . castForeignPtr . unBin
+  unsafeCastGObject = Bin . castForeignPtr . unGObject
+
+castToBin :: GObjectClass obj => obj -> Bin
+castToBin = castTo gTypeBin "Bin"
+
+gTypeBin :: GType
+gTypeBin =
+  {# call fun unsafe gtk_bin_get_type #}
+
+-- ****************************************************************** Alignment
+
+{#pointer *GtkAlignment as Alignment foreign newtype #} deriving (Eq,Ord)
+
+mkAlignment = (Alignment, objectUnrefFromMainloop)
+unAlignment (Alignment o) = o
+
+class BinClass o => AlignmentClass o
+toAlignment :: AlignmentClass o => o -> Alignment
+toAlignment = unsafeCastGObject . toGObject
+
+instance AlignmentClass Alignment
+instance BinClass Alignment
+instance ContainerClass Alignment
+instance WidgetClass Alignment
+instance GObjectClass Alignment where
+  toGObject = GObject . castForeignPtr . unAlignment
+  unsafeCastGObject = Alignment . castForeignPtr . unGObject
+
+castToAlignment :: GObjectClass obj => obj -> Alignment
+castToAlignment = castTo gTypeAlignment "Alignment"
+
+gTypeAlignment :: GType
+gTypeAlignment =
+  {# call fun unsafe gtk_alignment_get_type #}
+
+-- ********************************************************************** Frame
+
+{#pointer *GtkFrame as Frame foreign newtype #} deriving (Eq,Ord)
+
+mkFrame = (Frame, objectUnrefFromMainloop)
+unFrame (Frame o) = o
+
+class BinClass o => FrameClass o
+toFrame :: FrameClass o => o -> Frame
+toFrame = unsafeCastGObject . toGObject
+
+instance FrameClass Frame
+instance BinClass Frame
+instance ContainerClass Frame
+instance WidgetClass Frame
+instance GObjectClass Frame where
+  toGObject = GObject . castForeignPtr . unFrame
+  unsafeCastGObject = Frame . castForeignPtr . unGObject
+
+castToFrame :: GObjectClass obj => obj -> Frame
+castToFrame = castTo gTypeFrame "Frame"
+
+gTypeFrame :: GType
+gTypeFrame =
+  {# call fun unsafe gtk_frame_get_type #}
+
+-- **************************************************************** AspectFrame
+
+{#pointer *GtkAspectFrame as AspectFrame foreign newtype #} deriving (Eq,Ord)
+
+mkAspectFrame = (AspectFrame, objectUnrefFromMainloop)
+unAspectFrame (AspectFrame o) = o
+
+class FrameClass o => AspectFrameClass o
+toAspectFrame :: AspectFrameClass o => o -> AspectFrame
+toAspectFrame = unsafeCastGObject . toGObject
+
+instance AspectFrameClass AspectFrame
+instance FrameClass AspectFrame
+instance BinClass AspectFrame
+instance ContainerClass AspectFrame
+instance WidgetClass AspectFrame
+instance GObjectClass AspectFrame where
+  toGObject = GObject . castForeignPtr . unAspectFrame
+  unsafeCastGObject = AspectFrame . castForeignPtr . unGObject
+
+castToAspectFrame :: GObjectClass obj => obj -> AspectFrame
+castToAspectFrame = castTo gTypeAspectFrame "AspectFrame"
+
+gTypeAspectFrame :: GType
+gTypeAspectFrame =
+  {# call fun unsafe gtk_aspect_frame_get_type #}
+
+-- ********************************************************************* Button
+
+{#pointer *GtkButton as Button foreign newtype #} deriving (Eq,Ord)
+
+mkButton = (Button, objectUnrefFromMainloop)
+unButton (Button o) = o
+
+class BinClass o => ButtonClass o
+toButton :: ButtonClass o => o -> Button
+toButton = unsafeCastGObject . toGObject
+
+instance ButtonClass Button
+instance BinClass Button
+instance ContainerClass Button
+instance WidgetClass Button
+instance GObjectClass Button where
+  toGObject = GObject . castForeignPtr . unButton
+  unsafeCastGObject = Button . castForeignPtr . unGObject
+
+castToButton :: GObjectClass obj => obj -> Button
+castToButton = castTo gTypeButton "Button"
+
+gTypeButton :: GType
+gTypeButton =
+  {# call fun unsafe gtk_button_get_type #}
+
+-- **************************************************************** ScaleButton
+
+{#pointer *GtkScaleButton as ScaleButton foreign newtype #} deriving (Eq,Ord)
+
+mkScaleButton = (ScaleButton, objectUnrefFromMainloop)
+unScaleButton (ScaleButton o) = o
+
+class ButtonClass o => ScaleButtonClass o
+toScaleButton :: ScaleButtonClass o => o -> ScaleButton
+toScaleButton = unsafeCastGObject . toGObject
+
+instance ScaleButtonClass ScaleButton
+instance ButtonClass ScaleButton
+instance BinClass ScaleButton
+instance ContainerClass ScaleButton
+instance WidgetClass ScaleButton
+instance GObjectClass ScaleButton where
+  toGObject = GObject . castForeignPtr . unScaleButton
+  unsafeCastGObject = ScaleButton . castForeignPtr . unGObject
+
+castToScaleButton :: GObjectClass obj => obj -> ScaleButton
+castToScaleButton = castTo gTypeScaleButton "ScaleButton"
+
+gTypeScaleButton :: GType
+gTypeScaleButton =
+  {# call fun unsafe gtk_scale_button_get_type #}
+
+-- *************************************************************** VolumeButton
+
+{#pointer *GtkVolumeButton as VolumeButton foreign newtype #} deriving (Eq,Ord)
+
+mkVolumeButton = (VolumeButton, objectUnrefFromMainloop)
+unVolumeButton (VolumeButton o) = o
+
+class ScaleButtonClass o => VolumeButtonClass o
+toVolumeButton :: VolumeButtonClass o => o -> VolumeButton
+toVolumeButton = unsafeCastGObject . toGObject
+
+instance VolumeButtonClass VolumeButton
+instance ScaleButtonClass VolumeButton
+instance ButtonClass VolumeButton
+instance BinClass VolumeButton
+instance ContainerClass VolumeButton
+instance WidgetClass VolumeButton
+instance GObjectClass VolumeButton where
+  toGObject = GObject . castForeignPtr . unVolumeButton
+  unsafeCastGObject = VolumeButton . castForeignPtr . unGObject
+
+castToVolumeButton :: GObjectClass obj => obj -> VolumeButton
+castToVolumeButton = castTo gTypeVolumeButton "VolumeButton"
+
+gTypeVolumeButton :: GType
+gTypeVolumeButton =
+  {# call fun unsafe gtk_volume_button_get_type #}
+
+-- ***************************************************************** LinkButton
+
+{#pointer *GtkLinkButton as LinkButton foreign newtype #} deriving (Eq,Ord)
+
+mkLinkButton = (LinkButton, objectUnrefFromMainloop)
+unLinkButton (LinkButton o) = o
+
+class ButtonClass o => LinkButtonClass o
+toLinkButton :: LinkButtonClass o => o -> LinkButton
+toLinkButton = unsafeCastGObject . toGObject
+
+instance LinkButtonClass LinkButton
+instance ButtonClass LinkButton
+instance BinClass LinkButton
+instance ContainerClass LinkButton
+instance WidgetClass LinkButton
+instance GObjectClass LinkButton where
+  toGObject = GObject . castForeignPtr . unLinkButton
+  unsafeCastGObject = LinkButton . castForeignPtr . unGObject
+
+castToLinkButton :: GObjectClass obj => obj -> LinkButton
+castToLinkButton = castTo gTypeLinkButton "LinkButton"
+
+gTypeLinkButton :: GType
+gTypeLinkButton =
+  {# call fun unsafe gtk_link_button_get_type #}
+
+-- *************************************************************** ToggleButton
+
+{#pointer *GtkToggleButton as ToggleButton foreign newtype #} deriving (Eq,Ord)
+
+mkToggleButton = (ToggleButton, objectUnrefFromMainloop)
+unToggleButton (ToggleButton o) = o
+
+class ButtonClass o => ToggleButtonClass o
+toToggleButton :: ToggleButtonClass o => o -> ToggleButton
+toToggleButton = unsafeCastGObject . toGObject
+
+instance ToggleButtonClass ToggleButton
+instance ButtonClass ToggleButton
+instance BinClass ToggleButton
+instance ContainerClass ToggleButton
+instance WidgetClass ToggleButton
+instance GObjectClass ToggleButton where
+  toGObject = GObject . castForeignPtr . unToggleButton
+  unsafeCastGObject = ToggleButton . castForeignPtr . unGObject
+
+castToToggleButton :: GObjectClass obj => obj -> ToggleButton
+castToToggleButton = castTo gTypeToggleButton "ToggleButton"
+
+gTypeToggleButton :: GType
+gTypeToggleButton =
+  {# call fun unsafe gtk_toggle_button_get_type #}
+
+-- **************************************************************** CheckButton
+
+{#pointer *GtkCheckButton as CheckButton foreign newtype #} deriving (Eq,Ord)
+
+mkCheckButton = (CheckButton, objectUnrefFromMainloop)
+unCheckButton (CheckButton o) = o
+
+class ToggleButtonClass o => CheckButtonClass o
+toCheckButton :: CheckButtonClass o => o -> CheckButton
+toCheckButton = unsafeCastGObject . toGObject
+
+instance CheckButtonClass CheckButton
+instance ToggleButtonClass CheckButton
+instance ButtonClass CheckButton
+instance BinClass CheckButton
+instance ContainerClass CheckButton
+instance WidgetClass CheckButton
+instance GObjectClass CheckButton where
+  toGObject = GObject . castForeignPtr . unCheckButton
+  unsafeCastGObject = CheckButton . castForeignPtr . unGObject
+
+castToCheckButton :: GObjectClass obj => obj -> CheckButton
+castToCheckButton = castTo gTypeCheckButton "CheckButton"
+
+gTypeCheckButton :: GType
+gTypeCheckButton =
+  {# call fun unsafe gtk_check_button_get_type #}
+
+-- **************************************************************** RadioButton
+
+{#pointer *GtkRadioButton as RadioButton foreign newtype #} deriving (Eq,Ord)
+
+mkRadioButton = (RadioButton, objectUnrefFromMainloop)
+unRadioButton (RadioButton o) = o
+
+class CheckButtonClass o => RadioButtonClass o
+toRadioButton :: RadioButtonClass o => o -> RadioButton
+toRadioButton = unsafeCastGObject . toGObject
+
+instance RadioButtonClass RadioButton
+instance CheckButtonClass RadioButton
+instance ToggleButtonClass RadioButton
+instance ButtonClass RadioButton
+instance BinClass RadioButton
+instance ContainerClass RadioButton
+instance WidgetClass RadioButton
+instance GObjectClass RadioButton where
+  toGObject = GObject . castForeignPtr . unRadioButton
+  unsafeCastGObject = RadioButton . castForeignPtr . unGObject
+
+castToRadioButton :: GObjectClass obj => obj -> RadioButton
+castToRadioButton = castTo gTypeRadioButton "RadioButton"
+
+gTypeRadioButton :: GType
+gTypeRadioButton =
+  {# call fun unsafe gtk_radio_button_get_type #}
+
+-- **************************************************************** ColorButton
+
+{#pointer *GtkColorButton as ColorButton foreign newtype #} deriving (Eq,Ord)
+
+mkColorButton = (ColorButton, objectUnrefFromMainloop)
+unColorButton (ColorButton o) = o
+
+class ButtonClass o => ColorButtonClass o
+toColorButton :: ColorButtonClass o => o -> ColorButton
+toColorButton = unsafeCastGObject . toGObject
+
+instance ColorButtonClass ColorButton
+instance ButtonClass ColorButton
+instance BinClass ColorButton
+instance ContainerClass ColorButton
+instance WidgetClass ColorButton
+instance GObjectClass ColorButton where
+  toGObject = GObject . castForeignPtr . unColorButton
+  unsafeCastGObject = ColorButton . castForeignPtr . unGObject
+
+castToColorButton :: GObjectClass obj => obj -> ColorButton
+castToColorButton = castTo gTypeColorButton "ColorButton"
+
+gTypeColorButton :: GType
+gTypeColorButton =
+  {# call fun unsafe gtk_color_button_get_type #}
+
+-- ***************************************************************** FontButton
+
+{#pointer *GtkFontButton as FontButton foreign newtype #} deriving (Eq,Ord)
+
+mkFontButton = (FontButton, objectUnrefFromMainloop)
+unFontButton (FontButton o) = o
+
+class ButtonClass o => FontButtonClass o
+toFontButton :: FontButtonClass o => o -> FontButton
+toFontButton = unsafeCastGObject . toGObject
+
+instance FontButtonClass FontButton
+instance ButtonClass FontButton
+instance BinClass FontButton
+instance ContainerClass FontButton
+instance WidgetClass FontButton
+instance GObjectClass FontButton where
+  toGObject = GObject . castForeignPtr . unFontButton
+  unsafeCastGObject = FontButton . castForeignPtr . unGObject
+
+castToFontButton :: GObjectClass obj => obj -> FontButton
+castToFontButton = castTo gTypeFontButton "FontButton"
+
+gTypeFontButton :: GType
+gTypeFontButton =
+  {# call fun unsafe gtk_font_button_get_type #}
+
+-- ******************************************************************* MenuItem
+
+{#pointer *GtkMenuItem as MenuItem foreign newtype #} deriving (Eq,Ord)
+
+mkMenuItem = (MenuItem, objectUnrefFromMainloop)
+unMenuItem (MenuItem o) = o
+
+class BinClass o => MenuItemClass o
+toMenuItem :: MenuItemClass o => o -> MenuItem
+toMenuItem = unsafeCastGObject . toGObject
+
+instance MenuItemClass MenuItem
+instance BinClass MenuItem
+instance ContainerClass MenuItem
+instance WidgetClass MenuItem
+instance GObjectClass MenuItem where
+  toGObject = GObject . castForeignPtr . unMenuItem
+  unsafeCastGObject = MenuItem . castForeignPtr . unGObject
+
+castToMenuItem :: GObjectClass obj => obj -> MenuItem
+castToMenuItem = castTo gTypeMenuItem "MenuItem"
+
+gTypeMenuItem :: GType
+gTypeMenuItem =
+  {# call fun unsafe gtk_menu_item_get_type #}
+
+-- ************************************************************** CheckMenuItem
+
+{#pointer *GtkCheckMenuItem as CheckMenuItem foreign newtype #} deriving (Eq,Ord)
+
+mkCheckMenuItem = (CheckMenuItem, objectUnrefFromMainloop)
+unCheckMenuItem (CheckMenuItem o) = o
+
+class MenuItemClass o => CheckMenuItemClass o
+toCheckMenuItem :: CheckMenuItemClass o => o -> CheckMenuItem
+toCheckMenuItem = unsafeCastGObject . toGObject
+
+instance CheckMenuItemClass CheckMenuItem
+instance MenuItemClass CheckMenuItem
+instance BinClass CheckMenuItem
+instance ContainerClass CheckMenuItem
+instance WidgetClass CheckMenuItem
+instance GObjectClass CheckMenuItem where
+  toGObject = GObject . castForeignPtr . unCheckMenuItem
+  unsafeCastGObject = CheckMenuItem . castForeignPtr . unGObject
+
+castToCheckMenuItem :: GObjectClass obj => obj -> CheckMenuItem
+castToCheckMenuItem = castTo gTypeCheckMenuItem "CheckMenuItem"
+
+gTypeCheckMenuItem :: GType
+gTypeCheckMenuItem =
+  {# call fun unsafe gtk_check_menu_item_get_type #}
+
+-- ************************************************************** RadioMenuItem
+
+{#pointer *GtkRadioMenuItem as RadioMenuItem foreign newtype #} deriving (Eq,Ord)
+
+mkRadioMenuItem = (RadioMenuItem, objectUnrefFromMainloop)
+unRadioMenuItem (RadioMenuItem o) = o
+
+class CheckMenuItemClass o => RadioMenuItemClass o
+toRadioMenuItem :: RadioMenuItemClass o => o -> RadioMenuItem
+toRadioMenuItem = unsafeCastGObject . toGObject
+
+instance RadioMenuItemClass RadioMenuItem
+instance CheckMenuItemClass RadioMenuItem
+instance MenuItemClass RadioMenuItem
+instance BinClass RadioMenuItem
+instance ContainerClass RadioMenuItem
+instance WidgetClass RadioMenuItem
+instance GObjectClass RadioMenuItem where
+  toGObject = GObject . castForeignPtr . unRadioMenuItem
+  unsafeCastGObject = RadioMenuItem . castForeignPtr . unGObject
+
+castToRadioMenuItem :: GObjectClass obj => obj -> RadioMenuItem
+castToRadioMenuItem = castTo gTypeRadioMenuItem "RadioMenuItem"
+
+gTypeRadioMenuItem :: GType
+gTypeRadioMenuItem =
+  {# call fun unsafe gtk_radio_menu_item_get_type #}
+
+-- ************************************************************ TearoffMenuItem
+
+{#pointer *GtkTearoffMenuItem as TearoffMenuItem foreign newtype #} deriving (Eq,Ord)
+
+mkTearoffMenuItem = (TearoffMenuItem, objectUnrefFromMainloop)
+unTearoffMenuItem (TearoffMenuItem o) = o
+
+class MenuItemClass o => TearoffMenuItemClass o
+toTearoffMenuItem :: TearoffMenuItemClass o => o -> TearoffMenuItem
+toTearoffMenuItem = unsafeCastGObject . toGObject
+
+instance TearoffMenuItemClass TearoffMenuItem
+instance MenuItemClass TearoffMenuItem
+instance BinClass TearoffMenuItem
+instance ContainerClass TearoffMenuItem
+instance WidgetClass TearoffMenuItem
+instance GObjectClass TearoffMenuItem where
+  toGObject = GObject . castForeignPtr . unTearoffMenuItem
+  unsafeCastGObject = TearoffMenuItem . castForeignPtr . unGObject
+
+castToTearoffMenuItem :: GObjectClass obj => obj -> TearoffMenuItem
+castToTearoffMenuItem = castTo gTypeTearoffMenuItem "TearoffMenuItem"
+
+gTypeTearoffMenuItem :: GType
+gTypeTearoffMenuItem =
+  {# call fun unsafe gtk_tearoff_menu_item_get_type #}
+
+-- ************************************************************** ImageMenuItem
+
+{#pointer *GtkImageMenuItem as ImageMenuItem foreign newtype #} deriving (Eq,Ord)
+
+mkImageMenuItem = (ImageMenuItem, objectUnrefFromMainloop)
+unImageMenuItem (ImageMenuItem o) = o
+
+class MenuItemClass o => ImageMenuItemClass o
+toImageMenuItem :: ImageMenuItemClass o => o -> ImageMenuItem
+toImageMenuItem = unsafeCastGObject . toGObject
+
+instance ImageMenuItemClass ImageMenuItem
+instance MenuItemClass ImageMenuItem
+instance BinClass ImageMenuItem
+instance ContainerClass ImageMenuItem
+instance WidgetClass ImageMenuItem
+instance GObjectClass ImageMenuItem where
+  toGObject = GObject . castForeignPtr . unImageMenuItem
+  unsafeCastGObject = ImageMenuItem . castForeignPtr . unGObject
+
+castToImageMenuItem :: GObjectClass obj => obj -> ImageMenuItem
+castToImageMenuItem = castTo gTypeImageMenuItem "ImageMenuItem"
+
+gTypeImageMenuItem :: GType
+gTypeImageMenuItem =
+  {# call fun unsafe gtk_image_menu_item_get_type #}
+
+-- ********************************************************** SeparatorMenuItem
+
+{#pointer *GtkSeparatorMenuItem as SeparatorMenuItem foreign newtype #} deriving (Eq,Ord)
+
+mkSeparatorMenuItem = (SeparatorMenuItem, objectUnrefFromMainloop)
+unSeparatorMenuItem (SeparatorMenuItem o) = o
+
+class MenuItemClass o => SeparatorMenuItemClass o
+toSeparatorMenuItem :: SeparatorMenuItemClass o => o -> SeparatorMenuItem
+toSeparatorMenuItem = unsafeCastGObject . toGObject
+
+instance SeparatorMenuItemClass SeparatorMenuItem
+instance MenuItemClass SeparatorMenuItem
+instance BinClass SeparatorMenuItem
+instance ContainerClass SeparatorMenuItem
+instance WidgetClass SeparatorMenuItem
+instance GObjectClass SeparatorMenuItem where
+  toGObject = GObject . castForeignPtr . unSeparatorMenuItem
+  unsafeCastGObject = SeparatorMenuItem . castForeignPtr . unGObject
+
+castToSeparatorMenuItem :: GObjectClass obj => obj -> SeparatorMenuItem
+castToSeparatorMenuItem = castTo gTypeSeparatorMenuItem "SeparatorMenuItem"
+
+gTypeSeparatorMenuItem :: GType
+gTypeSeparatorMenuItem =
+  {# call fun unsafe gtk_separator_menu_item_get_type #}
+
+-- ********************************************************************* Window
+
+{#pointer *GtkWindow as Window foreign newtype #} deriving (Eq,Ord)
+
+mkWindow = (Window, objectUnrefFromMainloop)
+unWindow (Window o) = o
+
+class BinClass o => WindowClass o
+toWindow :: WindowClass o => o -> Window
+toWindow = unsafeCastGObject . toGObject
+
+instance WindowClass Window
+instance BinClass Window
+instance ContainerClass Window
+instance WidgetClass Window
+instance GObjectClass Window where
+  toGObject = GObject . castForeignPtr . unWindow
+  unsafeCastGObject = Window . castForeignPtr . unGObject
+
+castToWindow :: GObjectClass obj => obj -> Window
+castToWindow = castTo gTypeWindow "Window"
+
+gTypeWindow :: GType
+gTypeWindow =
+  {# call fun unsafe gtk_window_get_type #}
+
+-- ****************************************************************** Assistant
+
+{#pointer *GtkAssistant as Assistant foreign newtype #} deriving (Eq,Ord)
+
+mkAssistant = (Assistant, objectUnrefFromMainloop)
+unAssistant (Assistant o) = o
+
+class WindowClass o => AssistantClass o
+toAssistant :: AssistantClass o => o -> Assistant
+toAssistant = unsafeCastGObject . toGObject
+
+instance AssistantClass Assistant
+instance WindowClass Assistant
+instance BinClass Assistant
+instance ContainerClass Assistant
+instance WidgetClass Assistant
+instance GObjectClass Assistant where
+  toGObject = GObject . castForeignPtr . unAssistant
+  unsafeCastGObject = Assistant . castForeignPtr . unGObject
+
+castToAssistant :: GObjectClass obj => obj -> Assistant
+castToAssistant = castTo gTypeAssistant "Assistant"
+
+gTypeAssistant :: GType
+gTypeAssistant =
+  {# call fun unsafe gtk_assistant_get_type #}
+
+-- ************************************************************ OffscreenWindow
+
+{#pointer *GtkOffscreenWindow as OffscreenWindow foreign newtype #} deriving (Eq,Ord)
+
+mkOffscreenWindow = (OffscreenWindow, objectUnrefFromMainloop)
+unOffscreenWindow (OffscreenWindow o) = o
+
+class WindowClass o => OffscreenWindowClass o
+toOffscreenWindow :: OffscreenWindowClass o => o -> OffscreenWindow
+toOffscreenWindow = unsafeCastGObject . toGObject
+
+instance OffscreenWindowClass OffscreenWindow
+instance WindowClass OffscreenWindow
+instance BinClass OffscreenWindow
+instance ContainerClass OffscreenWindow
+instance WidgetClass OffscreenWindow
+instance GObjectClass OffscreenWindow where
+  toGObject = GObject . castForeignPtr . unOffscreenWindow
+  unsafeCastGObject = OffscreenWindow . castForeignPtr . unGObject
+
+castToOffscreenWindow :: GObjectClass obj => obj -> OffscreenWindow
+castToOffscreenWindow = castTo gTypeOffscreenWindow "OffscreenWindow"
+
+gTypeOffscreenWindow :: GType
+gTypeOffscreenWindow =
+  {# call fun unsafe gtk_offscreen_window_get_type #}
+
+-- ********************************************************************* Dialog
+
+{#pointer *GtkDialog as Dialog foreign newtype #} deriving (Eq,Ord)
+
+mkDialog = (Dialog, objectUnrefFromMainloop)
+unDialog (Dialog o) = o
+
+class WindowClass o => DialogClass o
+toDialog :: DialogClass o => o -> Dialog
+toDialog = unsafeCastGObject . toGObject
+
+instance DialogClass Dialog
+instance WindowClass Dialog
+instance BinClass Dialog
+instance ContainerClass Dialog
+instance WidgetClass Dialog
+instance GObjectClass Dialog where
+  toGObject = GObject . castForeignPtr . unDialog
+  unsafeCastGObject = Dialog . castForeignPtr . unGObject
+
+castToDialog :: GObjectClass obj => obj -> Dialog
+castToDialog = castTo gTypeDialog "Dialog"
+
+gTypeDialog :: GType
+gTypeDialog =
+  {# call fun unsafe gtk_dialog_get_type #}
+
+-- **************************************************************** AboutDialog
+
+{#pointer *GtkAboutDialog as AboutDialog foreign newtype #} deriving (Eq,Ord)
+
+mkAboutDialog = (AboutDialog, objectUnrefFromMainloop)
+unAboutDialog (AboutDialog o) = o
+
+class DialogClass o => AboutDialogClass o
+toAboutDialog :: AboutDialogClass o => o -> AboutDialog
+toAboutDialog = unsafeCastGObject . toGObject
+
+instance AboutDialogClass AboutDialog
+instance DialogClass AboutDialog
+instance WindowClass AboutDialog
+instance BinClass AboutDialog
+instance ContainerClass AboutDialog
+instance WidgetClass AboutDialog
+instance GObjectClass AboutDialog where
+  toGObject = GObject . castForeignPtr . unAboutDialog
+  unsafeCastGObject = AboutDialog . castForeignPtr . unGObject
+
+castToAboutDialog :: GObjectClass obj => obj -> AboutDialog
+castToAboutDialog = castTo gTypeAboutDialog "AboutDialog"
+
+gTypeAboutDialog :: GType
+gTypeAboutDialog =
+  {# call fun unsafe gtk_about_dialog_get_type #}
+
+-- ******************************************************* ColorSelectionDialog
+
+{#pointer *GtkColorSelectionDialog as ColorSelectionDialog foreign newtype #} deriving (Eq,Ord)
+
+mkColorSelectionDialog = (ColorSelectionDialog, objectUnrefFromMainloop)
+unColorSelectionDialog (ColorSelectionDialog o) = o
+
+class DialogClass o => ColorSelectionDialogClass o
+toColorSelectionDialog :: ColorSelectionDialogClass o => o -> ColorSelectionDialog
+toColorSelectionDialog = unsafeCastGObject . toGObject
+
+instance ColorSelectionDialogClass ColorSelectionDialog
+instance DialogClass ColorSelectionDialog
+instance WindowClass ColorSelectionDialog
+instance BinClass ColorSelectionDialog
+instance ContainerClass ColorSelectionDialog
+instance WidgetClass ColorSelectionDialog
+instance GObjectClass ColorSelectionDialog where
+  toGObject = GObject . castForeignPtr . unColorSelectionDialog
+  unsafeCastGObject = ColorSelectionDialog . castForeignPtr . unGObject
+
+castToColorSelectionDialog :: GObjectClass obj => obj -> ColorSelectionDialog
+castToColorSelectionDialog = castTo gTypeColorSelectionDialog "ColorSelectionDialog"
+
+gTypeColorSelectionDialog :: GType
+gTypeColorSelectionDialog =
+  {# call fun unsafe gtk_color_selection_dialog_get_type #}
+
+-- ********************************************************** FileChooserDialog
+
+{#pointer *GtkFileChooserDialog as FileChooserDialog foreign newtype #} deriving (Eq,Ord)
+
+mkFileChooserDialog = (FileChooserDialog, objectUnrefFromMainloop)
+unFileChooserDialog (FileChooserDialog o) = o
+
+class DialogClass o => FileChooserDialogClass o
+toFileChooserDialog :: FileChooserDialogClass o => o -> FileChooserDialog
+toFileChooserDialog = unsafeCastGObject . toGObject
+
+instance FileChooserDialogClass FileChooserDialog
+instance DialogClass FileChooserDialog
+instance WindowClass FileChooserDialog
+instance BinClass FileChooserDialog
+instance ContainerClass FileChooserDialog
+instance WidgetClass FileChooserDialog
+instance GObjectClass FileChooserDialog where
+  toGObject = GObject . castForeignPtr . unFileChooserDialog
+  unsafeCastGObject = FileChooserDialog . castForeignPtr . unGObject
+
+castToFileChooserDialog :: GObjectClass obj => obj -> FileChooserDialog
+castToFileChooserDialog = castTo gTypeFileChooserDialog "FileChooserDialog"
+
+gTypeFileChooserDialog :: GType
+gTypeFileChooserDialog =
+  {# call fun unsafe gtk_file_chooser_dialog_get_type #}
+
+-- ******************************************************** FontSelectionDialog
+
+{#pointer *GtkFontSelectionDialog as FontSelectionDialog foreign newtype #} deriving (Eq,Ord)
+
+mkFontSelectionDialog = (FontSelectionDialog, objectUnrefFromMainloop)
+unFontSelectionDialog (FontSelectionDialog o) = o
+
+class DialogClass o => FontSelectionDialogClass o
+toFontSelectionDialog :: FontSelectionDialogClass o => o -> FontSelectionDialog
+toFontSelectionDialog = unsafeCastGObject . toGObject
+
+instance FontSelectionDialogClass FontSelectionDialog
+instance DialogClass FontSelectionDialog
+instance WindowClass FontSelectionDialog
+instance BinClass FontSelectionDialog
+instance ContainerClass FontSelectionDialog
+instance WidgetClass FontSelectionDialog
+instance GObjectClass FontSelectionDialog where
+  toGObject = GObject . castForeignPtr . unFontSelectionDialog
+  unsafeCastGObject = FontSelectionDialog . castForeignPtr . unGObject
+
+castToFontSelectionDialog :: GObjectClass obj => obj -> FontSelectionDialog
+castToFontSelectionDialog = castTo gTypeFontSelectionDialog "FontSelectionDialog"
+
+gTypeFontSelectionDialog :: GType
+gTypeFontSelectionDialog =
+  {# call fun unsafe gtk_font_selection_dialog_get_type #}
+
+-- ************************************************************** MessageDialog
+
+{#pointer *GtkMessageDialog as MessageDialog foreign newtype #} deriving (Eq,Ord)
+
+mkMessageDialog = (MessageDialog, objectUnrefFromMainloop)
+unMessageDialog (MessageDialog o) = o
+
+class DialogClass o => MessageDialogClass o
+toMessageDialog :: MessageDialogClass o => o -> MessageDialog
+toMessageDialog = unsafeCastGObject . toGObject
+
+instance MessageDialogClass MessageDialog
+instance DialogClass MessageDialog
+instance WindowClass MessageDialog
+instance BinClass MessageDialog
+instance ContainerClass MessageDialog
+instance WidgetClass MessageDialog
+instance GObjectClass MessageDialog where
+  toGObject = GObject . castForeignPtr . unMessageDialog
+  unsafeCastGObject = MessageDialog . castForeignPtr . unGObject
+
+castToMessageDialog :: GObjectClass obj => obj -> MessageDialog
+castToMessageDialog = castTo gTypeMessageDialog "MessageDialog"
+
+gTypeMessageDialog :: GType
+gTypeMessageDialog =
+  {# call fun unsafe gtk_message_dialog_get_type #}
+
+-- ******************************************************************* EventBox
+
+{#pointer *GtkEventBox as EventBox foreign newtype #} deriving (Eq,Ord)
+
+mkEventBox = (EventBox, objectUnrefFromMainloop)
+unEventBox (EventBox o) = o
+
+class BinClass o => EventBoxClass o
+toEventBox :: EventBoxClass o => o -> EventBox
+toEventBox = unsafeCastGObject . toGObject
+
+instance EventBoxClass EventBox
+instance BinClass EventBox
+instance ContainerClass EventBox
+instance WidgetClass EventBox
+instance GObjectClass EventBox where
+  toGObject = GObject . castForeignPtr . unEventBox
+  unsafeCastGObject = EventBox . castForeignPtr . unGObject
+
+castToEventBox :: GObjectClass obj => obj -> EventBox
+castToEventBox = castTo gTypeEventBox "EventBox"
+
+gTypeEventBox :: GType
+gTypeEventBox =
+  {# call fun unsafe gtk_event_box_get_type #}
+
+-- ****************************************************************** HandleBox
+
+{#pointer *GtkHandleBox as HandleBox foreign newtype #} deriving (Eq,Ord)
+
+mkHandleBox = (HandleBox, objectUnrefFromMainloop)
+unHandleBox (HandleBox o) = o
+
+class BinClass o => HandleBoxClass o
+toHandleBox :: HandleBoxClass o => o -> HandleBox
+toHandleBox = unsafeCastGObject . toGObject
+
+instance HandleBoxClass HandleBox
+instance BinClass HandleBox
+instance ContainerClass HandleBox
+instance WidgetClass HandleBox
+instance GObjectClass HandleBox where
+  toGObject = GObject . castForeignPtr . unHandleBox
+  unsafeCastGObject = HandleBox . castForeignPtr . unGObject
+
+castToHandleBox :: GObjectClass obj => obj -> HandleBox
+castToHandleBox = castTo gTypeHandleBox "HandleBox"
+
+gTypeHandleBox :: GType
+gTypeHandleBox =
+  {# call fun unsafe gtk_handle_box_get_type #}
+
+-- ************************************************************* ScrolledWindow
+
+{#pointer *GtkScrolledWindow as ScrolledWindow foreign newtype #} deriving (Eq,Ord)
+
+mkScrolledWindow = (ScrolledWindow, objectUnrefFromMainloop)
+unScrolledWindow (ScrolledWindow o) = o
+
+class BinClass o => ScrolledWindowClass o
+toScrolledWindow :: ScrolledWindowClass o => o -> ScrolledWindow
+toScrolledWindow = unsafeCastGObject . toGObject
+
+instance ScrolledWindowClass ScrolledWindow
+instance BinClass ScrolledWindow
+instance ContainerClass ScrolledWindow
+instance WidgetClass ScrolledWindow
+instance GObjectClass ScrolledWindow where
+  toGObject = GObject . castForeignPtr . unScrolledWindow
+  unsafeCastGObject = ScrolledWindow . castForeignPtr . unGObject
+
+castToScrolledWindow :: GObjectClass obj => obj -> ScrolledWindow
+castToScrolledWindow = castTo gTypeScrolledWindow "ScrolledWindow"
+
+gTypeScrolledWindow :: GType
+gTypeScrolledWindow =
+  {# call fun unsafe gtk_scrolled_window_get_type #}
+
+-- ******************************************************************* Viewport
+
+{#pointer *GtkViewport as Viewport foreign newtype #} deriving (Eq,Ord)
+
+mkViewport = (Viewport, objectUnrefFromMainloop)
+unViewport (Viewport o) = o
+
+class BinClass o => ViewportClass o
+toViewport :: ViewportClass o => o -> Viewport
+toViewport = unsafeCastGObject . toGObject
+
+instance ViewportClass Viewport
+instance BinClass Viewport
+instance ContainerClass Viewport
+instance WidgetClass Viewport
+instance GObjectClass Viewport where
+  toGObject = GObject . castForeignPtr . unViewport
+  unsafeCastGObject = Viewport . castForeignPtr . unGObject
+
+castToViewport :: GObjectClass obj => obj -> Viewport
+castToViewport = castTo gTypeViewport "Viewport"
+
+gTypeViewport :: GType
+gTypeViewport =
+  {# call fun unsafe gtk_viewport_get_type #}
+
+-- ******************************************************************* Expander
+
+{#pointer *GtkExpander as Expander foreign newtype #} deriving (Eq,Ord)
+
+mkExpander = (Expander, objectUnrefFromMainloop)
+unExpander (Expander o) = o
+
+class BinClass o => ExpanderClass o
+toExpander :: ExpanderClass o => o -> Expander
+toExpander = unsafeCastGObject . toGObject
+
+instance ExpanderClass Expander
+instance BinClass Expander
+instance ContainerClass Expander
+instance WidgetClass Expander
+instance GObjectClass Expander where
+  toGObject = GObject . castForeignPtr . unExpander
+  unsafeCastGObject = Expander . castForeignPtr . unGObject
+
+castToExpander :: GObjectClass obj => obj -> Expander
+castToExpander = castTo gTypeExpander "Expander"
+
+gTypeExpander :: GType
+gTypeExpander =
+  {# call fun unsafe gtk_expander_get_type #}
+
+-- ******************************************************************* ComboBox
+
+{#pointer *GtkComboBox as ComboBox foreign newtype #} deriving (Eq,Ord)
+
+mkComboBox = (ComboBox, objectUnrefFromMainloop)
+unComboBox (ComboBox o) = o
+
+class BinClass o => ComboBoxClass o
+toComboBox :: ComboBoxClass o => o -> ComboBox
+toComboBox = unsafeCastGObject . toGObject
+
+instance ComboBoxClass ComboBox
+instance BinClass ComboBox
+instance ContainerClass ComboBox
+instance WidgetClass ComboBox
+instance GObjectClass ComboBox where
+  toGObject = GObject . castForeignPtr . unComboBox
+  unsafeCastGObject = ComboBox . castForeignPtr . unGObject
+
+castToComboBox :: GObjectClass obj => obj -> ComboBox
+castToComboBox = castTo gTypeComboBox "ComboBox"
+
+gTypeComboBox :: GType
+gTypeComboBox =
+  {# call fun unsafe gtk_combo_box_get_type #}
+
+-- ******************************************************************* ToolItem
+
+{#pointer *GtkToolItem as ToolItem foreign newtype #} deriving (Eq,Ord)
+
+mkToolItem = (ToolItem, objectUnrefFromMainloop)
+unToolItem (ToolItem o) = o
+
+class BinClass o => ToolItemClass o
+toToolItem :: ToolItemClass o => o -> ToolItem
+toToolItem = unsafeCastGObject . toGObject
+
+instance ToolItemClass ToolItem
+instance BinClass ToolItem
+instance ContainerClass ToolItem
+instance WidgetClass ToolItem
+instance GObjectClass ToolItem where
+  toGObject = GObject . castForeignPtr . unToolItem
+  unsafeCastGObject = ToolItem . castForeignPtr . unGObject
+
+castToToolItem :: GObjectClass obj => obj -> ToolItem
+castToToolItem = castTo gTypeToolItem "ToolItem"
+
+gTypeToolItem :: GType
+gTypeToolItem =
+  {# call fun unsafe gtk_tool_item_get_type #}
+
+-- ***************************************************************** ToolButton
+
+{#pointer *GtkToolButton as ToolButton foreign newtype #} deriving (Eq,Ord)
+
+mkToolButton = (ToolButton, objectUnrefFromMainloop)
+unToolButton (ToolButton o) = o
+
+class ToolItemClass o => ToolButtonClass o
+toToolButton :: ToolButtonClass o => o -> ToolButton
+toToolButton = unsafeCastGObject . toGObject
+
+instance ToolButtonClass ToolButton
+instance ToolItemClass ToolButton
+instance BinClass ToolButton
+instance ContainerClass ToolButton
+instance WidgetClass ToolButton
+instance GObjectClass ToolButton where
+  toGObject = GObject . castForeignPtr . unToolButton
+  unsafeCastGObject = ToolButton . castForeignPtr . unGObject
+
+castToToolButton :: GObjectClass obj => obj -> ToolButton
+castToToolButton = castTo gTypeToolButton "ToolButton"
+
+gTypeToolButton :: GType
+gTypeToolButton =
+  {# call fun unsafe gtk_tool_button_get_type #}
+
+-- ************************************************************* MenuToolButton
+
+{#pointer *GtkMenuToolButton as MenuToolButton foreign newtype #} deriving (Eq,Ord)
+
+mkMenuToolButton = (MenuToolButton, objectUnrefFromMainloop)
+unMenuToolButton (MenuToolButton o) = o
+
+class ToolButtonClass o => MenuToolButtonClass o
+toMenuToolButton :: MenuToolButtonClass o => o -> MenuToolButton
+toMenuToolButton = unsafeCastGObject . toGObject
+
+instance MenuToolButtonClass MenuToolButton
+instance ToolButtonClass MenuToolButton
+instance ToolItemClass MenuToolButton
+instance BinClass MenuToolButton
+instance ContainerClass MenuToolButton
+instance WidgetClass MenuToolButton
+instance GObjectClass MenuToolButton where
+  toGObject = GObject . castForeignPtr . unMenuToolButton
+  unsafeCastGObject = MenuToolButton . castForeignPtr . unGObject
+
+castToMenuToolButton :: GObjectClass obj => obj -> MenuToolButton
+castToMenuToolButton = castTo gTypeMenuToolButton "MenuToolButton"
+
+gTypeMenuToolButton :: GType
+gTypeMenuToolButton =
+  {# call fun unsafe gtk_menu_tool_button_get_type #}
+
+-- *********************************************************** ToggleToolButton
+
+{#pointer *GtkToggleToolButton as ToggleToolButton foreign newtype #} deriving (Eq,Ord)
+
+mkToggleToolButton = (ToggleToolButton, objectUnrefFromMainloop)
+unToggleToolButton (ToggleToolButton o) = o
+
+class ToolButtonClass o => ToggleToolButtonClass o
+toToggleToolButton :: ToggleToolButtonClass o => o -> ToggleToolButton
+toToggleToolButton = unsafeCastGObject . toGObject
+
+instance ToggleToolButtonClass ToggleToolButton
+instance ToolButtonClass ToggleToolButton
+instance ToolItemClass ToggleToolButton
+instance BinClass ToggleToolButton
+instance ContainerClass ToggleToolButton
+instance WidgetClass ToggleToolButton
+instance GObjectClass ToggleToolButton where
+  toGObject = GObject . castForeignPtr . unToggleToolButton
+  unsafeCastGObject = ToggleToolButton . castForeignPtr . unGObject
+
+castToToggleToolButton :: GObjectClass obj => obj -> ToggleToolButton
+castToToggleToolButton = castTo gTypeToggleToolButton "ToggleToolButton"
+
+gTypeToggleToolButton :: GType
+gTypeToggleToolButton =
+  {# call fun unsafe gtk_toggle_tool_button_get_type #}
+
+-- ************************************************************ RadioToolButton
+
+{#pointer *GtkRadioToolButton as RadioToolButton foreign newtype #} deriving (Eq,Ord)
+
+mkRadioToolButton = (RadioToolButton, objectUnrefFromMainloop)
+unRadioToolButton (RadioToolButton o) = o
+
+class ToggleToolButtonClass o => RadioToolButtonClass o
+toRadioToolButton :: RadioToolButtonClass o => o -> RadioToolButton
+toRadioToolButton = unsafeCastGObject . toGObject
+
+instance RadioToolButtonClass RadioToolButton
+instance ToggleToolButtonClass RadioToolButton
+instance ToolButtonClass RadioToolButton
+instance ToolItemClass RadioToolButton
+instance BinClass RadioToolButton
+instance ContainerClass RadioToolButton
+instance WidgetClass RadioToolButton
+instance GObjectClass RadioToolButton where
+  toGObject = GObject . castForeignPtr . unRadioToolButton
+  unsafeCastGObject = RadioToolButton . castForeignPtr . unGObject
+
+castToRadioToolButton :: GObjectClass obj => obj -> RadioToolButton
+castToRadioToolButton = castTo gTypeRadioToolButton "RadioToolButton"
+
+gTypeRadioToolButton :: GType
+gTypeRadioToolButton =
+  {# call fun unsafe gtk_radio_tool_button_get_type #}
+
+-- ********************************************************** SeparatorToolItem
+
+{#pointer *GtkSeparatorToolItem as SeparatorToolItem foreign newtype #} deriving (Eq,Ord)
+
+mkSeparatorToolItem = (SeparatorToolItem, objectUnrefFromMainloop)
+unSeparatorToolItem (SeparatorToolItem o) = o
+
+class ToolItemClass o => SeparatorToolItemClass o
+toSeparatorToolItem :: SeparatorToolItemClass o => o -> SeparatorToolItem
+toSeparatorToolItem = unsafeCastGObject . toGObject
+
+instance SeparatorToolItemClass SeparatorToolItem
+instance ToolItemClass SeparatorToolItem
+instance BinClass SeparatorToolItem
+instance ContainerClass SeparatorToolItem
+instance WidgetClass SeparatorToolItem
+instance GObjectClass SeparatorToolItem where
+  toGObject = GObject . castForeignPtr . unSeparatorToolItem
+  unsafeCastGObject = SeparatorToolItem . castForeignPtr . unGObject
+
+castToSeparatorToolItem :: GObjectClass obj => obj -> SeparatorToolItem
+castToSeparatorToolItem = castTo gTypeSeparatorToolItem "SeparatorToolItem"
+
+gTypeSeparatorToolItem :: GType
+gTypeSeparatorToolItem =
+  {# call fun unsafe gtk_separator_tool_item_get_type #}
+
+-- ************************************************************************ Box
+
+{#pointer *GtkBox as Box foreign newtype #} deriving (Eq,Ord)
+
+mkBox = (Box, objectUnrefFromMainloop)
+unBox (Box o) = o
+
+class ContainerClass o => BoxClass o
+toBox :: BoxClass o => o -> Box
+toBox = unsafeCastGObject . toGObject
+
+instance BoxClass Box
+instance ContainerClass Box
+instance WidgetClass Box
+instance GObjectClass Box where
+  toGObject = GObject . castForeignPtr . unBox
+  unsafeCastGObject = Box . castForeignPtr . unGObject
+
+castToBox :: GObjectClass obj => obj -> Box
+castToBox = castTo gTypeBox "Box"
+
+gTypeBox :: GType
+gTypeBox =
+  {# call fun unsafe gtk_box_get_type #}
+
+-- ****************************************************************** ButtonBox
+
+{#pointer *GtkButtonBox as ButtonBox foreign newtype #} deriving (Eq,Ord)
+
+mkButtonBox = (ButtonBox, objectUnrefFromMainloop)
+unButtonBox (ButtonBox o) = o
+
+class BoxClass o => ButtonBoxClass o
+toButtonBox :: ButtonBoxClass o => o -> ButtonBox
+toButtonBox = unsafeCastGObject . toGObject
+
+instance ButtonBoxClass ButtonBox
+instance BoxClass ButtonBox
+instance ContainerClass ButtonBox
+instance WidgetClass ButtonBox
+instance GObjectClass ButtonBox where
+  toGObject = GObject . castForeignPtr . unButtonBox
+  unsafeCastGObject = ButtonBox . castForeignPtr . unGObject
+
+castToButtonBox :: GObjectClass obj => obj -> ButtonBox
+castToButtonBox = castTo gTypeButtonBox "ButtonBox"
+
+gTypeButtonBox :: GType
+gTypeButtonBox =
+  {# call fun unsafe gtk_button_box_get_type #}
+
+-- ***************************************************************** HButtonBox
+
+{#pointer *GtkHButtonBox as HButtonBox foreign newtype #} deriving (Eq,Ord)
+
+mkHButtonBox = (HButtonBox, objectUnrefFromMainloop)
+unHButtonBox (HButtonBox o) = o
+
+class ButtonBoxClass o => HButtonBoxClass o
+toHButtonBox :: HButtonBoxClass o => o -> HButtonBox
+toHButtonBox = unsafeCastGObject . toGObject
+
+instance HButtonBoxClass HButtonBox
+instance ButtonBoxClass HButtonBox
+instance BoxClass HButtonBox
+instance ContainerClass HButtonBox
+instance WidgetClass HButtonBox
+instance GObjectClass HButtonBox where
+  toGObject = GObject . castForeignPtr . unHButtonBox
+  unsafeCastGObject = HButtonBox . castForeignPtr . unGObject
+
+castToHButtonBox :: GObjectClass obj => obj -> HButtonBox
+castToHButtonBox = castTo gTypeHButtonBox "HButtonBox"
+
+gTypeHButtonBox :: GType
+gTypeHButtonBox =
+  {# call fun unsafe gtk_hbutton_box_get_type #}
+
+-- ***************************************************************** VButtonBox
+
+{#pointer *GtkVButtonBox as VButtonBox foreign newtype #} deriving (Eq,Ord)
+
+mkVButtonBox = (VButtonBox, objectUnrefFromMainloop)
+unVButtonBox (VButtonBox o) = o
+
+class ButtonBoxClass o => VButtonBoxClass o
+toVButtonBox :: VButtonBoxClass o => o -> VButtonBox
+toVButtonBox = unsafeCastGObject . toGObject
+
+instance VButtonBoxClass VButtonBox
+instance ButtonBoxClass VButtonBox
+instance BoxClass VButtonBox
+instance ContainerClass VButtonBox
+instance WidgetClass VButtonBox
+instance GObjectClass VButtonBox where
+  toGObject = GObject . castForeignPtr . unVButtonBox
+  unsafeCastGObject = VButtonBox . castForeignPtr . unGObject
+
+castToVButtonBox :: GObjectClass obj => obj -> VButtonBox
+castToVButtonBox = castTo gTypeVButtonBox "VButtonBox"
+
+gTypeVButtonBox :: GType
+gTypeVButtonBox =
+  {# call fun unsafe gtk_vbutton_box_get_type #}
+
+-- *********************************************************************** VBox
+
+{#pointer *GtkVBox as VBox foreign newtype #} deriving (Eq,Ord)
+
+mkVBox = (VBox, objectUnrefFromMainloop)
+unVBox (VBox o) = o
+
+class BoxClass o => VBoxClass o
+toVBox :: VBoxClass o => o -> VBox
+toVBox = unsafeCastGObject . toGObject
+
+instance VBoxClass VBox
+instance BoxClass VBox
+instance ContainerClass VBox
+instance WidgetClass VBox
+instance GObjectClass VBox where
+  toGObject = GObject . castForeignPtr . unVBox
+  unsafeCastGObject = VBox . castForeignPtr . unGObject
+
+castToVBox :: GObjectClass obj => obj -> VBox
+castToVBox = castTo gTypeVBox "VBox"
+
+gTypeVBox :: GType
+gTypeVBox =
+  {# call fun unsafe gtk_vbox_get_type #}
+
+-- ******************************************************** RecentChooserWidget
+
+{#pointer *GtkRecentChooserWidget as RecentChooserWidget foreign newtype #} deriving (Eq,Ord)
+
+mkRecentChooserWidget = (RecentChooserWidget, objectUnrefFromMainloop)
+unRecentChooserWidget (RecentChooserWidget o) = o
+
+class VBoxClass o => RecentChooserWidgetClass o
+toRecentChooserWidget :: RecentChooserWidgetClass o => o -> RecentChooserWidget
+toRecentChooserWidget = unsafeCastGObject . toGObject
+
+instance RecentChooserWidgetClass RecentChooserWidget
+instance VBoxClass RecentChooserWidget
+instance BoxClass RecentChooserWidget
+instance ContainerClass RecentChooserWidget
+instance WidgetClass RecentChooserWidget
+instance GObjectClass RecentChooserWidget where
+  toGObject = GObject . castForeignPtr . unRecentChooserWidget
+  unsafeCastGObject = RecentChooserWidget . castForeignPtr . unGObject
+
+castToRecentChooserWidget :: GObjectClass obj => obj -> RecentChooserWidget
+castToRecentChooserWidget = castTo gTypeRecentChooserWidget "RecentChooserWidget"
+
+gTypeRecentChooserWidget :: GType
+gTypeRecentChooserWidget =
+  {# call fun unsafe gtk_recent_chooser_widget_get_type #}
+
+-- ************************************************************* ColorSelection
+
+{#pointer *GtkColorSelection as ColorSelection foreign newtype #} deriving (Eq,Ord)
+
+mkColorSelection = (ColorSelection, objectUnrefFromMainloop)
+unColorSelection (ColorSelection o) = o
+
+class VBoxClass o => ColorSelectionClass o
+toColorSelection :: ColorSelectionClass o => o -> ColorSelection
+toColorSelection = unsafeCastGObject . toGObject
+
+instance ColorSelectionClass ColorSelection
+instance VBoxClass ColorSelection
+instance BoxClass ColorSelection
+instance ContainerClass ColorSelection
+instance WidgetClass ColorSelection
+instance GObjectClass ColorSelection where
+  toGObject = GObject . castForeignPtr . unColorSelection
+  unsafeCastGObject = ColorSelection . castForeignPtr . unGObject
+
+castToColorSelection :: GObjectClass obj => obj -> ColorSelection
+castToColorSelection = castTo gTypeColorSelection "ColorSelection"
+
+gTypeColorSelection :: GType
+gTypeColorSelection =
+  {# call fun unsafe gtk_color_selection_get_type #}
+
+-- ************************************************************** FontSelection
+
+{#pointer *GtkFontSelection as FontSelection foreign newtype #} deriving (Eq,Ord)
+
+mkFontSelection = (FontSelection, objectUnrefFromMainloop)
+unFontSelection (FontSelection o) = o
+
+class VBoxClass o => FontSelectionClass o
+toFontSelection :: FontSelectionClass o => o -> FontSelection
+toFontSelection = unsafeCastGObject . toGObject
+
+instance FontSelectionClass FontSelection
+instance VBoxClass FontSelection
+instance BoxClass FontSelection
+instance ContainerClass FontSelection
+instance WidgetClass FontSelection
+instance GObjectClass FontSelection where
+  toGObject = GObject . castForeignPtr . unFontSelection
+  unsafeCastGObject = FontSelection . castForeignPtr . unGObject
+
+castToFontSelection :: GObjectClass obj => obj -> FontSelection
+castToFontSelection = castTo gTypeFontSelection "FontSelection"
+
+gTypeFontSelection :: GType
+gTypeFontSelection =
+  {# call fun unsafe gtk_font_selection_get_type #}
+
+-- ********************************************************** FileChooserWidget
+
+{#pointer *GtkFileChooserWidget as FileChooserWidget foreign newtype #} deriving (Eq,Ord)
+
+mkFileChooserWidget = (FileChooserWidget, objectUnrefFromMainloop)
+unFileChooserWidget (FileChooserWidget o) = o
+
+class VBoxClass o => FileChooserWidgetClass o
+toFileChooserWidget :: FileChooserWidgetClass o => o -> FileChooserWidget
+toFileChooserWidget = unsafeCastGObject . toGObject
+
+instance FileChooserWidgetClass FileChooserWidget
+instance VBoxClass FileChooserWidget
+instance BoxClass FileChooserWidget
+instance ContainerClass FileChooserWidget
+instance WidgetClass FileChooserWidget
+instance GObjectClass FileChooserWidget where
+  toGObject = GObject . castForeignPtr . unFileChooserWidget
+  unsafeCastGObject = FileChooserWidget . castForeignPtr . unGObject
+
+castToFileChooserWidget :: GObjectClass obj => obj -> FileChooserWidget
+castToFileChooserWidget = castTo gTypeFileChooserWidget "FileChooserWidget"
+
+gTypeFileChooserWidget :: GType
+gTypeFileChooserWidget =
+  {# call fun unsafe gtk_file_chooser_widget_get_type #}
+
+-- *********************************************************************** HBox
+
+{#pointer *GtkHBox as HBox foreign newtype #} deriving (Eq,Ord)
+
+mkHBox = (HBox, objectUnrefFromMainloop)
+unHBox (HBox o) = o
+
+class BoxClass o => HBoxClass o
+toHBox :: HBoxClass o => o -> HBox
+toHBox = unsafeCastGObject . toGObject
+
+instance HBoxClass HBox
+instance BoxClass HBox
+instance ContainerClass HBox
+instance WidgetClass HBox
+instance GObjectClass HBox where
+  toGObject = GObject . castForeignPtr . unHBox
+  unsafeCastGObject = HBox . castForeignPtr . unGObject
+
+castToHBox :: GObjectClass obj => obj -> HBox
+castToHBox = castTo gTypeHBox "HBox"
+
+gTypeHBox :: GType
+gTypeHBox =
+  {# call fun unsafe gtk_hbox_get_type #}
+
+-- ******************************************************************** InfoBar
+
+{#pointer *GtkInfoBar as InfoBar foreign newtype #} deriving (Eq,Ord)
+
+mkInfoBar = (InfoBar, objectUnrefFromMainloop)
+unInfoBar (InfoBar o) = o
+
+class HBoxClass o => InfoBarClass o
+toInfoBar :: InfoBarClass o => o -> InfoBar
+toInfoBar = unsafeCastGObject . toGObject
+
+instance InfoBarClass InfoBar
+instance HBoxClass InfoBar
+instance BoxClass InfoBar
+instance ContainerClass InfoBar
+instance WidgetClass InfoBar
+instance GObjectClass InfoBar where
+  toGObject = GObject . castForeignPtr . unInfoBar
+  unsafeCastGObject = InfoBar . castForeignPtr . unGObject
+
+castToInfoBar :: GObjectClass obj => obj -> InfoBar
+castToInfoBar = castTo gTypeInfoBar "InfoBar"
+
+gTypeInfoBar :: GType
+gTypeInfoBar =
+  {# call fun unsafe gtk_info_bar_get_type #}
+
+-- ********************************************************** FileChooserButton
+
+{#pointer *GtkFileChooserButton as FileChooserButton foreign newtype #} deriving (Eq,Ord)
+
+mkFileChooserButton = (FileChooserButton, objectUnrefFromMainloop)
+unFileChooserButton (FileChooserButton o) = o
+
+class HBoxClass o => FileChooserButtonClass o
+toFileChooserButton :: FileChooserButtonClass o => o -> FileChooserButton
+toFileChooserButton = unsafeCastGObject . toGObject
+
+instance FileChooserButtonClass FileChooserButton
+instance HBoxClass FileChooserButton
+instance BoxClass FileChooserButton
+instance ContainerClass FileChooserButton
+instance WidgetClass FileChooserButton
+instance GObjectClass FileChooserButton where
+  toGObject = GObject . castForeignPtr . unFileChooserButton
+  unsafeCastGObject = FileChooserButton . castForeignPtr . unGObject
+
+castToFileChooserButton :: GObjectClass obj => obj -> FileChooserButton
+castToFileChooserButton = castTo gTypeFileChooserButton "FileChooserButton"
+
+gTypeFileChooserButton :: GType
+gTypeFileChooserButton =
+  {# call fun unsafe gtk_file_chooser_button_get_type #}
+
+-- ****************************************************************** Statusbar
+
+{#pointer *GtkStatusbar as Statusbar foreign newtype #} deriving (Eq,Ord)
+
+mkStatusbar = (Statusbar, objectUnrefFromMainloop)
+unStatusbar (Statusbar o) = o
+
+class HBoxClass o => StatusbarClass o
+toStatusbar :: StatusbarClass o => o -> Statusbar
+toStatusbar = unsafeCastGObject . toGObject
+
+instance StatusbarClass Statusbar
+instance HBoxClass Statusbar
+instance BoxClass Statusbar
+instance ContainerClass Statusbar
+instance WidgetClass Statusbar
+instance GObjectClass Statusbar where
+  toGObject = GObject . castForeignPtr . unStatusbar
+  unsafeCastGObject = Statusbar . castForeignPtr . unGObject
+
+castToStatusbar :: GObjectClass obj => obj -> Statusbar
+castToStatusbar = castTo gTypeStatusbar "Statusbar"
+
+gTypeStatusbar :: GType
+gTypeStatusbar =
+  {# call fun unsafe gtk_statusbar_get_type #}
+
+-- ********************************************************************** Fixed
+
+{#pointer *GtkFixed as Fixed foreign newtype #} deriving (Eq,Ord)
+
+mkFixed = (Fixed, objectUnrefFromMainloop)
+unFixed (Fixed o) = o
+
+class ContainerClass o => FixedClass o
+toFixed :: FixedClass o => o -> Fixed
+toFixed = unsafeCastGObject . toGObject
+
+instance FixedClass Fixed
+instance ContainerClass Fixed
+instance WidgetClass Fixed
+instance GObjectClass Fixed where
+  toGObject = GObject . castForeignPtr . unFixed
+  unsafeCastGObject = Fixed . castForeignPtr . unGObject
+
+castToFixed :: GObjectClass obj => obj -> Fixed
+castToFixed = castTo gTypeFixed "Fixed"
+
+gTypeFixed :: GType
+gTypeFixed =
+  {# call fun unsafe gtk_fixed_get_type #}
+
+-- ********************************************************************** Paned
+
+{#pointer *GtkPaned as Paned foreign newtype #} deriving (Eq,Ord)
+
+mkPaned = (Paned, objectUnrefFromMainloop)
+unPaned (Paned o) = o
+
+class ContainerClass o => PanedClass o
+toPaned :: PanedClass o => o -> Paned
+toPaned = unsafeCastGObject . toGObject
+
+instance PanedClass Paned
+instance ContainerClass Paned
+instance WidgetClass Paned
+instance GObjectClass Paned where
+  toGObject = GObject . castForeignPtr . unPaned
+  unsafeCastGObject = Paned . castForeignPtr . unGObject
+
+castToPaned :: GObjectClass obj => obj -> Paned
+castToPaned = castTo gTypePaned "Paned"
+
+gTypePaned :: GType
+gTypePaned =
+  {# call fun unsafe gtk_paned_get_type #}
+
+-- ********************************************************************* HPaned
+
+{#pointer *GtkHPaned as HPaned foreign newtype #} deriving (Eq,Ord)
+
+mkHPaned = (HPaned, objectUnrefFromMainloop)
+unHPaned (HPaned o) = o
+
+class PanedClass o => HPanedClass o
+toHPaned :: HPanedClass o => o -> HPaned
+toHPaned = unsafeCastGObject . toGObject
+
+instance HPanedClass HPaned
+instance PanedClass HPaned
+instance ContainerClass HPaned
+instance WidgetClass HPaned
+instance GObjectClass HPaned where
+  toGObject = GObject . castForeignPtr . unHPaned
+  unsafeCastGObject = HPaned . castForeignPtr . unGObject
+
+castToHPaned :: GObjectClass obj => obj -> HPaned
+castToHPaned = castTo gTypeHPaned "HPaned"
+
+gTypeHPaned :: GType
+gTypeHPaned =
+  {# call fun unsafe gtk_hpaned_get_type #}
+
+-- ********************************************************************* VPaned
+
+{#pointer *GtkVPaned as VPaned foreign newtype #} deriving (Eq,Ord)
+
+mkVPaned = (VPaned, objectUnrefFromMainloop)
+unVPaned (VPaned o) = o
+
+class PanedClass o => VPanedClass o
+toVPaned :: VPanedClass o => o -> VPaned
+toVPaned = unsafeCastGObject . toGObject
+
+instance VPanedClass VPaned
+instance PanedClass VPaned
+instance ContainerClass VPaned
+instance WidgetClass VPaned
+instance GObjectClass VPaned where
+  toGObject = GObject . castForeignPtr . unVPaned
+  unsafeCastGObject = VPaned . castForeignPtr . unGObject
+
+castToVPaned :: GObjectClass obj => obj -> VPaned
+castToVPaned = castTo gTypeVPaned "VPaned"
+
+gTypeVPaned :: GType
+gTypeVPaned =
+  {# call fun unsafe gtk_vpaned_get_type #}
+
+-- ******************************************************************* IconView
+
+{#pointer *GtkIconView as IconView foreign newtype #} deriving (Eq,Ord)
+
+mkIconView = (IconView, objectUnrefFromMainloop)
+unIconView (IconView o) = o
+
+class ContainerClass o => IconViewClass o
+toIconView :: IconViewClass o => o -> IconView
+toIconView = unsafeCastGObject . toGObject
+
+instance IconViewClass IconView
+instance ContainerClass IconView
+instance WidgetClass IconView
+instance GObjectClass IconView where
+  toGObject = GObject . castForeignPtr . unIconView
+  unsafeCastGObject = IconView . castForeignPtr . unGObject
+
+castToIconView :: GObjectClass obj => obj -> IconView
+castToIconView = castTo gTypeIconView "IconView"
+
+gTypeIconView :: GType
+gTypeIconView =
+  {# call fun unsafe gtk_icon_view_get_type #}
+
+-- ********************************************************************* Layout
+
+{#pointer *GtkLayout as Layout foreign newtype #} deriving (Eq,Ord)
+
+mkLayout = (Layout, objectUnrefFromMainloop)
+unLayout (Layout o) = o
+
+class ContainerClass o => LayoutClass o
+toLayout :: LayoutClass o => o -> Layout
+toLayout = unsafeCastGObject . toGObject
+
+instance LayoutClass Layout
+instance ContainerClass Layout
+instance WidgetClass Layout
+instance GObjectClass Layout where
+  toGObject = GObject . castForeignPtr . unLayout
+  unsafeCastGObject = Layout . castForeignPtr . unGObject
+
+castToLayout :: GObjectClass obj => obj -> Layout
+castToLayout = castTo gTypeLayout "Layout"
+
+gTypeLayout :: GType
+gTypeLayout =
+  {# call fun unsafe gtk_layout_get_type #}
+
+-- ****************************************************************** MenuShell
+
+{#pointer *GtkMenuShell as MenuShell foreign newtype #} deriving (Eq,Ord)
+
+mkMenuShell = (MenuShell, objectUnrefFromMainloop)
+unMenuShell (MenuShell o) = o
+
+class ContainerClass o => MenuShellClass o
+toMenuShell :: MenuShellClass o => o -> MenuShell
+toMenuShell = unsafeCastGObject . toGObject
+
+instance MenuShellClass MenuShell
+instance ContainerClass MenuShell
+instance WidgetClass MenuShell
+instance GObjectClass MenuShell where
+  toGObject = GObject . castForeignPtr . unMenuShell
+  unsafeCastGObject = MenuShell . castForeignPtr . unGObject
+
+castToMenuShell :: GObjectClass obj => obj -> MenuShell
+castToMenuShell = castTo gTypeMenuShell "MenuShell"
+
+gTypeMenuShell :: GType
+gTypeMenuShell =
+  {# call fun unsafe gtk_menu_shell_get_type #}
+
+-- *********************************************************************** Menu
+
+{#pointer *GtkMenu as Menu foreign newtype #} deriving (Eq,Ord)
+
+mkMenu = (Menu, objectUnrefFromMainloop)
+unMenu (Menu o) = o
+
+class MenuShellClass o => MenuClass o
+toMenu :: MenuClass o => o -> Menu
+toMenu = unsafeCastGObject . toGObject
+
+instance MenuClass Menu
+instance MenuShellClass Menu
+instance ContainerClass Menu
+instance WidgetClass Menu
+instance GObjectClass Menu where
+  toGObject = GObject . castForeignPtr . unMenu
+  unsafeCastGObject = Menu . castForeignPtr . unGObject
+
+castToMenu :: GObjectClass obj => obj -> Menu
+castToMenu = castTo gTypeMenu "Menu"
+
+gTypeMenu :: GType
+gTypeMenu =
+  {# call fun unsafe gtk_menu_get_type #}
+
+-- ********************************************************** RecentChooserMenu
+
+{#pointer *GtkRecentChooserMenu as RecentChooserMenu foreign newtype #} deriving (Eq,Ord)
+
+mkRecentChooserMenu = (RecentChooserMenu, objectUnrefFromMainloop)
+unRecentChooserMenu (RecentChooserMenu o) = o
+
+class MenuClass o => RecentChooserMenuClass o
+toRecentChooserMenu :: RecentChooserMenuClass o => o -> RecentChooserMenu
+toRecentChooserMenu = unsafeCastGObject . toGObject
+
+instance RecentChooserMenuClass RecentChooserMenu
+instance MenuClass RecentChooserMenu
+instance MenuShellClass RecentChooserMenu
+instance ContainerClass RecentChooserMenu
+instance WidgetClass RecentChooserMenu
+instance GObjectClass RecentChooserMenu where
+  toGObject = GObject . castForeignPtr . unRecentChooserMenu
+  unsafeCastGObject = RecentChooserMenu . castForeignPtr . unGObject
+
+castToRecentChooserMenu :: GObjectClass obj => obj -> RecentChooserMenu
+castToRecentChooserMenu = castTo gTypeRecentChooserMenu "RecentChooserMenu"
+
+gTypeRecentChooserMenu :: GType
+gTypeRecentChooserMenu =
+  {# call fun unsafe gtk_recent_chooser_menu_get_type #}
+
+-- ******************************************************************** MenuBar
+
+{#pointer *GtkMenuBar as MenuBar foreign newtype #} deriving (Eq,Ord)
+
+mkMenuBar = (MenuBar, objectUnrefFromMainloop)
+unMenuBar (MenuBar o) = o
+
+class MenuShellClass o => MenuBarClass o
+toMenuBar :: MenuBarClass o => o -> MenuBar
+toMenuBar = unsafeCastGObject . toGObject
+
+instance MenuBarClass MenuBar
+instance MenuShellClass MenuBar
+instance ContainerClass MenuBar
+instance WidgetClass MenuBar
+instance GObjectClass MenuBar where
+  toGObject = GObject . castForeignPtr . unMenuBar
+  unsafeCastGObject = MenuBar . castForeignPtr . unGObject
+
+castToMenuBar :: GObjectClass obj => obj -> MenuBar
+castToMenuBar = castTo gTypeMenuBar "MenuBar"
+
+gTypeMenuBar :: GType
+gTypeMenuBar =
+  {# call fun unsafe gtk_menu_bar_get_type #}
+
+-- ******************************************************************* Notebook
+
+{#pointer *GtkNotebook as Notebook foreign newtype #} deriving (Eq,Ord)
+
+mkNotebook = (Notebook, objectUnrefFromMainloop)
+unNotebook (Notebook o) = o
+
+class ContainerClass o => NotebookClass o
+toNotebook :: NotebookClass o => o -> Notebook
+toNotebook = unsafeCastGObject . toGObject
+
+instance NotebookClass Notebook
+instance ContainerClass Notebook
+instance WidgetClass Notebook
+instance GObjectClass Notebook where
+  toGObject = GObject . castForeignPtr . unNotebook
+  unsafeCastGObject = Notebook . castForeignPtr . unGObject
+
+castToNotebook :: GObjectClass obj => obj -> Notebook
+castToNotebook = castTo gTypeNotebook "Notebook"
+
+gTypeNotebook :: GType
+gTypeNotebook =
+  {# call fun unsafe gtk_notebook_get_type #}
+
+-- ********************************************************************** Table
+
+{#pointer *GtkTable as Table foreign newtype #} deriving (Eq,Ord)
+
+mkTable = (Table, objectUnrefFromMainloop)
+unTable (Table o) = o
+
+class ContainerClass o => TableClass o
+toTable :: TableClass o => o -> Table
+toTable = unsafeCastGObject . toGObject
+
+instance TableClass Table
+instance ContainerClass Table
+instance WidgetClass Table
+instance GObjectClass Table where
+  toGObject = GObject . castForeignPtr . unTable
+  unsafeCastGObject = Table . castForeignPtr . unGObject
+
+castToTable :: GObjectClass obj => obj -> Table
+castToTable = castTo gTypeTable "Table"
+
+gTypeTable :: GType
+gTypeTable =
+  {# call fun unsafe gtk_table_get_type #}
+
+-- ******************************************************************* TextView
+
+{#pointer *GtkTextView as TextView foreign newtype #} deriving (Eq,Ord)
+
+mkTextView = (TextView, objectUnrefFromMainloop)
+unTextView (TextView o) = o
+
+class ContainerClass o => TextViewClass o
+toTextView :: TextViewClass o => o -> TextView
+toTextView = unsafeCastGObject . toGObject
+
+instance TextViewClass TextView
+instance ContainerClass TextView
+instance WidgetClass TextView
+instance GObjectClass TextView where
+  toGObject = GObject . castForeignPtr . unTextView
+  unsafeCastGObject = TextView . castForeignPtr . unGObject
+
+castToTextView :: GObjectClass obj => obj -> TextView
+castToTextView = castTo gTypeTextView "TextView"
+
+gTypeTextView :: GType
+gTypeTextView =
+  {# call fun unsafe gtk_text_view_get_type #}
+
+-- ******************************************************************** Toolbar
+
+{#pointer *GtkToolbar as Toolbar foreign newtype #} deriving (Eq,Ord)
+
+mkToolbar = (Toolbar, objectUnrefFromMainloop)
+unToolbar (Toolbar o) = o
+
+class ContainerClass o => ToolbarClass o
+toToolbar :: ToolbarClass o => o -> Toolbar
+toToolbar = unsafeCastGObject . toGObject
+
+instance ToolbarClass Toolbar
+instance ContainerClass Toolbar
+instance WidgetClass Toolbar
+instance GObjectClass Toolbar where
+  toGObject = GObject . castForeignPtr . unToolbar
+  unsafeCastGObject = Toolbar . castForeignPtr . unGObject
+
+castToToolbar :: GObjectClass obj => obj -> Toolbar
+castToToolbar = castTo gTypeToolbar "Toolbar"
+
+gTypeToolbar :: GType
+gTypeToolbar =
+  {# call fun unsafe gtk_toolbar_get_type #}
+
+-- ******************************************************************* TreeView
+
+{#pointer *GtkTreeView as TreeView foreign newtype #} deriving (Eq,Ord)
+
+mkTreeView = (TreeView, objectUnrefFromMainloop)
+unTreeView (TreeView o) = o
+
+class ContainerClass o => TreeViewClass o
+toTreeView :: TreeViewClass o => o -> TreeView
+toTreeView = unsafeCastGObject . toGObject
+
+instance TreeViewClass TreeView
+instance ContainerClass TreeView
+instance WidgetClass TreeView
+instance GObjectClass TreeView where
+  toGObject = GObject . castForeignPtr . unTreeView
+  unsafeCastGObject = TreeView . castForeignPtr . unGObject
+
+castToTreeView :: GObjectClass obj => obj -> TreeView
+castToTreeView = castTo gTypeTreeView "TreeView"
+
+gTypeTreeView :: GType
+gTypeTreeView =
+  {# call fun unsafe gtk_tree_view_get_type #}
+
+-- ******************************************************************* Calendar
+
+{#pointer *GtkCalendar as Calendar foreign newtype #} deriving (Eq,Ord)
+
+mkCalendar = (Calendar, objectUnrefFromMainloop)
+unCalendar (Calendar o) = o
+
+class WidgetClass o => CalendarClass o
+toCalendar :: CalendarClass o => o -> Calendar
+toCalendar = unsafeCastGObject . toGObject
+
+instance CalendarClass Calendar
+instance WidgetClass Calendar
+instance GObjectClass Calendar where
+  toGObject = GObject . castForeignPtr . unCalendar
+  unsafeCastGObject = Calendar . castForeignPtr . unGObject
+
+castToCalendar :: GObjectClass obj => obj -> Calendar
+castToCalendar = castTo gTypeCalendar "Calendar"
+
+gTypeCalendar :: GType
+gTypeCalendar =
+  {# call fun unsafe gtk_calendar_get_type #}
+
+-- ******************************************************************* CellView
+
+{#pointer *GtkCellView as CellView foreign newtype #} deriving (Eq,Ord)
+
+mkCellView = (CellView, objectUnrefFromMainloop)
+unCellView (CellView o) = o
+
+class WidgetClass o => CellViewClass o
+toCellView :: CellViewClass o => o -> CellView
+toCellView = unsafeCastGObject . toGObject
+
+instance CellViewClass CellView
+instance WidgetClass CellView
+instance GObjectClass CellView where
+  toGObject = GObject . castForeignPtr . unCellView
+  unsafeCastGObject = CellView . castForeignPtr . unGObject
+
+castToCellView :: GObjectClass obj => obj -> CellView
+castToCellView = castTo gTypeCellView "CellView"
+
+gTypeCellView :: GType
+gTypeCellView =
+  {# call fun unsafe gtk_cell_view_get_type #}
+
+-- **************************************************************** DrawingArea
+
+{#pointer *GtkDrawingArea as DrawingArea foreign newtype #} deriving (Eq,Ord)
+
+mkDrawingArea = (DrawingArea, objectUnrefFromMainloop)
+unDrawingArea (DrawingArea o) = o
+
+class WidgetClass o => DrawingAreaClass o
+toDrawingArea :: DrawingAreaClass o => o -> DrawingArea
+toDrawingArea = unsafeCastGObject . toGObject
+
+instance DrawingAreaClass DrawingArea
+instance WidgetClass DrawingArea
+instance GObjectClass DrawingArea where
+  toGObject = GObject . castForeignPtr . unDrawingArea
+  unsafeCastGObject = DrawingArea . castForeignPtr . unGObject
+
+castToDrawingArea :: GObjectClass obj => obj -> DrawingArea
+castToDrawingArea = castTo gTypeDrawingArea "DrawingArea"
+
+gTypeDrawingArea :: GType
+gTypeDrawingArea =
+  {# call fun unsafe gtk_drawing_area_get_type #}
+
+-- ******************************************************************** Spinner
+
+{#pointer *GtkSpinner as Spinner foreign newtype #} deriving (Eq,Ord)
+
+mkSpinner = (Spinner, objectUnrefFromMainloop)
+unSpinner (Spinner o) = o
+
+class DrawingAreaClass o => SpinnerClass o
+toSpinner :: SpinnerClass o => o -> Spinner
+toSpinner = unsafeCastGObject . toGObject
+
+instance SpinnerClass Spinner
+instance DrawingAreaClass Spinner
+instance WidgetClass Spinner
+instance GObjectClass Spinner where
+  toGObject = GObject . castForeignPtr . unSpinner
+  unsafeCastGObject = Spinner . castForeignPtr . unGObject
+
+castToSpinner :: GObjectClass obj => obj -> Spinner
+castToSpinner = castTo gTypeSpinner "Spinner"
+
+gTypeSpinner :: GType
+gTypeSpinner =
+  {# call fun unsafe gtk_spinner_get_type #}
+
+-- ********************************************************************** Entry
+
+{#pointer *GtkEntry as Entry foreign newtype #} deriving (Eq,Ord)
+
+mkEntry = (Entry, objectUnrefFromMainloop)
+unEntry (Entry o) = o
+
+class WidgetClass o => EntryClass o
+toEntry :: EntryClass o => o -> Entry
+toEntry = unsafeCastGObject . toGObject
+
+instance EntryClass Entry
+instance WidgetClass Entry
+instance GObjectClass Entry where
+  toGObject = GObject . castForeignPtr . unEntry
+  unsafeCastGObject = Entry . castForeignPtr . unGObject
+
+castToEntry :: GObjectClass obj => obj -> Entry
+castToEntry = castTo gTypeEntry "Entry"
+
+gTypeEntry :: GType
+gTypeEntry =
+  {# call fun unsafe gtk_entry_get_type #}
+
+-- ***************************************************************** SpinButton
+
+{#pointer *GtkSpinButton as SpinButton foreign newtype #} deriving (Eq,Ord)
+
+mkSpinButton = (SpinButton, objectUnrefFromMainloop)
+unSpinButton (SpinButton o) = o
+
+class EntryClass o => SpinButtonClass o
+toSpinButton :: SpinButtonClass o => o -> SpinButton
+toSpinButton = unsafeCastGObject . toGObject
+
+instance SpinButtonClass SpinButton
+instance EntryClass SpinButton
+instance WidgetClass SpinButton
+instance GObjectClass SpinButton where
+  toGObject = GObject . castForeignPtr . unSpinButton
+  unsafeCastGObject = SpinButton . castForeignPtr . unGObject
+
+castToSpinButton :: GObjectClass obj => obj -> SpinButton
+castToSpinButton = castTo gTypeSpinButton "SpinButton"
+
+gTypeSpinButton :: GType
+gTypeSpinButton =
+  {# call fun unsafe gtk_spin_button_get_type #}
+
+-- ********************************************************************** Range
+
+{#pointer *GtkRange as Range foreign newtype #} deriving (Eq,Ord)
+
+mkRange = (Range, objectUnrefFromMainloop)
+unRange (Range o) = o
+
+class WidgetClass o => RangeClass o
+toRange :: RangeClass o => o -> Range
+toRange = unsafeCastGObject . toGObject
+
+instance RangeClass Range
+instance WidgetClass Range
+instance GObjectClass Range where
+  toGObject = GObject . castForeignPtr . unRange
+  unsafeCastGObject = Range . castForeignPtr . unGObject
+
+castToRange :: GObjectClass obj => obj -> Range
+castToRange = castTo gTypeRange "Range"
+
+gTypeRange :: GType
+gTypeRange =
+  {# call fun unsafe gtk_range_get_type #}
+
+-- ********************************************************************** Scale
+
+{#pointer *GtkScale as Scale foreign newtype #} deriving (Eq,Ord)
+
+mkScale = (Scale, objectUnrefFromMainloop)
+unScale (Scale o) = o
+
+class RangeClass o => ScaleClass o
+toScale :: ScaleClass o => o -> Scale
+toScale = unsafeCastGObject . toGObject
+
+instance ScaleClass Scale
+instance RangeClass Scale
+instance WidgetClass Scale
+instance GObjectClass Scale where
+  toGObject = GObject . castForeignPtr . unScale
+  unsafeCastGObject = Scale . castForeignPtr . unGObject
+
+castToScale :: GObjectClass obj => obj -> Scale
+castToScale = castTo gTypeScale "Scale"
+
+gTypeScale :: GType
+gTypeScale =
+  {# call fun unsafe gtk_scale_get_type #}
+
+-- ********************************************************************* HScale
+
+{#pointer *GtkHScale as HScale foreign newtype #} deriving (Eq,Ord)
+
+mkHScale = (HScale, objectUnrefFromMainloop)
+unHScale (HScale o) = o
+
+class ScaleClass o => HScaleClass o
+toHScale :: HScaleClass o => o -> HScale
+toHScale = unsafeCastGObject . toGObject
+
+instance HScaleClass HScale
+instance ScaleClass HScale
+instance RangeClass HScale
+instance WidgetClass HScale
+instance GObjectClass HScale where
+  toGObject = GObject . castForeignPtr . unHScale
+  unsafeCastGObject = HScale . castForeignPtr . unGObject
+
+castToHScale :: GObjectClass obj => obj -> HScale
+castToHScale = castTo gTypeHScale "HScale"
+
+gTypeHScale :: GType
+gTypeHScale =
+  {# call fun unsafe gtk_hscale_get_type #}
+
+-- ********************************************************************* VScale
+
+{#pointer *GtkVScale as VScale foreign newtype #} deriving (Eq,Ord)
+
+mkVScale = (VScale, objectUnrefFromMainloop)
+unVScale (VScale o) = o
+
+class ScaleClass o => VScaleClass o
+toVScale :: VScaleClass o => o -> VScale
+toVScale = unsafeCastGObject . toGObject
+
+instance VScaleClass VScale
+instance ScaleClass VScale
+instance RangeClass VScale
+instance WidgetClass VScale
+instance GObjectClass VScale where
+  toGObject = GObject . castForeignPtr . unVScale
+  unsafeCastGObject = VScale . castForeignPtr . unGObject
+
+castToVScale :: GObjectClass obj => obj -> VScale
+castToVScale = castTo gTypeVScale "VScale"
+
+gTypeVScale :: GType
+gTypeVScale =
+  {# call fun unsafe gtk_vscale_get_type #}
+
+-- ****************************************************************** Scrollbar
+
+{#pointer *GtkScrollbar as Scrollbar foreign newtype #} deriving (Eq,Ord)
+
+mkScrollbar = (Scrollbar, objectUnrefFromMainloop)
+unScrollbar (Scrollbar o) = o
+
+class RangeClass o => ScrollbarClass o
+toScrollbar :: ScrollbarClass o => o -> Scrollbar
+toScrollbar = unsafeCastGObject . toGObject
+
+instance ScrollbarClass Scrollbar
+instance RangeClass Scrollbar
+instance WidgetClass Scrollbar
+instance GObjectClass Scrollbar where
+  toGObject = GObject . castForeignPtr . unScrollbar
+  unsafeCastGObject = Scrollbar . castForeignPtr . unGObject
+
+castToScrollbar :: GObjectClass obj => obj -> Scrollbar
+castToScrollbar = castTo gTypeScrollbar "Scrollbar"
+
+gTypeScrollbar :: GType
+gTypeScrollbar =
+  {# call fun unsafe gtk_scrollbar_get_type #}
+
+-- ***************************************************************** HScrollbar
+
+{#pointer *GtkHScrollbar as HScrollbar foreign newtype #} deriving (Eq,Ord)
+
+mkHScrollbar = (HScrollbar, objectUnrefFromMainloop)
+unHScrollbar (HScrollbar o) = o
+
+class ScrollbarClass o => HScrollbarClass o
+toHScrollbar :: HScrollbarClass o => o -> HScrollbar
+toHScrollbar = unsafeCastGObject . toGObject
+
+instance HScrollbarClass HScrollbar
+instance ScrollbarClass HScrollbar
+instance RangeClass HScrollbar
+instance WidgetClass HScrollbar
+instance GObjectClass HScrollbar where
+  toGObject = GObject . castForeignPtr . unHScrollbar
+  unsafeCastGObject = HScrollbar . castForeignPtr . unGObject
+
+castToHScrollbar :: GObjectClass obj => obj -> HScrollbar
+castToHScrollbar = castTo gTypeHScrollbar "HScrollbar"
+
+gTypeHScrollbar :: GType
+gTypeHScrollbar =
+  {# call fun unsafe gtk_hscrollbar_get_type #}
+
+-- ***************************************************************** VScrollbar
+
+{#pointer *GtkVScrollbar as VScrollbar foreign newtype #} deriving (Eq,Ord)
+
+mkVScrollbar = (VScrollbar, objectUnrefFromMainloop)
+unVScrollbar (VScrollbar o) = o
+
+class ScrollbarClass o => VScrollbarClass o
+toVScrollbar :: VScrollbarClass o => o -> VScrollbar
+toVScrollbar = unsafeCastGObject . toGObject
+
+instance VScrollbarClass VScrollbar
+instance ScrollbarClass VScrollbar
+instance RangeClass VScrollbar
+instance WidgetClass VScrollbar
+instance GObjectClass VScrollbar where
+  toGObject = GObject . castForeignPtr . unVScrollbar
+  unsafeCastGObject = VScrollbar . castForeignPtr . unGObject
+
+castToVScrollbar :: GObjectClass obj => obj -> VScrollbar
+castToVScrollbar = castTo gTypeVScrollbar "VScrollbar"
+
+gTypeVScrollbar :: GType
+gTypeVScrollbar =
+  {# call fun unsafe gtk_vscrollbar_get_type #}
+
+-- ****************************************************************** Separator
+
+{#pointer *GtkSeparator as Separator foreign newtype #} deriving (Eq,Ord)
+
+mkSeparator = (Separator, objectUnrefFromMainloop)
+unSeparator (Separator o) = o
+
+class WidgetClass o => SeparatorClass o
+toSeparator :: SeparatorClass o => o -> Separator
+toSeparator = unsafeCastGObject . toGObject
+
+instance SeparatorClass Separator
+instance WidgetClass Separator
+instance GObjectClass Separator where
+  toGObject = GObject . castForeignPtr . unSeparator
+  unsafeCastGObject = Separator . castForeignPtr . unGObject
+
+castToSeparator :: GObjectClass obj => obj -> Separator
+castToSeparator = castTo gTypeSeparator "Separator"
+
+gTypeSeparator :: GType
+gTypeSeparator =
+  {# call fun unsafe gtk_separator_get_type #}
+
+-- ***************************************************************** HSeparator
+
+{#pointer *GtkHSeparator as HSeparator foreign newtype #} deriving (Eq,Ord)
+
+mkHSeparator = (HSeparator, objectUnrefFromMainloop)
+unHSeparator (HSeparator o) = o
+
+class SeparatorClass o => HSeparatorClass o
+toHSeparator :: HSeparatorClass o => o -> HSeparator
+toHSeparator = unsafeCastGObject . toGObject
+
+instance HSeparatorClass HSeparator
+instance SeparatorClass HSeparator
+instance WidgetClass HSeparator
+instance GObjectClass HSeparator where
+  toGObject = GObject . castForeignPtr . unHSeparator
+  unsafeCastGObject = HSeparator . castForeignPtr . unGObject
+
+castToHSeparator :: GObjectClass obj => obj -> HSeparator
+castToHSeparator = castTo gTypeHSeparator "HSeparator"
+
+gTypeHSeparator :: GType
+gTypeHSeparator =
+  {# call fun unsafe gtk_hseparator_get_type #}
+
+-- ***************************************************************** VSeparator
+
+{#pointer *GtkVSeparator as VSeparator foreign newtype #} deriving (Eq,Ord)
+
+mkVSeparator = (VSeparator, objectUnrefFromMainloop)
+unVSeparator (VSeparator o) = o
+
+class SeparatorClass o => VSeparatorClass o
+toVSeparator :: VSeparatorClass o => o -> VSeparator
+toVSeparator = unsafeCastGObject . toGObject
+
+instance VSeparatorClass VSeparator
+instance SeparatorClass VSeparator
+instance WidgetClass VSeparator
+instance GObjectClass VSeparator where
+  toGObject = GObject . castForeignPtr . unVSeparator
+  unsafeCastGObject = VSeparator . castForeignPtr . unGObject
+
+castToVSeparator :: GObjectClass obj => obj -> VSeparator
+castToVSeparator = castTo gTypeVSeparator "VSeparator"
+
+gTypeVSeparator :: GType
+gTypeVSeparator =
+  {# call fun unsafe gtk_vseparator_get_type #}
+
+-- ****************************************************************** Invisible
+
+{#pointer *GtkInvisible as Invisible foreign newtype #} deriving (Eq,Ord)
+
+mkInvisible = (Invisible, objectUnrefFromMainloop)
+unInvisible (Invisible o) = o
+
+class WidgetClass o => InvisibleClass o
+toInvisible :: InvisibleClass o => o -> Invisible
+toInvisible = unsafeCastGObject . toGObject
+
+instance InvisibleClass Invisible
+instance WidgetClass Invisible
+instance GObjectClass Invisible where
+  toGObject = GObject . castForeignPtr . unInvisible
+  unsafeCastGObject = Invisible . castForeignPtr . unGObject
+
+castToInvisible :: GObjectClass obj => obj -> Invisible
+castToInvisible = castTo gTypeInvisible "Invisible"
+
+gTypeInvisible :: GType
+gTypeInvisible =
+  {# call fun unsafe gtk_invisible_get_type #}
+
+-- **************************************************************** ProgressBar
+
+{#pointer *GtkProgressBar as ProgressBar foreign newtype #} deriving (Eq,Ord)
+
+mkProgressBar = (ProgressBar, objectUnrefFromMainloop)
+unProgressBar (ProgressBar o) = o
+
+class WidgetClass o => ProgressBarClass o
+toProgressBar :: ProgressBarClass o => o -> ProgressBar
+toProgressBar = unsafeCastGObject . toGObject
+
+instance ProgressBarClass ProgressBar
+instance WidgetClass ProgressBar
+instance GObjectClass ProgressBar where
+  toGObject = GObject . castForeignPtr . unProgressBar
+  unsafeCastGObject = ProgressBar . castForeignPtr . unGObject
+
+castToProgressBar :: GObjectClass obj => obj -> ProgressBar
+castToProgressBar = castTo gTypeProgressBar "ProgressBar"
+
+gTypeProgressBar :: GType
+gTypeProgressBar =
+  {# call fun unsafe gtk_progress_bar_get_type #}
+
+-- ***************************************************************** Adjustment
+
+{#pointer *GtkAdjustment as Adjustment foreign newtype #} deriving (Eq,Ord)
+
+mkAdjustment = (Adjustment, objectUnrefFromMainloop)
+unAdjustment (Adjustment o) = o
+
+class GObjectClass o => AdjustmentClass o
+toAdjustment :: AdjustmentClass o => o -> Adjustment
+toAdjustment = unsafeCastGObject . toGObject
+
+instance AdjustmentClass Adjustment
+instance GObjectClass Adjustment where
+  toGObject = GObject . castForeignPtr . unAdjustment
+  unsafeCastGObject = Adjustment . castForeignPtr . unGObject
+
+castToAdjustment :: GObjectClass obj => obj -> Adjustment
+castToAdjustment = castTo gTypeAdjustment "Adjustment"
+
+gTypeAdjustment :: GType
+gTypeAdjustment =
+  {# call fun unsafe gtk_adjustment_get_type #}
+
+-- ****************************************************************** IMContext
+
+{#pointer *GtkIMContext as IMContext foreign newtype #} deriving (Eq,Ord)
+
+mkIMContext = (IMContext, objectUnrefFromMainloop)
+unIMContext (IMContext o) = o
+
+class GObjectClass o => IMContextClass o
+toIMContext :: IMContextClass o => o -> IMContext
+toIMContext = unsafeCastGObject . toGObject
+
+instance IMContextClass IMContext
+instance GObjectClass IMContext where
+  toGObject = GObject . castForeignPtr . unIMContext
+  unsafeCastGObject = IMContext . castForeignPtr . unGObject
+
+castToIMContext :: GObjectClass obj => obj -> IMContext
+castToIMContext = castTo gTypeIMContext "IMContext"
+
+gTypeIMContext :: GType
+gTypeIMContext =
+  {# call fun unsafe gtk_im_context_get_type #}
+
+-- ************************************************************* IMMulticontext
+
+{#pointer *GtkIMMulticontext as IMMulticontext foreign newtype #} deriving (Eq,Ord)
+
+mkIMMulticontext = (IMMulticontext, objectUnrefFromMainloop)
+unIMMulticontext (IMMulticontext o) = o
+
+class IMContextClass o => IMMulticontextClass o
+toIMMulticontext :: IMMulticontextClass o => o -> IMMulticontext
+toIMMulticontext = unsafeCastGObject . toGObject
+
+instance IMMulticontextClass IMMulticontext
+instance IMContextClass IMMulticontext
+instance GObjectClass IMMulticontext where
+  toGObject = GObject . castForeignPtr . unIMMulticontext
+  unsafeCastGObject = IMMulticontext . castForeignPtr . unGObject
+
+castToIMMulticontext :: GObjectClass obj => obj -> IMMulticontext
+castToIMMulticontext = castTo gTypeIMMulticontext "IMMulticontext"
+
+gTypeIMMulticontext :: GType
+gTypeIMMulticontext =
+  {# call fun unsafe gtk_im_multicontext_get_type #}
+
+-- ************************************************************ IMContextSimple
+
+{#pointer *GtkIMContextSimple as IMContextSimple foreign newtype #} deriving (Eq,Ord)
+
+mkIMContextSimple = (IMContextSimple, objectUnrefFromMainloop)
+unIMContextSimple (IMContextSimple o) = o
+
+class IMContextClass o => IMContextSimpleClass o
+toIMContextSimple :: IMContextSimpleClass o => o -> IMContextSimple
+toIMContextSimple = unsafeCastGObject . toGObject
+
+instance IMContextSimpleClass IMContextSimple
+instance IMContextClass IMContextSimple
+instance GObjectClass IMContextSimple where
+  toGObject = GObject . castForeignPtr . unIMContextSimple
+  unsafeCastGObject = IMContextSimple . castForeignPtr . unGObject
+
+castToIMContextSimple :: GObjectClass obj => obj -> IMContextSimple
+castToIMContextSimple = castTo gTypeIMContextSimple "IMContextSimple"
+
+gTypeIMContextSimple :: GType
+gTypeIMContextSimple =
+  {# call fun unsafe gtk_im_context_simple_get_type #}
+
+-- ************************************************************* TreeViewColumn
+
+{#pointer *GtkTreeViewColumn as TreeViewColumn foreign newtype #} deriving (Eq,Ord)
+
+mkTreeViewColumn = (TreeViewColumn, objectUnrefFromMainloop)
+unTreeViewColumn (TreeViewColumn o) = o
+
+class GObjectClass o => TreeViewColumnClass o
+toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn
+toTreeViewColumn = unsafeCastGObject . toGObject
+
+instance TreeViewColumnClass TreeViewColumn
+instance GObjectClass TreeViewColumn where
+  toGObject = GObject . castForeignPtr . unTreeViewColumn
+  unsafeCastGObject = TreeViewColumn . castForeignPtr . unGObject
+
+castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn
+castToTreeViewColumn = castTo gTypeTreeViewColumn "TreeViewColumn"
+
+gTypeTreeViewColumn :: GType
+gTypeTreeViewColumn =
+  {# call fun unsafe gtk_tree_view_column_get_type #}
+
+-- *************************************************************** CellRenderer
+
+{#pointer *GtkCellRenderer as CellRenderer foreign newtype #} deriving (Eq,Ord)
+
+mkCellRenderer = (CellRenderer, objectUnrefFromMainloop)
+unCellRenderer (CellRenderer o) = o
+
+class GObjectClass o => CellRendererClass o
+toCellRenderer :: CellRendererClass o => o -> CellRenderer
+toCellRenderer = unsafeCastGObject . toGObject
+
+instance CellRendererClass CellRenderer
+instance GObjectClass CellRenderer where
+  toGObject = GObject . castForeignPtr . unCellRenderer
+  unsafeCastGObject = CellRenderer . castForeignPtr . unGObject
+
+castToCellRenderer :: GObjectClass obj => obj -> CellRenderer
+castToCellRenderer = castTo gTypeCellRenderer "CellRenderer"
+
+gTypeCellRenderer :: GType
+gTypeCellRenderer =
+  {# call fun unsafe gtk_cell_renderer_get_type #}
+
+-- ******************************************************** CellRendererSpinner
+
+{#pointer *GtkCellRendererSpinner as CellRendererSpinner foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererSpinner = (CellRendererSpinner, objectUnrefFromMainloop)
+unCellRendererSpinner (CellRendererSpinner o) = o
+
+class CellRendererClass o => CellRendererSpinnerClass o
+toCellRendererSpinner :: CellRendererSpinnerClass o => o -> CellRendererSpinner
+toCellRendererSpinner = unsafeCastGObject . toGObject
+
+instance CellRendererSpinnerClass CellRendererSpinner
+instance CellRendererClass CellRendererSpinner
+instance GObjectClass CellRendererSpinner where
+  toGObject = GObject . castForeignPtr . unCellRendererSpinner
+  unsafeCastGObject = CellRendererSpinner . castForeignPtr . unGObject
+
+castToCellRendererSpinner :: GObjectClass obj => obj -> CellRendererSpinner
+castToCellRendererSpinner = castTo gTypeCellRendererSpinner "CellRendererSpinner"
+
+gTypeCellRendererSpinner :: GType
+gTypeCellRendererSpinner =
+  {# call fun unsafe gtk_cell_renderer_spinner_get_type #}
+
+-- ********************************************************* CellRendererPixbuf
+
+{#pointer *GtkCellRendererPixbuf as CellRendererPixbuf foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererPixbuf = (CellRendererPixbuf, objectUnrefFromMainloop)
+unCellRendererPixbuf (CellRendererPixbuf o) = o
+
+class CellRendererClass o => CellRendererPixbufClass o
+toCellRendererPixbuf :: CellRendererPixbufClass o => o -> CellRendererPixbuf
+toCellRendererPixbuf = unsafeCastGObject . toGObject
+
+instance CellRendererPixbufClass CellRendererPixbuf
+instance CellRendererClass CellRendererPixbuf
+instance GObjectClass CellRendererPixbuf where
+  toGObject = GObject . castForeignPtr . unCellRendererPixbuf
+  unsafeCastGObject = CellRendererPixbuf . castForeignPtr . unGObject
+
+castToCellRendererPixbuf :: GObjectClass obj => obj -> CellRendererPixbuf
+castToCellRendererPixbuf = castTo gTypeCellRendererPixbuf "CellRendererPixbuf"
+
+gTypeCellRendererPixbuf :: GType
+gTypeCellRendererPixbuf =
+  {# call fun unsafe gtk_cell_renderer_pixbuf_get_type #}
+
+-- *********************************************************** CellRendererText
+
+{#pointer *GtkCellRendererText as CellRendererText foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererText = (CellRendererText, objectUnrefFromMainloop)
+unCellRendererText (CellRendererText o) = o
+
+class CellRendererClass o => CellRendererTextClass o
+toCellRendererText :: CellRendererTextClass o => o -> CellRendererText
+toCellRendererText = unsafeCastGObject . toGObject
+
+instance CellRendererTextClass CellRendererText
+instance CellRendererClass CellRendererText
+instance GObjectClass CellRendererText where
+  toGObject = GObject . castForeignPtr . unCellRendererText
+  unsafeCastGObject = CellRendererText . castForeignPtr . unGObject
+
+castToCellRendererText :: GObjectClass obj => obj -> CellRendererText
+castToCellRendererText = castTo gTypeCellRendererText "CellRendererText"
+
+gTypeCellRendererText :: GType
+gTypeCellRendererText =
+  {# call fun unsafe gtk_cell_renderer_text_get_type #}
+
+-- ********************************************************** CellRendererAccel
+
+{#pointer *GtkCellRendererAccel as CellRendererAccel foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererAccel = (CellRendererAccel, objectUnrefFromMainloop)
+unCellRendererAccel (CellRendererAccel o) = o
+
+class CellRendererTextClass o => CellRendererAccelClass o
+toCellRendererAccel :: CellRendererAccelClass o => o -> CellRendererAccel
+toCellRendererAccel = unsafeCastGObject . toGObject
+
+instance CellRendererAccelClass CellRendererAccel
+instance CellRendererTextClass CellRendererAccel
+instance CellRendererClass CellRendererAccel
+instance GObjectClass CellRendererAccel where
+  toGObject = GObject . castForeignPtr . unCellRendererAccel
+  unsafeCastGObject = CellRendererAccel . castForeignPtr . unGObject
+
+castToCellRendererAccel :: GObjectClass obj => obj -> CellRendererAccel
+castToCellRendererAccel = castTo gTypeCellRendererAccel "CellRendererAccel"
+
+gTypeCellRendererAccel :: GType
+gTypeCellRendererAccel =
+  {# call fun unsafe gtk_cell_renderer_accel_get_type #}
+
+-- *********************************************************** CellRendererSpin
+
+{#pointer *GtkCellRendererSpin as CellRendererSpin foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererSpin = (CellRendererSpin, objectUnrefFromMainloop)
+unCellRendererSpin (CellRendererSpin o) = o
+
+class CellRendererTextClass o => CellRendererSpinClass o
+toCellRendererSpin :: CellRendererSpinClass o => o -> CellRendererSpin
+toCellRendererSpin = unsafeCastGObject . toGObject
+
+instance CellRendererSpinClass CellRendererSpin
+instance CellRendererTextClass CellRendererSpin
+instance CellRendererClass CellRendererSpin
+instance GObjectClass CellRendererSpin where
+  toGObject = GObject . castForeignPtr . unCellRendererSpin
+  unsafeCastGObject = CellRendererSpin . castForeignPtr . unGObject
+
+castToCellRendererSpin :: GObjectClass obj => obj -> CellRendererSpin
+castToCellRendererSpin = castTo gTypeCellRendererSpin "CellRendererSpin"
+
+gTypeCellRendererSpin :: GType
+gTypeCellRendererSpin =
+  {# call fun unsafe gtk_cell_renderer_spin_get_type #}
+
+-- ********************************************************** CellRendererCombo
+
+{#pointer *GtkCellRendererCombo as CellRendererCombo foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererCombo = (CellRendererCombo, objectUnrefFromMainloop)
+unCellRendererCombo (CellRendererCombo o) = o
+
+class CellRendererTextClass o => CellRendererComboClass o
+toCellRendererCombo :: CellRendererComboClass o => o -> CellRendererCombo
+toCellRendererCombo = unsafeCastGObject . toGObject
+
+instance CellRendererComboClass CellRendererCombo
+instance CellRendererTextClass CellRendererCombo
+instance CellRendererClass CellRendererCombo
+instance GObjectClass CellRendererCombo where
+  toGObject = GObject . castForeignPtr . unCellRendererCombo
+  unsafeCastGObject = CellRendererCombo . castForeignPtr . unGObject
+
+castToCellRendererCombo :: GObjectClass obj => obj -> CellRendererCombo
+castToCellRendererCombo = castTo gTypeCellRendererCombo "CellRendererCombo"
+
+gTypeCellRendererCombo :: GType
+gTypeCellRendererCombo =
+  {# call fun unsafe gtk_cell_renderer_combo_get_type #}
+
+-- ********************************************************* CellRendererToggle
+
+{#pointer *GtkCellRendererToggle as CellRendererToggle foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererToggle = (CellRendererToggle, objectUnrefFromMainloop)
+unCellRendererToggle (CellRendererToggle o) = o
+
+class CellRendererClass o => CellRendererToggleClass o
+toCellRendererToggle :: CellRendererToggleClass o => o -> CellRendererToggle
+toCellRendererToggle = unsafeCastGObject . toGObject
+
+instance CellRendererToggleClass CellRendererToggle
+instance CellRendererClass CellRendererToggle
+instance GObjectClass CellRendererToggle where
+  toGObject = GObject . castForeignPtr . unCellRendererToggle
+  unsafeCastGObject = CellRendererToggle . castForeignPtr . unGObject
+
+castToCellRendererToggle :: GObjectClass obj => obj -> CellRendererToggle
+castToCellRendererToggle = castTo gTypeCellRendererToggle "CellRendererToggle"
+
+gTypeCellRendererToggle :: GType
+gTypeCellRendererToggle =
+  {# call fun unsafe gtk_cell_renderer_toggle_get_type #}
+
+-- ******************************************************* CellRendererProgress
+
+{#pointer *GtkCellRendererProgress as CellRendererProgress foreign newtype #} deriving (Eq,Ord)
+
+mkCellRendererProgress = (CellRendererProgress, objectUnrefFromMainloop)
+unCellRendererProgress (CellRendererProgress o) = o
+
+class CellRendererClass o => CellRendererProgressClass o
+toCellRendererProgress :: CellRendererProgressClass o => o -> CellRendererProgress
+toCellRendererProgress = unsafeCastGObject . toGObject
+
+instance CellRendererProgressClass CellRendererProgress
+instance CellRendererClass CellRendererProgress
+instance GObjectClass CellRendererProgress where
+  toGObject = GObject . castForeignPtr . unCellRendererProgress
+  unsafeCastGObject = CellRendererProgress . castForeignPtr . unGObject
+
+castToCellRendererProgress :: GObjectClass obj => obj -> CellRendererProgress
+castToCellRendererProgress = castTo gTypeCellRendererProgress "CellRendererProgress"
+
+gTypeCellRendererProgress :: GType
+gTypeCellRendererProgress =
+  {# call fun unsafe gtk_cell_renderer_progress_get_type #}
+
+-- ***************************************************************** FileFilter
+
+{#pointer *GtkFileFilter as FileFilter foreign newtype #} deriving (Eq,Ord)
+
+mkFileFilter = (FileFilter, objectUnrefFromMainloop)
+unFileFilter (FileFilter o) = o
+
+class GObjectClass o => FileFilterClass o
+toFileFilter :: FileFilterClass o => o -> FileFilter
+toFileFilter = unsafeCastGObject . toGObject
+
+instance FileFilterClass FileFilter
+instance GObjectClass FileFilter where
+  toGObject = GObject . castForeignPtr . unFileFilter
+  unsafeCastGObject = FileFilter . castForeignPtr . unGObject
+
+castToFileFilter :: GObjectClass obj => obj -> FileFilter
+castToFileFilter = castTo gTypeFileFilter "FileFilter"
+
+gTypeFileFilter :: GType
+gTypeFileFilter =
+  {# call fun unsafe gtk_file_filter_get_type #}
+
+-- ******************************************************************** Builder
+
+{#pointer *GtkBuilder as Builder foreign newtype #} deriving (Eq,Ord)
+
+mkBuilder = (Builder, objectUnrefFromMainloop)
+unBuilder (Builder o) = o
+
+class GObjectClass o => BuilderClass o
+toBuilder :: BuilderClass o => o -> Builder
+toBuilder = unsafeCastGObject . toGObject
+
+instance BuilderClass Builder
+instance GObjectClass Builder where
+  toGObject = GObject . castForeignPtr . unBuilder
+  unsafeCastGObject = Builder . castForeignPtr . unGObject
+
+castToBuilder :: GObjectClass obj => obj -> Builder
+castToBuilder = castTo gTypeBuilder "Builder"
+
+gTypeBuilder :: GType
+gTypeBuilder =
+  {# call fun unsafe gtk_builder_get_type #}
+
+-- *************************************************************** StyleContext
+
+{#pointer *GtkStyleContext as StyleContext foreign newtype #} deriving (Eq,Ord)
+
+mkStyleContext = (StyleContext, objectUnrefFromMainloop)
+unStyleContext (StyleContext o) = o
+
+class GObjectClass o => StyleContextClass o
+toStyleContext :: StyleContextClass o => o -> StyleContext
+toStyleContext = unsafeCastGObject . toGObject
+
+instance StyleContextClass StyleContext
+instance GObjectClass StyleContext where
+  toGObject = GObject . castForeignPtr . unStyleContext
+  unsafeCastGObject = StyleContext . castForeignPtr . unGObject
+
+castToStyleContext :: GObjectClass obj => obj -> StyleContext
+castToStyleContext = castTo gTypeStyleContext "StyleContext"
+
+gTypeStyleContext :: GType
+gTypeStyleContext =
+  {# call fun unsafe gtk_style_context_get_type #}
+
+-- ************************************************************** StyleProvider
+
+{#pointer *GtkStyleProvider as StyleProvider foreign newtype #} deriving (Eq,Ord)
+
+mkStyleProvider = (StyleProvider, objectUnrefFromMainloop)
+unStyleProvider (StyleProvider o) = o
+
+class GObjectClass o => StyleProviderClass o
+toStyleProvider :: StyleProviderClass o => o -> StyleProvider
+toStyleProvider = unsafeCastGObject . toGObject
+
+instance StyleProviderClass StyleProvider
+instance GObjectClass StyleProvider where
+  toGObject = GObject . castForeignPtr . unStyleProvider
+  unsafeCastGObject = StyleProvider . castForeignPtr . unGObject
+
+castToStyleProvider :: GObjectClass obj => obj -> StyleProvider
+castToStyleProvider = castTo gTypeStyleProvider "StyleProvider"
+
+gTypeStyleProvider :: GType
+gTypeStyleProvider =
+  {# call fun unsafe gtk_style_provider_get_type #}
+
+-- **************************************************************** CssProvider
+
+{#pointer *GtkCssProvider as CssProvider foreign newtype #} deriving (Eq,Ord)
+
+mkCssProvider = (CssProvider, objectUnrefFromMainloop)
+unCssProvider (CssProvider o) = o
+
+class GObjectClass o => CssProviderClass o
+toCssProvider :: CssProviderClass o => o -> CssProvider
+toCssProvider = unsafeCastGObject . toGObject
+
+instance CssProviderClass CssProvider
+instance GObjectClass CssProvider where
+  toGObject = GObject . castForeignPtr . unCssProvider
+  unsafeCastGObject = CssProvider . castForeignPtr . unGObject
+
+castToCssProvider :: GObjectClass obj => obj -> CssProvider
+castToCssProvider = castTo gTypeCssProvider "CssProvider"
+
+gTypeCssProvider :: GType
+gTypeCssProvider =
+  {# call fun unsafe gtk_css_provider_get_type #}
+
+-- ***************************************************************** CellLayout
+
+{#pointer *GtkCellLayout as CellLayout foreign newtype #} deriving (Eq,Ord)
+
+mkCellLayout = (CellLayout, objectUnrefFromMainloop)
+unCellLayout (CellLayout o) = o
+
+class GObjectClass o => CellLayoutClass o
+toCellLayout :: CellLayoutClass o => o -> CellLayout
+toCellLayout = unsafeCastGObject . toGObject
+
+instance CellLayoutClass CellLayout
+instance GObjectClass CellLayout where
+  toGObject = GObject . castForeignPtr . unCellLayout
+  unsafeCastGObject = CellLayout . castForeignPtr . unGObject
+
+castToCellLayout :: GObjectClass obj => obj -> CellLayout
+castToCellLayout = castTo gTypeCellLayout "CellLayout"
+
+gTypeCellLayout :: GType
+gTypeCellLayout =
+  {# call fun unsafe gtk_cell_layout_get_type #}
+
+-- *************************************************************** TreeSortable
+
+{#pointer *GtkTreeSortable as TreeSortable foreign newtype #} deriving (Eq,Ord)
+
+mkTreeSortable = (TreeSortable, objectUnrefFromMainloop)
+unTreeSortable (TreeSortable o) = o
+
+class GObjectClass o => TreeSortableClass o
+toTreeSortable :: TreeSortableClass o => o -> TreeSortable
+toTreeSortable = unsafeCastGObject . toGObject
+
+instance TreeSortableClass TreeSortable
+instance GObjectClass TreeSortable where
+  toGObject = GObject . castForeignPtr . unTreeSortable
+  unsafeCastGObject = TreeSortable . castForeignPtr . unGObject
+
+castToTreeSortable :: GObjectClass obj => obj -> TreeSortable
+castToTreeSortable = castTo gTypeTreeSortable "TreeSortable"
+
+gTypeTreeSortable :: GType
+gTypeTreeSortable =
+  {# call fun unsafe gtk_tree_sortable_get_type #}
+
+-- ******************************************************************** Tooltip
+
+{#pointer *GtkTooltip as Tooltip foreign newtype #} deriving (Eq,Ord)
+
+mkTooltip = (Tooltip, objectUnrefFromMainloop)
+unTooltip (Tooltip o) = o
+
+class GObjectClass o => TooltipClass o
+toTooltip :: TooltipClass o => o -> Tooltip
+toTooltip = unsafeCastGObject . toGObject
+
+instance TooltipClass Tooltip
+instance GObjectClass Tooltip where
+  toGObject = GObject . castForeignPtr . unTooltip
+  unsafeCastGObject = Tooltip . castForeignPtr . unGObject
+
+castToTooltip :: GObjectClass obj => obj -> Tooltip
+castToTooltip = castTo gTypeTooltip "Tooltip"
+
+gTypeTooltip :: GType
+gTypeTooltip =
+  {# call fun unsafe gtk_tooltip_get_type #}
+
+-- ***************************************************************** StatusIcon
+
+{#pointer *GtkStatusIcon as StatusIcon foreign newtype #} deriving (Eq,Ord)
+
+mkStatusIcon = (StatusIcon, objectUnrefFromMainloop)
+unStatusIcon (StatusIcon o) = o
+
+class TooltipClass o => StatusIconClass o
+toStatusIcon :: StatusIconClass o => o -> StatusIcon
+toStatusIcon = unsafeCastGObject . toGObject
+
+instance StatusIconClass StatusIcon
+instance TooltipClass StatusIcon
+instance GObjectClass StatusIcon where
+  toGObject = GObject . castForeignPtr . unStatusIcon
+  unsafeCastGObject = StatusIcon . castForeignPtr . unGObject
+
+castToStatusIcon :: GObjectClass obj => obj -> StatusIcon
+castToStatusIcon = castTo gTypeStatusIcon "StatusIcon"
+
+gTypeStatusIcon :: GType
+gTypeStatusIcon =
+  {# call fun unsafe gtk_status_icon_get_type #}
+
+-- ************************************************************** TreeSelection
+
+{#pointer *GtkTreeSelection as TreeSelection foreign newtype #} deriving (Eq,Ord)
+
+mkTreeSelection = (TreeSelection, objectUnrefFromMainloop)
+unTreeSelection (TreeSelection o) = o
+
+class GObjectClass o => TreeSelectionClass o
+toTreeSelection :: TreeSelectionClass o => o -> TreeSelection
+toTreeSelection = unsafeCastGObject . toGObject
+
+instance TreeSelectionClass TreeSelection
+instance GObjectClass TreeSelection where
+  toGObject = GObject . castForeignPtr . unTreeSelection
+  unsafeCastGObject = TreeSelection . castForeignPtr . unGObject
+
+castToTreeSelection :: GObjectClass obj => obj -> TreeSelection
+castToTreeSelection = castTo gTypeTreeSelection "TreeSelection"
+
+gTypeTreeSelection :: GType
+gTypeTreeSelection =
+  {# call fun unsafe gtk_tree_selection_get_type #}
+
+-- ****************************************************************** TreeModel
+
+{#pointer *GtkTreeModel as TreeModel foreign newtype #} deriving (Eq,Ord)
+
+mkTreeModel = (TreeModel, objectUnrefFromMainloop)
+unTreeModel (TreeModel o) = o
+
+class GObjectClass o => TreeModelClass o
+toTreeModel :: TreeModelClass o => o -> TreeModel
+toTreeModel = unsafeCastGObject . toGObject
+
+instance TreeModelClass TreeModel
+instance GObjectClass TreeModel where
+  toGObject = GObject . castForeignPtr . unTreeModel
+  unsafeCastGObject = TreeModel . castForeignPtr . unGObject
+
+castToTreeModel :: GObjectClass obj => obj -> TreeModel
+castToTreeModel = castTo gTypeTreeModel "TreeModel"
+
+gTypeTreeModel :: GType
+gTypeTreeModel =
+  {# call fun unsafe gtk_tree_model_get_type #}
+
+-- ****************************************************************** TreeStore
+
+{#pointer *GtkTreeStore as TreeStore foreign newtype #} deriving (Eq,Ord)
+
+mkTreeStore = (TreeStore, objectUnrefFromMainloop)
+unTreeStore (TreeStore o) = o
+
+class TreeModelClass o => TreeStoreClass o
+toTreeStore :: TreeStoreClass o => o -> TreeStore
+toTreeStore = unsafeCastGObject . toGObject
+
+instance TreeStoreClass TreeStore
+instance TreeModelClass TreeStore
+instance GObjectClass TreeStore where
+  toGObject = GObject . castForeignPtr . unTreeStore
+  unsafeCastGObject = TreeStore . castForeignPtr . unGObject
+
+castToTreeStore :: GObjectClass obj => obj -> TreeStore
+castToTreeStore = castTo gTypeTreeStore "TreeStore"
+
+gTypeTreeStore :: GType
+gTypeTreeStore =
+  {# call fun unsafe gtk_tree_store_get_type #}
+
+-- ****************************************************************** ListStore
+
+{#pointer *GtkListStore as ListStore foreign newtype #} deriving (Eq,Ord)
+
+mkListStore = (ListStore, objectUnrefFromMainloop)
+unListStore (ListStore o) = o
+
+class TreeModelClass o => ListStoreClass o
+toListStore :: ListStoreClass o => o -> ListStore
+toListStore = unsafeCastGObject . toGObject
+
+instance ListStoreClass ListStore
+instance TreeModelClass ListStore
+instance GObjectClass ListStore where
+  toGObject = GObject . castForeignPtr . unListStore
+  unsafeCastGObject = ListStore . castForeignPtr . unGObject
+
+castToListStore :: GObjectClass obj => obj -> ListStore
+castToListStore = castTo gTypeListStore "ListStore"
+
+gTypeListStore :: GType
+gTypeListStore =
+  {# call fun unsafe gtk_list_store_get_type #}
+
+-- ************************************************************** TreeModelSort
+
+{#pointer *GtkTreeModelSort as TreeModelSort foreign newtype #} deriving (Eq,Ord)
+
+mkTreeModelSort = (TreeModelSort, objectUnrefFromMainloop)
+unTreeModelSort (TreeModelSort o) = o
+
+class GObjectClass o => TreeModelSortClass o
+toTreeModelSort :: TreeModelSortClass o => o -> TreeModelSort
+toTreeModelSort = unsafeCastGObject . toGObject
+
+instance TreeModelSortClass TreeModelSort
+instance GObjectClass TreeModelSort where
+  toGObject = GObject . castForeignPtr . unTreeModelSort
+  unsafeCastGObject = TreeModelSort . castForeignPtr . unGObject
+
+castToTreeModelSort :: GObjectClass obj => obj -> TreeModelSort
+castToTreeModelSort = castTo gTypeTreeModelSort "TreeModelSort"
+
+gTypeTreeModelSort :: GType
+gTypeTreeModelSort =
+  {# call fun unsafe gtk_tree_model_sort_get_type #}
+
+-- ************************************************************ TreeModelFilter
+
+{#pointer *GtkTreeModelFilter as TreeModelFilter foreign newtype #} deriving (Eq,Ord)
+
+mkTreeModelFilter = (TreeModelFilter, objectUnrefFromMainloop)
+unTreeModelFilter (TreeModelFilter o) = o
+
+class GObjectClass o => TreeModelFilterClass o
+toTreeModelFilter :: TreeModelFilterClass o => o -> TreeModelFilter
+toTreeModelFilter = unsafeCastGObject . toGObject
+
+instance TreeModelFilterClass TreeModelFilter
+instance GObjectClass TreeModelFilter where
+  toGObject = GObject . castForeignPtr . unTreeModelFilter
+  unsafeCastGObject = TreeModelFilter . castForeignPtr . unGObject
+
+castToTreeModelFilter :: GObjectClass obj => obj -> TreeModelFilter
+castToTreeModelFilter = castTo gTypeTreeModelFilter "TreeModelFilter"
+
+gTypeTreeModelFilter :: GType
+gTypeTreeModelFilter =
+  {# call fun unsafe gtk_tree_model_filter_get_type #}
+
+-- **************************************************************** IconFactory
+
+{#pointer *GtkIconFactory as IconFactory foreign newtype #} deriving (Eq,Ord)
+
+mkIconFactory = (IconFactory, objectUnrefFromMainloop)
+unIconFactory (IconFactory o) = o
+
+class GObjectClass o => IconFactoryClass o
+toIconFactory :: IconFactoryClass o => o -> IconFactory
+toIconFactory = unsafeCastGObject . toGObject
+
+instance IconFactoryClass IconFactory
+instance GObjectClass IconFactory where
+  toGObject = GObject . castForeignPtr . unIconFactory
+  unsafeCastGObject = IconFactory . castForeignPtr . unGObject
+
+castToIconFactory :: GObjectClass obj => obj -> IconFactory
+castToIconFactory = castTo gTypeIconFactory "IconFactory"
+
+gTypeIconFactory :: GType
+gTypeIconFactory =
+  {# call fun unsafe gtk_icon_factory_get_type #}
+
+-- ****************************************************************** IconTheme
+
+{#pointer *GtkIconTheme as IconTheme foreign newtype #} deriving (Eq,Ord)
+
+mkIconTheme = (IconTheme, objectUnrefFromMainloop)
+unIconTheme (IconTheme o) = o
+
+class GObjectClass o => IconThemeClass o
+toIconTheme :: IconThemeClass o => o -> IconTheme
+toIconTheme = unsafeCastGObject . toGObject
+
+instance IconThemeClass IconTheme
+instance GObjectClass IconTheme where
+  toGObject = GObject . castForeignPtr . unIconTheme
+  unsafeCastGObject = IconTheme . castForeignPtr . unGObject
+
+castToIconTheme :: GObjectClass obj => obj -> IconTheme
+castToIconTheme = castTo gTypeIconTheme "IconTheme"
+
+gTypeIconTheme :: GType
+gTypeIconTheme =
+  {# call fun unsafe gtk_icon_theme_get_type #}
+
+-- ****************************************************************** SizeGroup
+
+{#pointer *GtkSizeGroup as SizeGroup foreign newtype #} deriving (Eq,Ord)
+
+mkSizeGroup = (SizeGroup, objectUnrefFromMainloop)
+unSizeGroup (SizeGroup o) = o
+
+class GObjectClass o => SizeGroupClass o
+toSizeGroup :: SizeGroupClass o => o -> SizeGroup
+toSizeGroup = unsafeCastGObject . toGObject
+
+instance SizeGroupClass SizeGroup
+instance GObjectClass SizeGroup where
+  toGObject = GObject . castForeignPtr . unSizeGroup
+  unsafeCastGObject = SizeGroup . castForeignPtr . unGObject
+
+castToSizeGroup :: GObjectClass obj => obj -> SizeGroup
+castToSizeGroup = castTo gTypeSizeGroup "SizeGroup"
+
+gTypeSizeGroup :: GType
+gTypeSizeGroup =
+  {# call fun unsafe gtk_size_group_get_type #}
+
+-- ****************************************************************** Clipboard
+
+{#pointer *GtkClipboard as Clipboard foreign newtype #} deriving (Eq,Ord)
+
+mkClipboard = (Clipboard, objectUnrefFromMainloop)
+unClipboard (Clipboard o) = o
+
+class GObjectClass o => ClipboardClass o
+toClipboard :: ClipboardClass o => o -> Clipboard
+toClipboard = unsafeCastGObject . toGObject
+
+instance ClipboardClass Clipboard
+instance GObjectClass Clipboard where
+  toGObject = GObject . castForeignPtr . unClipboard
+  unsafeCastGObject = Clipboard . castForeignPtr . unGObject
+
+castToClipboard :: GObjectClass obj => obj -> Clipboard
+castToClipboard = castTo gTypeClipboard "Clipboard"
+
+gTypeClipboard :: GType
+gTypeClipboard =
+  {# call fun unsafe gtk_clipboard_get_type #}
+
+-- ***************************************************************** AccelGroup
+
+{#pointer *GtkAccelGroup as AccelGroup foreign newtype #} deriving (Eq,Ord)
+
+mkAccelGroup = (AccelGroup, objectUnrefFromMainloop)
+unAccelGroup (AccelGroup o) = o
+
+class GObjectClass o => AccelGroupClass o
+toAccelGroup :: AccelGroupClass o => o -> AccelGroup
+toAccelGroup = unsafeCastGObject . toGObject
+
+instance AccelGroupClass AccelGroup
+instance GObjectClass AccelGroup where
+  toGObject = GObject . castForeignPtr . unAccelGroup
+  unsafeCastGObject = AccelGroup . castForeignPtr . unGObject
+
+castToAccelGroup :: GObjectClass obj => obj -> AccelGroup
+castToAccelGroup = castTo gTypeAccelGroup "AccelGroup"
+
+gTypeAccelGroup :: GType
+gTypeAccelGroup =
+  {# call fun unsafe gtk_accel_group_get_type #}
+
+-- ******************************************************************* AccelMap
+
+{#pointer *GtkAccelMap as AccelMap foreign newtype #} deriving (Eq,Ord)
+
+mkAccelMap = (AccelMap, objectUnrefFromMainloop)
+unAccelMap (AccelMap o) = o
+
+class GObjectClass o => AccelMapClass o
+toAccelMap :: AccelMapClass o => o -> AccelMap
+toAccelMap = unsafeCastGObject . toGObject
+
+instance AccelMapClass AccelMap
+instance GObjectClass AccelMap where
+  toGObject = GObject . castForeignPtr . unAccelMap
+  unsafeCastGObject = AccelMap . castForeignPtr . unGObject
+
+castToAccelMap :: GObjectClass obj => obj -> AccelMap
+castToAccelMap = castTo gTypeAccelMap "AccelMap"
+
+gTypeAccelMap :: GType
+gTypeAccelMap =
+  {# call fun unsafe gtk_accel_map_get_type #}
+
+-- ************************************************************ EntryCompletion
+
+{#pointer *GtkEntryCompletion as EntryCompletion foreign newtype #} deriving (Eq,Ord)
+
+mkEntryCompletion = (EntryCompletion, objectUnrefFromMainloop)
+unEntryCompletion (EntryCompletion o) = o
+
+class GObjectClass o => EntryCompletionClass o
+toEntryCompletion :: EntryCompletionClass o => o -> EntryCompletion
+toEntryCompletion = unsafeCastGObject . toGObject
+
+instance EntryCompletionClass EntryCompletion
+instance GObjectClass EntryCompletion where
+  toGObject = GObject . castForeignPtr . unEntryCompletion
+  unsafeCastGObject = EntryCompletion . castForeignPtr . unGObject
+
+castToEntryCompletion :: GObjectClass obj => obj -> EntryCompletion
+castToEntryCompletion = castTo gTypeEntryCompletion "EntryCompletion"
+
+gTypeEntryCompletion :: GType
+gTypeEntryCompletion =
+  {# call fun unsafe gtk_entry_completion_get_type #}
+
+-- **************************************************************** EntryBuffer
+
+{#pointer *GtkEntryBuffer as EntryBuffer foreign newtype #} deriving (Eq,Ord)
+
+mkEntryBuffer = (EntryBuffer, objectUnrefFromMainloop)
+unEntryBuffer (EntryBuffer o) = o
+
+class GObjectClass o => EntryBufferClass o
+toEntryBuffer :: EntryBufferClass o => o -> EntryBuffer
+toEntryBuffer = unsafeCastGObject . toGObject
+
+instance EntryBufferClass EntryBuffer
+instance GObjectClass EntryBuffer where
+  toGObject = GObject . castForeignPtr . unEntryBuffer
+  unsafeCastGObject = EntryBuffer . castForeignPtr . unGObject
+
+castToEntryBuffer :: GObjectClass obj => obj -> EntryBuffer
+castToEntryBuffer = castTo gTypeEntryBuffer "EntryBuffer"
+
+gTypeEntryBuffer :: GType
+gTypeEntryBuffer =
+  {# call fun unsafe gtk_entry_buffer_get_type #}
+
+-- ********************************************************************* Action
+
+{#pointer *GtkAction as Action foreign newtype #} deriving (Eq,Ord)
+
+mkAction = (Action, objectUnrefFromMainloop)
+unAction (Action o) = o
+
+class GObjectClass o => ActionClass o
+toAction :: ActionClass o => o -> Action
+toAction = unsafeCastGObject . toGObject
+
+instance ActionClass Action
+instance GObjectClass Action where
+  toGObject = GObject . castForeignPtr . unAction
+  unsafeCastGObject = Action . castForeignPtr . unGObject
+
+castToAction :: GObjectClass obj => obj -> Action
+castToAction = castTo gTypeAction "Action"
+
+gTypeAction :: GType
+gTypeAction =
+  {# call fun unsafe gtk_action_get_type #}
+
+-- *************************************************************** RecentAction
+
+{#pointer *GtkRecentAction as RecentAction foreign newtype #} deriving (Eq,Ord)
+
+mkRecentAction = (RecentAction, objectUnrefFromMainloop)
+unRecentAction (RecentAction o) = o
+
+class ActionClass o => RecentActionClass o
+toRecentAction :: RecentActionClass o => o -> RecentAction
+toRecentAction = unsafeCastGObject . toGObject
+
+instance RecentActionClass RecentAction
+instance ActionClass RecentAction
+instance GObjectClass RecentAction where
+  toGObject = GObject . castForeignPtr . unRecentAction
+  unsafeCastGObject = RecentAction . castForeignPtr . unGObject
+
+castToRecentAction :: GObjectClass obj => obj -> RecentAction
+castToRecentAction = castTo gTypeRecentAction "RecentAction"
+
+gTypeRecentAction :: GType
+gTypeRecentAction =
+  {# call fun unsafe gtk_recent_action_get_type #}
+
+-- *************************************************************** ToggleAction
+
+{#pointer *GtkToggleAction as ToggleAction foreign newtype #} deriving (Eq,Ord)
+
+mkToggleAction = (ToggleAction, objectUnrefFromMainloop)
+unToggleAction (ToggleAction o) = o
+
+class ActionClass o => ToggleActionClass o
+toToggleAction :: ToggleActionClass o => o -> ToggleAction
+toToggleAction = unsafeCastGObject . toGObject
+
+instance ToggleActionClass ToggleAction
+instance ActionClass ToggleAction
+instance GObjectClass ToggleAction where
+  toGObject = GObject . castForeignPtr . unToggleAction
+  unsafeCastGObject = ToggleAction . castForeignPtr . unGObject
+
+castToToggleAction :: GObjectClass obj => obj -> ToggleAction
+castToToggleAction = castTo gTypeToggleAction "ToggleAction"
+
+gTypeToggleAction :: GType
+gTypeToggleAction =
+  {# call fun unsafe gtk_toggle_action_get_type #}
+
+-- **************************************************************** RadioAction
+
+{#pointer *GtkRadioAction as RadioAction foreign newtype #} deriving (Eq,Ord)
+
+mkRadioAction = (RadioAction, objectUnrefFromMainloop)
+unRadioAction (RadioAction o) = o
+
+class ToggleActionClass o => RadioActionClass o
+toRadioAction :: RadioActionClass o => o -> RadioAction
+toRadioAction = unsafeCastGObject . toGObject
+
+instance RadioActionClass RadioAction
+instance ToggleActionClass RadioAction
+instance ActionClass RadioAction
+instance GObjectClass RadioAction where
+  toGObject = GObject . castForeignPtr . unRadioAction
+  unsafeCastGObject = RadioAction . castForeignPtr . unGObject
+
+castToRadioAction :: GObjectClass obj => obj -> RadioAction
+castToRadioAction = castTo gTypeRadioAction "RadioAction"
+
+gTypeRadioAction :: GType
+gTypeRadioAction =
+  {# call fun unsafe gtk_radio_action_get_type #}
+
+-- **************************************************************** ActionGroup
+
+{#pointer *GtkActionGroup as ActionGroup foreign newtype #} deriving (Eq,Ord)
+
+mkActionGroup = (ActionGroup, objectUnrefFromMainloop)
+unActionGroup (ActionGroup o) = o
+
+class GObjectClass o => ActionGroupClass o
+toActionGroup :: ActionGroupClass o => o -> ActionGroup
+toActionGroup = unsafeCastGObject . toGObject
+
+instance ActionGroupClass ActionGroup
+instance GObjectClass ActionGroup where
+  toGObject = GObject . castForeignPtr . unActionGroup
+  unsafeCastGObject = ActionGroup . castForeignPtr . unGObject
+
+castToActionGroup :: GObjectClass obj => obj -> ActionGroup
+castToActionGroup = castTo gTypeActionGroup "ActionGroup"
+
+gTypeActionGroup :: GType
+gTypeActionGroup =
+  {# call fun unsafe gtk_action_group_get_type #}
+
+-- ****************************************************************** UIManager
+
+{#pointer *GtkUIManager as UIManager foreign newtype #} deriving (Eq,Ord)
+
+mkUIManager = (UIManager, objectUnrefFromMainloop)
+unUIManager (UIManager o) = o
+
+class GObjectClass o => UIManagerClass o
+toUIManager :: UIManagerClass o => o -> UIManager
+toUIManager = unsafeCastGObject . toGObject
+
+instance UIManagerClass UIManager
+instance GObjectClass UIManager where
+  toGObject = GObject . castForeignPtr . unUIManager
+  unsafeCastGObject = UIManager . castForeignPtr . unGObject
+
+castToUIManager :: GObjectClass obj => obj -> UIManager
+castToUIManager = castTo gTypeUIManager "UIManager"
+
+gTypeUIManager :: GType
+gTypeUIManager =
+  {# call fun unsafe gtk_ui_manager_get_type #}
+
+-- **************************************************************** WindowGroup
+
+{#pointer *GtkWindowGroup as WindowGroup foreign newtype #} deriving (Eq,Ord)
+
+mkWindowGroup = (WindowGroup, objectUnrefFromMainloop)
+unWindowGroup (WindowGroup o) = o
+
+class GObjectClass o => WindowGroupClass o
+toWindowGroup :: WindowGroupClass o => o -> WindowGroup
+toWindowGroup = unsafeCastGObject . toGObject
+
+instance WindowGroupClass WindowGroup
+instance GObjectClass WindowGroup where
+  toGObject = GObject . castForeignPtr . unWindowGroup
+  unsafeCastGObject = WindowGroup . castForeignPtr . unGObject
+
+castToWindowGroup :: GObjectClass obj => obj -> WindowGroup
+castToWindowGroup = castTo gTypeWindowGroup "WindowGroup"
+
+gTypeWindowGroup :: GType
+gTypeWindowGroup =
+  {# call fun unsafe gtk_window_group_get_type #}
+
+-- *************************************************************** CellEditable
+
+{#pointer *GtkCellEditable as CellEditable foreign newtype #} deriving (Eq,Ord)
+
+mkCellEditable = (CellEditable, objectUnrefFromMainloop)
+unCellEditable (CellEditable o) = o
+
+class GObjectClass o => CellEditableClass o
+toCellEditable :: CellEditableClass o => o -> CellEditable
+toCellEditable = unsafeCastGObject . toGObject
+
+instance CellEditableClass CellEditable
+instance GObjectClass CellEditable where
+  toGObject = GObject . castForeignPtr . unCellEditable
+  unsafeCastGObject = CellEditable . castForeignPtr . unGObject
+
+castToCellEditable :: GObjectClass obj => obj -> CellEditable
+castToCellEditable = castTo gTypeCellEditable "CellEditable"
+
+gTypeCellEditable :: GType
+gTypeCellEditable =
+  {# call fun unsafe gtk_cell_editable_get_type #}
+
+-- ******************************************************************* Editable
+
+{#pointer *GtkEditable as Editable foreign newtype #} deriving (Eq,Ord)
+
+mkEditable = (Editable, objectUnrefFromMainloop)
+unEditable (Editable o) = o
+
+class GObjectClass o => EditableClass o
+toEditable :: EditableClass o => o -> Editable
+toEditable = unsafeCastGObject . toGObject
+
+instance EditableClass Editable
+instance GObjectClass Editable where
+  toGObject = GObject . castForeignPtr . unEditable
+  unsafeCastGObject = Editable . castForeignPtr . unGObject
+
+castToEditable :: GObjectClass obj => obj -> Editable
+castToEditable = castTo gTypeEditable "Editable"
+
+gTypeEditable :: GType
+gTypeEditable =
+  {# call fun unsafe gtk_editable_get_type #}
+
+-- **************************************************************** FileChooser
+
+{#pointer *GtkFileChooser as FileChooser foreign newtype #} deriving (Eq,Ord)
+
+mkFileChooser = (FileChooser, objectUnrefFromMainloop)
+unFileChooser (FileChooser o) = o
+
+class GObjectClass o => FileChooserClass o
+toFileChooser :: FileChooserClass o => o -> FileChooser
+toFileChooser = unsafeCastGObject . toGObject
+
+instance FileChooserClass FileChooser
+instance GObjectClass FileChooser where
+  toGObject = GObject . castForeignPtr . unFileChooser
+  unsafeCastGObject = FileChooser . castForeignPtr . unGObject
+
+castToFileChooser :: GObjectClass obj => obj -> FileChooser
+castToFileChooser = castTo gTypeFileChooser "FileChooser"
+
+gTypeFileChooser :: GType
+gTypeFileChooser =
+  {# call fun unsafe gtk_file_chooser_get_type #}
 
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
@@ -80,8 +80,10 @@
   aboutDialogNew,
 
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
   aboutDialogSetEmailHook,
   aboutDialogSetUrlHook,
+#endif
 
 -- * Attributes
   aboutDialogProgramName,
@@ -431,9 +433,11 @@
     (toAboutDialog self)
     iconNamePtr
 
+#if GTK_MAJOR_VERSION < 3
 -- | Installs a global function to be called whenever the user activates an
 -- email link in an about dialog.
 --
+-- Removed in Gtk3.
 aboutDialogSetEmailHook :: 
     (String -> IO ()) -- ^ @(\url -> ...)@ - a function to call when an email
                       -- link is activated.
@@ -452,6 +456,7 @@
 -- | Installs a global function to be called whenever the user activates a URL
 -- link in an about dialog.
 --
+-- Removed in Gtk3.
 aboutDialogSetUrlHook :: 
     (String -> IO ()) -- ^ @(\url -> ...)@ - a function to call when a URL link
                       -- is activated.
@@ -471,6 +476,7 @@
 
 foreign import ccall "wrapper" mkAboutDialogActivateLinkFunc ::
   (Ptr AboutDialog -> CString -> Ptr () -> IO ()) -> IO AboutDialogActivateLinkFunc
+#endif
 
 #if GTK_CHECK_VERSION(2,8,0)
 -- | Returns whether the license text in @about@ is automatically wrapped.
diff --git a/Graphics/UI/Gtk/Windows/Dialog.chs b/Graphics/UI/Gtk/Windows/Dialog.chs
--- a/Graphics/UI/Gtk/Windows/Dialog.chs
+++ b/Graphics/UI/Gtk/Windows/Dialog.chs
@@ -107,15 +107,20 @@
   dialogNew,
 
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
   dialogGetUpper,
+#endif
+  dialogGetContentArea,
   dialogGetActionArea,
   dialogRun,
   dialogResponse,
   dialogAddButton,
   dialogAddActionWidget,
-  dialogGetHasSeparator,
   dialogSetDefaultResponse,
+#if GTK_MAJOR_VERSION < 3
+  dialogGetHasSeparator,
   dialogSetHasSeparator,
+#endif
   dialogSetResponseSensitive,
   dialogGetResponseForWidget,
   dialogAlternativeDialogButtonOrder,
@@ -125,7 +130,9 @@
 #endif
 
 -- * Attributes
+#if GTK_MAJOR_VERSION < 3
   dialogHasSeparator,
+#endif
   dialogActionAreaBorder,
   dialogButtonSpacing,
   dialogContentAreaBorder,
@@ -150,7 +157,10 @@
 import Graphics.UI.Gtk.Abstract.Object	(makeNewObject)
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
-import Graphics.UI.Gtk.General.Structs	(dialogGetUpper, dialogGetActionArea,
+import Graphics.UI.Gtk.General.Structs (
+#if GTK_MAJOR_VERSION < 3
+                    dialogGetUpper, dialogGetActionArea,
+#endif
 					ResponseId(..), fromResponse, toResponse)
 
 {# context lib="gtk" prefix="gtk" #}
@@ -253,14 +263,27 @@
     (toWidget child)
     (fromResponse responseId)
 
+#if GTK_MAJOR_VERSION < 3
 -- | Query if the dialog has a visible horizontal separator.
 --
+-- Removed in Gtk3.
 dialogGetHasSeparator :: DialogClass self => self -> IO Bool
 dialogGetHasSeparator self =
   liftM toBool $
   {# call unsafe dialog_get_has_separator #}
     (toDialog self)
 
+-- | Sets whether the dialog has a separator above the buttons. @True@ by
+-- default.
+--
+-- Removed in Gtk3.
+dialogSetHasSeparator :: DialogClass self => self -> Bool -> IO ()
+dialogSetHasSeparator self setting =
+  {# call dialog_set_has_separator #}
+    (toDialog self)
+    (fromBool setting)
+#endif
+
 -- | Sets the last widget in the dialog's action area with the given
 -- 'ResponseId' as the default widget for the dialog. Pressing \"Enter\"
 -- normally activates the default widget.
@@ -277,15 +300,6 @@
     (toDialog self)
     (fromResponse responseId)
 
--- | Sets whether the dialog has a separator above the buttons. @True@ by
--- default.
---
-dialogSetHasSeparator :: DialogClass self => self -> Bool -> IO ()
-dialogSetHasSeparator self setting =
-  {# call dialog_set_has_separator #}
-    (toDialog self)
-    (fromBool setting)
-
 -- | Calls @'widgetSetSensitive' widget setting@ for each widget in the
 -- dialog's action area with the given @responseId@. A convenient way to
 -- sensitize\/desensitize dialog buttons.
@@ -358,17 +372,41 @@
       (fromResponse responseId)
 #endif
 
+#if GTK_MAJOR_VERSION >= 3
+-- | Returns the content area of dialog.
+dialogGetContentArea :: DialogClass self => self -> IO Widget
+dialogGetContentArea self =
+    makeNewObject mkWidget $
+    {#call gtk_dialog_get_content_area #}
+      (toDialog self)
+
+-- | Returns the action area of dialog.
+--
+-- * This is useful to add some special widgets that cannot be added with
+-- dialogAddActionWidget.
+--
+dialogGetActionArea :: DialogClass self => self -> IO Widget
+dialogGetActionArea self =
+    makeNewObject mkWidget $
+    {#call gtk_dialog_get_content_area #}
+      (toDialog self)
+#else
+dialogGetContentArea self = liftM toWidget $ dialogGetUpper self
+#endif
+
 --------------------
 -- Attributes
-
+#if GTK_MAJOR_VERSION < 3
 -- | The dialog has a separator bar above its buttons.
 --
 -- Default value: @True@
 --
+-- Removed in Gtk3.
 dialogHasSeparator :: DialogClass self => Attr self Bool
 dialogHasSeparator = newAttr
   dialogGetHasSeparator
   dialogSetHasSeparator
+#endif
 
 -- | Width of border around the button area at the bottom of the dialog.
 --
@@ -434,3 +472,4 @@
 onResponse dia act = connect_INT__NONE "response" False dia (act . toResponse)
 afterResponse dia act = connect_INT__NONE "response" True dia (act . toResponse)
 #endif
+
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
@@ -67,7 +67,9 @@
   offscreenWindowNew,
 
 -- * Methods
+#if GTK_MAJOR_VERSION < 3
   offscreenWindowGetPixmap,
+#endif
   offscreenWindowGetPixbuf,
 #endif
 ) where
@@ -95,6 +97,7 @@
   liftM (castPtr :: Ptr Widget -> Ptr OffscreenWindow) $
   {#call gtk_offscreen_window_new #}
 
+#if GTK_MAJOR_VERSION < 3
 -- | Retrieves a snapshot of the contained widget in the form of a 'Pixmap'. If you need to keep this
 -- around over window resizes then you should add a reference to it.
 --
@@ -107,6 +110,7 @@
   maybeNull (makeNewGObject mkPixmap) $
   {#call gtk_offscreen_window_get_pixmap #}
      (toOffscreenWindow offscreen)
+#endif
 
 -- | Retrieves a snapshot of the contained widget in the form of a '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
@@ -92,9 +92,11 @@
 #if GTK_CHECK_VERSION(2,12,0)
   windowSetStartupId,
 #endif
+#if GTK_MAJOR_VERSION < 3
   windowGetFrame,
   windowSetFrameDimensions,
   windowGetFrameDimensions,
+#endif
   windowStick,
   windowUnstick,
   windowAddAccelGroup,
@@ -149,6 +151,9 @@
   windowAllowShrink,
   windowAllowGrow,
   windowResizable,
+#if GTK_MAJOR_VERSION >= 3
+  windowHasResizeGrip,
+#endif
   windowModal,
 #if GTK_CHECK_VERSION(2,12,0)
   windowOpacity,
@@ -188,7 +193,9 @@
   windowToplevelFocus,
   windowTransientFor,
   windowFocus,
+#if GTK_MAJOR_VERSION < 3
   windowHasFrame,
+#endif
   windowIconList,
   windowMnemonicModifier,
 #if GTK_CHECK_VERSION(2,20,0)
@@ -206,9 +213,15 @@
   windowGetTitle,
   windowSetResizable,
   windowGetResizable,
+#if GTK_MAJOR_VERSION >= 3
+  windowSetHasResizeGrip,
+  windowGetHasResizeGrip,
+#endif
   windowSetModal,
   windowGetModal,
+#if GTK_MAJOR_VERSION < 3
   windowSetPolicy,
+#endif
   windowSetTransientFor,
   windowGetTransientFor,
   windowSetDestroyWithParent,
@@ -237,8 +250,10 @@
   windowSetDeletable,
   windowGetDeletable,
 #endif
+#if GTK_MAJOR_VERSION < 3
   windowSetHasFrame,
   windowGetHasFrame,
+#endif
   windowSetRole,
   windowGetRole,
   windowSetIcon,
@@ -273,7 +288,9 @@
 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
 import Graphics.UI.Gtk.General.Structs  (windowGetFrame)
+#endif
 {#import Graphics.UI.Gtk.Types#}
 {#import Graphics.UI.Gtk.Signals#}
 {#import Graphics.UI.Gtk.Gdk.Enums#}    (Modifier(..))
@@ -352,6 +369,24 @@
   {# call unsafe window_get_resizable #}
     (toWindow self)
 
+#if GTK_MAJOR_VERSION >= 3
+-- | Sets whether the window has a resize grip. @True@ by default.
+--
+windowSetHasResizeGrip :: WindowClass self => self -> Bool -> IO ()
+windowSetHasResizeGrip self setting =
+  {# call window_set_has_resize_grip #}
+    (toWindow self)
+    (fromBool setting)
+
+-- | Returns whether the window has a resize grip.
+--
+windowGetHasResizeGrip :: WindowClass self => self -> IO Bool
+windowGetHasResizeGrip self =
+  liftM toBool $
+  {# call unsafe window_get_has_resize_grip #}
+    (toWindow self)
+#endif
+
 -- | Activates the current focused widget within the window.
 --
 windowActivateFocus :: WindowClass self => self
@@ -373,6 +408,7 @@
   {# call window_activate_default #}
     (toWindow self)
 
+#if GTK_MAJOR_VERSION < 3
 #ifndef DISABLE_DEPRECATED
 {-# DEPRECATED windowSetPolicy "Use windowSetResizable instead." #-}
 -- | Sets the window resizing policy.
@@ -380,6 +416,7 @@
 -- * Warning: this function is deprecated and should not be used in
 -- newly-written code. Use 'windowSetResizable' instead.
 --
+-- Removed in Gtk3.
 windowSetPolicy :: WindowClass self => self -> Bool -> Bool -> Bool -> IO ()
 windowSetPolicy self allowShrink allowGrow autoShrink =
   {# call window_set_policy #}
@@ -388,6 +425,7 @@
     (fromBool allowGrow)
     (fromBool autoShrink)
 #endif
+#endif
 
 -- | Sets a window modal or non-modal. Modal windows prevent interaction with
 -- other windows in the same application. To keep modal dialogs on top of main
@@ -1056,6 +1094,8 @@
   {# call window_get_deletable #}
     (toWindow self)
 #endif
+
+#if GTK_MAJOR_VERSION < 3
 -- | (Note: this is a special-purpose function intended for the framebuffer
 -- port; see 'windowSetHasFrame'. It will have no effect on the window border
 -- drawn by the window manager, which is the normal case when using the X
@@ -1064,6 +1104,7 @@
 -- For windows with frames (see 'windowSetHasFrame') this function can be
 -- used to change the size of the frame border.
 --
+-- Removed in Gtk3.
 windowSetFrameDimensions :: WindowClass self => self
  -> Int   -- ^ @left@ - The width of the left border
  -> Int   -- ^ @top@ - The height of the top border
@@ -1087,8 +1128,7 @@
 -- which is the normal case when using a windowing system. 
 -- See 'drawWindowGetFrameExtents' to get the standard window border extents.)
 --
---
---
+-- Removed in Gtk3.
 windowGetFrameDimensions :: WindowClass self => self
  -> IO (Int, Int, Int, Int)
  -- ^ returns @(left, top, right, bottom)@. @left@ is the
@@ -1115,6 +1155,7 @@
 -- but it could conceivably be used by X-programs that want to do their own window
 -- decorations.
 --
+-- Removed in Gtk3.
 windowSetHasFrame :: WindowClass self => self 
  -> Bool  -- ^ @setting@ - a boolean   
  -> IO ()
@@ -1125,11 +1166,13 @@
 
 -- | Accessor for whether the window has a frame window exterior to window->window. Gets the value set by 'windowSetHasFrame'.
 --
+-- Removed in Gtk3.
 windowGetHasFrame :: WindowClass self => self
  -> IO Bool  -- ^ return @True@ if a frame has been added to the window via 'windowSetHasFrame'.
 windowGetHasFrame self = liftM toBool $
   {# call window_get_has_frame #}
     (toWindow self)
+#endif
 
 -- | This function is only useful on X11, not with other Gtk+ targets.
 --
@@ -1445,7 +1488,7 @@
 windowSetIconFromFile self filename =
   propagateGError $ \errPtr ->
   withUTFString filename $ \filenamePtr -> do
-#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0)
+#if defined (WIN32) && GTK_CHECK_VERSION(2,6,0) && GTK_MAJOR_VERSION < 3
   {# call gtk_window_set_icon_from_file_utf8 #}
 #else
   {# call gtk_window_set_icon_from_file #}
@@ -1984,6 +2027,17 @@
   windowGetResizable
   windowSetResizable
 
+#if GTK_MAJOR_VERSION >= 3
+-- | If @True@, window has a resize grip.
+--
+-- Default value: @True@
+--
+windowHasResizeGrip :: WindowClass self => Attr self Bool
+windowHasResizeGrip = newAttr
+  windowGetHasResizeGrip
+  windowSetHasResizeGrip
+#endif
+
 -- | If @True@, the window is modal (other windows are not usable while this
 -- one is up).
 --
@@ -2017,6 +2071,7 @@
   windowGetFocus
   windowSetFocus
 
+#if GTK_MAJOR_VERSION < 3
 -- | (Note: this is a special-purpose function for the framebuffer port, that
 -- causes Gtk+ to draw its own window border. For most applications, you want
 -- 'windowSetDecorated' instead, which tells the window manager whether to draw
@@ -2031,10 +2086,12 @@
 -- but it could conceivably be used by X-programs that want to do their own
 -- window decorations.
 --
+-- Removed in Gtk3.
 windowHasFrame :: WindowClass self => Attr self Bool
 windowHasFrame = newAttr
   windowGetHasFrame
   windowSetHasFrame
+#endif
 
 -- | Sets up the icon representing a 'Window'. The icon is used when the
 -- window is minimized (also known as iconified). Some window managers or
diff --git a/Gtk2HsSetup.hs b/Gtk2HsSetup.hs
--- a/Gtk2HsSetup.hs
+++ b/Gtk2HsSetup.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP #-}
+{-# LANGUAGE CPP, ViewPatterns #-}
 
 #ifndef CABAL_VERSION_CHECK
 #error This module has to be compiled via the Setup.hs program which generates the gtk2hs-macros.h file
@@ -29,7 +29,7 @@
                                                emptyBuildInfo, allBuildInfo,
                                                Library(..),
                                                libModules, hasLibs)
-import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..),
+import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(withPackageDB, buildDir, localPkgDescr, installedPkgs, withPrograms),
                                            InstallDirs(..),
                                            componentPackageDeps,
                                            absoluteInstallDirs)
@@ -56,13 +56,26 @@
 import Distribution.Verbosity
 import Control.Monad (when, unless, filterM, liftM, forM, forM_)
 import Data.Maybe ( isJust, isNothing, fromMaybe, maybeToList )
-import Data.List (isPrefixOf, isSuffixOf, nub)
-import Data.Char (isAlpha)
+import Data.List (isPrefixOf, isSuffixOf, stripPrefix, nub)
+import Data.Char (isAlpha, isNumber)
 import qualified Data.Map as M
 import qualified Data.Set as S
+import qualified Distribution.Simple.LocalBuildInfo as LBI
+import Distribution.Simple.Compiler (compilerVersion)
 
 import Control.Applicative ((<$>))
 
+#if CABAL_VERSION_CHECK(1,17,0)
+import Distribution.Simple.Program.Find ( defaultProgramSearchPath )
+onDefaultSearchPath f a b = f a b defaultProgramSearchPath
+libraryConfig lbi = case [clbi | (LBI.CLibName, clbi, _) <- LBI.componentsConfigs lbi] of
+  [clbi] -> Just clbi
+  _ -> Nothing
+#else
+onDefaultSearchPath = id
+libraryConfig = LBI.libraryConfig
+#endif
+
 -- the name of the c2hs pre-compiled header file
 precompFile = "precompchs.bin"
 
@@ -99,10 +112,16 @@
 
 fixLibs :: [FilePath] -> [String] -> [String]
 fixLibs dlls = concatMap $ \ lib ->
-    case filter (("lib" ++ lib) `isPrefixOf`) dlls of
+    case filter (isLib lib) dlls of
                 dll:_ -> [dropExtension dll]
                 _     -> if lib == "z" then [] else [lib]
-
+  where
+    isLib lib dll =
+        case stripPrefix ("lib"++lib) dll of
+            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.
 
@@ -135,8 +154,8 @@
 register :: PackageDescription -> LocalBuildInfo
          -> RegisterFlags -- ^Install in the user's database?; verbose
          -> IO ()
-register pkg@PackageDescription { library       = Just lib  }
-         lbi@LocalBuildInfo     { libraryConfig = Just clbi } regFlags
+register pkg@(library       -> Just lib )
+         lbi@(libraryConfig -> Just clbi) regFlags
   = do
 
     installedPkgInfoRaw <- generateRegistrationInfo
@@ -228,6 +247,10 @@
     = nub $
       ["-I" ++ dir | dir <- PD.includeDirs bi]
    ++ [opt | opt@('-':c:_) <- PD.cppOptions bi ++ PD.ccOptions bi, c `elem` "DIU"]
+   ++ ["-D__GLASGOW_HASKELL__="++show (ghcDefine . versionBranch . compilerVersion $ LBI.compiler lbi)]
+ where
+  ghcDefine (v1:v2:_) = v1 * 100 + v2
+  ghcDefine _ = __GLASGOW_HASKELL__
 
 installCHI :: PackageDescription -- ^information from the .cabal file
         -> LocalBuildInfo -- ^information from the configure step
@@ -417,7 +440,7 @@
 checkGtk2hsBuildtools :: [Program] -> IO ()
 checkGtk2hsBuildtools programs = do
   programInfos <- mapM (\ prog -> do
-                         location <- programFindLocation prog normal
+                         location <- onDefaultSearchPath programFindLocation prog normal
                          return (programName prog, location)
                       ) programs
   let printError name = do
diff --git a/SetupWrapper.hs b/SetupWrapper.hs
--- a/SetupWrapper.hs
+++ b/SetupWrapper.hs
@@ -29,6 +29,24 @@
 import Control.Monad
 
 
+-- moreRecentFile is implemented in Distribution.Simple.Utils, but only in
+-- Cabal >= 1.18. For backwards-compatibility, we implement a copy with a new
+-- name here. Some desirable alternate strategies don't work:
+-- * We can't use CPP to check which version of Cabal we're up against because
+--   this is the file that's generating the macros for doing that.
+-- * We can't use the name moreRecentFiles and use
+--   import D.S.U hiding (moreRecentFiles)
+--   because on old GHC's (and according to the Report) hiding a name that
+--   doesn't exist is an error.
+moreRecentFile' :: FilePath -> FilePath -> IO Bool
+moreRecentFile' a b = do
+  exists <- doesFileExist b
+  if not exists
+    then return True
+    else do tb <- getModificationTime b
+            ta <- getModificationTime a
+            return (ta > tb)
+
 setupWrapper :: FilePath -> IO ()
 setupWrapper setupHsFile = do
   args <- getArgs
@@ -91,8 +109,8 @@
     -- Currently this is GHC only. It should really be generalised.
     --
     compileSetupExecutable = do
-      setupHsNewer      <- setupHsFile      `moreRecentFile` setupProgFile
-      cabalVersionNewer <- setupVersionFile `moreRecentFile` setupProgFile
+      setupHsNewer      <- setupHsFile      `moreRecentFile'` setupProgFile
+      cabalVersionNewer <- setupVersionFile `moreRecentFile'` setupProgFile
       let outOfDate = setupHsNewer || cabalVersionNewer
       when outOfDate $ do
         debug verbosity "Setup script is out of date, compiling..."
@@ -144,12 +162,3 @@
                    Nothing Nothing Nothing
       exitCode <- waitForProcess process
       unless (exitCode == ExitSuccess) $ exitWith exitCode
-
-moreRecentFile :: FilePath -> FilePath -> IO Bool
-moreRecentFile a b = do
-  exists <- doesFileExist b
-  if not exists
-    then return True
-    else do tb <- getModificationTime b
-            ta <- getModificationTime a
-            return (ta > tb)
diff --git a/demo/actionMenu/ActionMenu.hs b/demo/actionMenu/ActionMenu.hs
--- a/demo/actionMenu/ActionMenu.hs
+++ b/demo/actionMenu/ActionMenu.hs
@@ -1,4 +1,5 @@
 import Graphics.UI.Gtk
+import Control.Monad.IO.Class (liftIO)
 
 uiDef =
   "<ui>\
@@ -47,35 +48,35 @@
   newAct <- actionNew "NewAction" "New"
             (Just "Clear the spreadsheet area.")
             (Just stockNew)
-  newAct `onActionActivate` putStrLn "New activated."
+  on newAct actionActivated $ putStrLn "New activated."
   openAct <- actionNew "OpenAction" "Open"
             (Just "Open an existing spreadsheet.")
             (Just stockOpen)
-  openAct `onActionActivate` putStrLn "Open activated."
+  on openAct actionActivated $ putStrLn "Open activated."
   saveAct <- actionNew "SaveAction" "Save"
             (Just "Save the current spreadsheet.")
             (Just stockSave)
-  saveAct `onActionActivate` putStrLn "Save activated."
+  on saveAct actionActivated $ putStrLn "Save activated."
   saveAsAct <- actionNew "SaveAsAction" "SaveAs"
             (Just "Save spreadsheet under new name.")
             (Just stockSaveAs)
-  saveAsAct `onActionActivate` putStrLn "SaveAs activated."
+  on saveAsAct actionActivated $ putStrLn "SaveAs activated."
   exitAct <- actionNew "ExitAction" "Exit"
             (Just "Exit this application.")
             (Just stockSaveAs)
-  exitAct `onActionActivate` mainQuit
+  on exitAct actionActivated $ mainQuit
   cutAct <- actionNew "CutAction" "Cut"
             (Just "Cut out the current selection.")
             (Just stockCut)
-  cutAct `onActionActivate` putStrLn "Cut activated."
+  on cutAct actionActivated $ putStrLn "Cut activated."
   copyAct <- actionNew "CopyAction" "Copy"
             (Just "Copy the current selection.")
             (Just stockCopy)
-  copyAct `onActionActivate` putStrLn "Copy activated."
+  on copyAct actionActivated $ putStrLn "Copy activated."
   pasteAct <- actionNew "PasteAction" "Paste"
             (Just "Paste the current selection.")
             (Just stockPaste)
-  pasteAct `onActionActivate` putStrLn "Paste activated."
+  on pasteAct actionActivated $ putStrLn "Paste activated."
 
   standardGroup <- actionGroupNew "standard"
   mapM_ (actionGroupAddAction standardGroup) [fileAct, editAct]
@@ -87,8 +88,8 @@
   uiManagerInsertActionGroup ui standardGroup 0
 
   win <- windowNew
-  win `onDestroy` mainQuit
-  win `onSizeRequest` return (Requisition 200 100)
+  on win destroyEvent $ liftIO mainQuit >> return False
+  on win sizeRequest $ return (Requisition 200 100)
   (Just menuBar) <- uiManagerGetWidget ui "/ui/menubar"
   (Just toolBar) <- uiManagerGetWidget ui "/ui/toolbar"
 
diff --git a/demo/buttonbox/ButtonBox.hs b/demo/buttonbox/ButtonBox.hs
--- a/demo/buttonbox/ButtonBox.hs
+++ b/demo/buttonbox/ButtonBox.hs
@@ -1,6 +1,7 @@
 module Main (main) where
 
 import Graphics.UI.Gtk
+import Control.Monad.IO.Class (liftIO)
 
 main :: IO ()
 main = do
@@ -10,9 +11,7 @@
   window <- windowNew
 
   -- Here we connect the "destroy" event to a signal handler.
-  -- This event occurs when we call widgetDestroy on the window,
-  -- or if the user closes the window.
-  window `onDestroy` mainQuit
+  on window destroyEvent $ liftIO mainQuit >> return False
 
   -- Sets the border width of the window.
   set window [ containerBorderWidth := 10 ]
diff --git a/demo/carsim/CarSim.hs b/demo/carsim/CarSim.hs
--- a/demo/carsim/CarSim.hs
+++ b/demo/carsim/CarSim.hs
@@ -6,13 +6,13 @@
 module Main where
 import Data.Maybe
 import Graphics.UI.Gtk
-import Graphics.UI.Gtk.Gdk.EventM
 import Graphics.Rendering.Cairo
 import Control.Monad
 import Data.IORef
 import Data.List
 import Data.Time
 import Data.Complex
+import Control.Applicative ((<$>))
 
 -- Constants
 
@@ -26,7 +26,8 @@
 
 eventWindowSize = do
     dr <- eventWindow
-    (w,h) <- liftIO $ drawableGetSize dr
+    w <- liftIO $ drawWindowGetWidth dr
+    h <- liftIO $ drawWindowGetHeight dr
     return $ if w*h > 1
         then (fromIntegral w, fromIntegral h)
         else (1,1)
@@ -108,12 +109,12 @@
 
 about = do
     ad <- aboutDialogNew
-    aboutDialogSetName ad "S.A.R.A.H."
-    aboutDialogSetVersion ad "1.0"
-    aboutDialogSetAuthors ad $ ["Maurício C. Antunes "
-        ++ "<mauricio.antunes@gmail.com>"]
-    aboutDialogSetComments ad $ "Software Automation of "
-        ++ "Road Automobile Headache"
+    set ad [ aboutDialogName := "S.A.R.A.H."
+           , aboutDialogVersion := "1.0"
+           , aboutDialogAuthors := ["Maurício C. Antunes "
+                                ++ "<mauricio.antunes@gmail.com>"]
+           , aboutDialogComments := "Software Automation of "
+                                ++ "Road Automobile Headache"]
     dialogRun ad
     widgetDestroy ad
 
@@ -157,24 +158,24 @@
     buttons <- do
 
         qr <- buttonNewFromStock stockClear
-        onClicked qr $ do
+        on qr buttonActivated $ do
             (liftM length) getCars >>= setCars . newCarList
             getCurrentTime >>= setTimeStamp
             widgetQueueDraw drawingArea
 
         qp <- toggleButtonNewWithLabel stockMediaPause
         buttonSetUseStock qp True
-        onToggled qp $ do
+        on qp toggled $ do
             p <- toggleButtonGetActive qp
             case p of
                 True -> pause
                 False -> resume
 
         qa <- buttonNewFromStock stockAbout
-        onClicked qa $ about
+        on qa buttonActivated $ about
 
         qq <- buttonNewFromStock stockQuit
-        onClicked qq (do
+        on qq buttonActivated (do
                        widgetDestroy mainWindow
                        mainQuit)
 
@@ -188,7 +189,7 @@
     howMany <- do
 
         sc <- vScaleNewWithRange 1 40 1
-        afterRangeValueChanged sc $ do
+        after sc valueChanged $ do
             v <- liftM floor $ rangeGetValue sc
             c <- getCars
             setCars $ newCarListFromList v c
@@ -196,7 +197,7 @@
 
         scaleSetValuePos sc PosTop
         scaleSetDigits sc 0
-        rangeSetUpdatePolicy sc UpdateDiscontinuous
+--        rangeSetUpdatePolicy sc UpdateDiscontinuous
         rangeSetValue sc =<< liftM (fromIntegral . length) getCars
 
         al <- alignmentNew 0.5 0.5 0 1
@@ -220,17 +221,15 @@
         on dr leaveNotifyEvent $ liftIO $
             setJam Nothing >> return True
 
-        on dr exposeEvent $ do
-            (w,h) <- eventWindowSize
-            dw <- eventWindow
-            liftIO $ do
-                jam <- getJam
-                cars <- getCars
-                renderWithDrawable dw $ do
-                    translate (w/2) (h/2)
-                    scale (w/drawSide) (h/drawSide)
-                    road2render jam cars
-            return True
+        on dr draw $ do
+            w <- liftIO $ (fromIntegral <$> widgetGetAllocatedWidth dr)
+            h <- liftIO $ (fromIntegral <$> widgetGetAllocatedHeight dr)
+            jam <- liftIO getJam
+            cars <- liftIO getCars
+            translate (w/2) (h/2)
+            scale (w/drawSide) (h/drawSide)
+            road2render jam cars
+            -- return True
 
         af <- aspectFrameNew 0.5 0.5 (Just 1)
         frameSetShadowType af ShadowNone
@@ -249,8 +248,9 @@
         boxPackStart hb vb PackGrow 0
         return hb
 
-    windowSetTitle mainWindow "S.A.R.A.H."
-    windowSetDefaultSize mainWindow 400 400
+    set mainWindow [ windowTitle := "S.A.R.A.H."
+                   , windowDefaultWidth := 400
+                   , windowDefaultHeight := 400 ]
     on mainWindow objectDestroy mainQuit
     containerAdd mainWindow layout
     widgetShowAll mainWindow
diff --git a/demo/concurrent/Progress.hs b/demo/concurrent/Progress.hs
--- a/demo/concurrent/Progress.hs
+++ b/demo/concurrent/Progress.hs
@@ -9,15 +9,16 @@
 import Graphics.UI.Gtk
 
 import Control.Concurrent
+import Control.Applicative ((<$>))
 
 main :: IO ()
 main = do
   initGUI
   dia <- dialogNew
   dialogAddButton dia stockClose ResponseClose
-  contain <- dialogGetUpper dia
+  contain <- castToBox <$> dialogGetContentArea dia
   pb <- progressBarNew
-  boxPackStartDefaults contain pb
+  boxPackStart contain pb PackNatural 0
   widgetShowAll dia
   forkIO (doTask pb)
 
diff --git a/demo/concurrent/ProgressThreadedRTS.hs b/demo/concurrent/ProgressThreadedRTS.hs
--- a/demo/concurrent/ProgressThreadedRTS.hs
+++ b/demo/concurrent/ProgressThreadedRTS.hs
@@ -11,6 +11,7 @@
 import Graphics.UI.Gtk
 
 import Control.Concurrent
+import Control.Applicative ((<$>))
 
 main :: IO ()
 main = do
@@ -21,9 +22,9 @@
 
   dia <- dialogNew
   dialogAddButton dia stockClose ResponseClose
-  contain <- dialogGetUpper dia
+  contain <- castToBox <$> dialogGetContentArea dia
   pb <- progressBarNew
-  boxPackStartDefaults contain pb
+  boxPackStart contain pb PackNatural 0
   widgetShowAll dia
   forkIO (doTask pb)
 
diff --git a/demo/fastdraw/FastDraw.hs b/demo/fastdraw/FastDraw.hs
--- a/demo/fastdraw/FastDraw.hs
+++ b/demo/fastdraw/FastDraw.hs
@@ -1,54 +1,58 @@
+{-# LANGUAGE ScopedTypeVariables #-}
 {-# OPTIONS -O #-}
 
 -- Example of an drawing graphics onto a canvas.
 import Graphics.UI.Gtk
-import Graphics.UI.Gtk.Gdk.GC
 
 import Data.Array.MArray
 import Data.Word
 import Data.IORef
 import Control.Monad ( when )
-import Control.Monad.Trans ( liftIO )
+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 ((<$>))
 
 
 main = do
   initGUI
   dia <- dialogNew
   dialogAddButton dia stockOk ResponseOk
-  contain <- dialogGetUpper dia
+  contain <- castToBox <$> dialogGetContentArea dia
   canvas <- drawingAreaNew
-  canvas `on` sizeRequest $ return (Requisition 256 256)
+  let w = 256
+      h = 256
+      chan = 4
+      row = w * chan
+      stride = row
+  widgetSetSizeRequest canvas 256 256
 
   -- create the Pixbuf
-  pb <- pixbufNew ColorspaceRgb False 8 256 256
-  pbData <- (pixbufGetPixels pb :: IO (PixbufData Int Word8))
-  row <- pixbufGetRowstride pb
-  chan <- pixbufGetNChannels pb
-  bits <- pixbufGetBitsPerSample pb
-  putStrLn ("bytes per row: "++show row++", channels per pixel: "++show chan++
-            ", bits per sample: "++show bits)
+  allocaArray (w * h * chan) $ \ pbData -> do
 
   -- draw into the Pixbuf
-  doFromTo 0 255 $ \y ->
-    doFromTo 0 255 $ \x -> do
-      writeArray pbData (x*chan+y*row) (fromIntegral x)
-      writeArray pbData (1+x*chan+y*row) (fromIntegral y)
-      writeArray pbData (2+x*chan+y*row) 0
+  doFromTo 0 (h-1) $ \y ->
+    doFromTo 0 (w-1) $ \x -> do
+      pokeByteOff pbData (2+x*chan+y*row) (fromIntegral x :: CUChar)
+      pokeByteOff pbData (1+x*chan+y*row) (fromIntegral y :: CUChar)
+      pokeByteOff pbData (0+x*chan+y*row) (0 :: CUChar)
 
   -- a function to update the Pixbuf
-  blueRef <- newIORef 0
+  blueRef <- newIORef (0 :: CUChar)
   dirRef <- newIORef True
   let updateBlue = do
         blue <- readIORef blueRef
-        --print blue
-        doFromTo 0 255 $ \y ->
-          doFromTo 0 255 $ \x ->
-        -- Here, writeArray was replaced with unsafeWrite. The latter does
-        -- not check that the index is within bounds which has a tremendous
-        -- effect on performance.
-        --  writeArray  pbData (2+x*chan+y*row) blue  -- safe checked indexing
-            unsafeWrite pbData (2+x*chan+y*row) blue  -- unchecked indexing
+        -- print blue
+        doFromTo 0 (h-1) $ \y ->
+          doFromTo 0 (w-1) $ \x ->
+            pokeByteOff pbData (0+x*chan+y*row) blue  -- unchecked indexing
 
         -- arrange for the canvas to be redrawn now that we've changed
         -- the Pixbuf
@@ -56,7 +60,7 @@
 
         -- update the blue state ready for next time
         dir <- readIORef dirRef
-        let diff = 4
+        let diff = 1
         let blue' = if dir then blue+diff else blue-diff
         if dir then
           if blue<=maxBound-diff then writeIORef blueRef blue' else
@@ -67,27 +71,17 @@
         return True
 
   idleAdd updateBlue priorityLow
-  canvas `on` exposeEvent $ updateCanvas pb
-  boxPackStartDefaults contain canvas
+  canvas `on` draw $ updateCanvas pbData w h stride
+  boxPackStart contain canvas PackGrow 0
   widgetShow canvas
   dialogRun dia
   return ()
 
-updateCanvas :: Pixbuf -> EventM EExpose Bool
-updateCanvas pb = do
-  win <- eventWindow
-  region <- eventRegion
-  liftIO $ do
-  gc <- gcNew win
-  width  <- pixbufGetWidth pb
-  height <- pixbufGetHeight pb
-  pbregion <- regionRectangle (Rectangle 0 0 width height)
-  regionIntersect region pbregion
-  rects <- regionGetRectangles region
---  putStrLn ("redrawing: "++show rects)
-  (flip mapM_) rects $ \(Rectangle x y w h) -> do
-    drawPixbuf win gc pb x y x y w h RgbDitherNone 0 0
-  return True
+updateCanvas :: PixelData -> Int -> Int -> Int -> Render ()
+updateCanvas pb w h stride = do
+  s <- liftIO $ createImageSurfaceForData pb FormatRGB24 w h stride
+  setSourceSurface s 0 0
+  paint
 
 -- GHC is much better at opimising loops like this:
 --
diff --git a/demo/gtkbuilder/GtkBuilderTest.hs b/demo/gtkbuilder/GtkBuilderTest.hs
--- a/demo/gtkbuilder/GtkBuilderTest.hs
+++ b/demo/gtkbuilder/GtkBuilderTest.hs
@@ -1,6 +1,7 @@
 module Main where
 
 import Graphics.UI.Gtk
+import Control.Monad.IO.Class (MonadIO(..))
 
 main = do
         initGUI
@@ -14,8 +15,8 @@
         button <- builderGetObject builder castToButton "button1"
 
         -- Basic user interation
-        button `onClicked` putStrLn "button pressed!"
-        window `onDestroy` mainQuit
+        on button buttonActivated $ putStrLn "button pressed!"
+        on window deleteEvent $ liftIO mainQuit >> return False
 
         -- Display the window
         widgetShowAll window
diff --git a/demo/hello/World.hs b/demo/hello/World.hs
--- a/demo/hello/World.hs
+++ b/demo/hello/World.hs
@@ -2,6 +2,7 @@
 module Main (Main.main) where
 
 import Graphics.UI.Gtk
+import Control.Monad.IO.Class (MonadIO(..))
 
 main :: IO ()
 main = do
@@ -11,7 +12,7 @@
   -- Here we connect the "destroy" event to a signal handler.
   -- This event occurs when we call widgetDestroy on the window
   -- or if the user closes the window.
-  onDestroy window mainQuit
+  on window destroyEvent $ liftIO mainQuit >> return False
   -- Sets the border width and tile of the window. Note that border width
   -- attribute is in 'Container' from which 'Window' is derived.
   set window [ containerBorderWidth := 10, windowTitle := "Hello World" ]
@@ -20,11 +21,11 @@
   set button [ buttonLabel := "Hello World" ]
   -- When the button receives the "clicked" signal, it will call the
   -- function given as the second argument.
-  onClicked button (putStrLn "Hello World")
+  on button buttonActivated (putStrLn "Hello World")
   -- Gtk+ allows several callbacks for the same event.
   -- This one will cause the window to be destroyed by calling
   -- widgetDestroy. The callbacks are called in the sequence they were added.
-  onClicked button $ do
+  on button buttonActivated $ do
     putStrLn "A \"clicked\"-handler to say \"destroy\""
     widgetDestroy window
   -- Insert the hello-world button into the window.
diff --git a/demo/inputmethod/Layout.hs b/demo/inputmethod/Layout.hs
--- a/demo/inputmethod/Layout.hs
+++ b/demo/inputmethod/Layout.hs
@@ -3,7 +3,6 @@
 import Data.IORef
 
 import Graphics.UI.Gtk
-import Graphics.UI.Gtk.Gdk.EventM
 import Graphics.Rendering.Cairo
 
 loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipisicing elit,\
@@ -50,7 +49,7 @@
   -- Create a drawing area in which we can render text.
   area <- drawingAreaNew
   containerAdd win area
-  on area sizeRequest $ return (Requisition 100 100)
+  widgetSetSizeRequest area 100 100
 
   -- Our widget's data
   buffer <- newIORef defaultBuffer
@@ -83,7 +82,7 @@
     layoutSetWidth lay (Just (fromIntegral w))
 
   -- Setup the handler to draw the layout.
-  on area exposeEvent $ updateArea area lay
+  on area draw $ updateArea area lay
 
   -- Set up input method
   im <- imMulticontextNew
@@ -109,7 +108,7 @@
       return False
 
   on win realize $ do
-      imContextSetClientWindow im . Just =<< widgetGetDrawWindow win
+      imContextSetClientWindow im =<< widgetGetWindow win
   on win focusInEvent  $ liftIO (imContextFocusIn  im) >> return False
   on win focusOutEvent $ liftIO (imContextFocusOut im) >> return False
   on win keyReleaseEvent $ imContextFilterKeypress im
@@ -124,15 +123,10 @@
   widgetShowAll win
   mainGUI
 
-updateArea :: DrawingArea -> PangoLayout -> EventM EExpose Bool
+updateArea :: DrawingArea -> PangoLayout -> Render ()
 updateArea area lay = do
-  win <- eventWindow
-  liftIO $ do
-  renderWithDrawable win $ do
     moveTo 0 0
     showLayout lay
-
-  return True
 
 interpretKeyPress :: EventM EKey (Maybe (Buffer -> Buffer))
 interpretKeyPress = do
diff --git a/demo/menu/ComboDemo.hs b/demo/menu/ComboDemo.hs
--- a/demo/menu/ComboDemo.hs
+++ b/demo/menu/ComboDemo.hs
@@ -5,15 +5,18 @@
 import Control.Monad ( liftM )
 import Data.Maybe ( fromMaybe )
 import Data.List ( findIndex )
+import Control.Monad.IO.Class (MonadIO(..))
 
 
 main = do
   initGUI
 
   win <- windowNew
-  onDestroy win mainQuit
+  on win deleteEvent $ liftIO mainQuit >> return False
 
-  combo <- comboBoxEntryNewText
+  combo <- comboBoxNewWithEntry
+  comboBoxSetModelText combo
+
   mapM_ (comboBoxAppendText combo)
     (words "ice-cream turkey pasta sandwich steak")
 
@@ -26,7 +29,7 @@
 
   -- Whenever the user has completed editing the text, append the new
   -- text to the store unless it's already in there.
-  onEntryActivate entry $ do
+  on entry entryActivated $ do
     str <- entryGetText entry
     store <- comboBoxGetModelText combo
     elems <- listStoreToList store
diff --git a/demo/menu/MenuDemo.hs b/demo/menu/MenuDemo.hs
--- a/demo/menu/MenuDemo.hs
+++ b/demo/menu/MenuDemo.hs
@@ -1,6 +1,7 @@
 module Main (main) where
 
 import Graphics.UI.Gtk
+import Control.Monad.IO.Class (MonadIO(..))
 
 {-
   widgets that go into making a menubar and submenus:
@@ -41,8 +42,8 @@
           = do item <- menuItemNewWithLabelOrMnemonic name
                menuShellAppend menu item
                case action of
-                 Just act -> onActivateLeaf item act
-                 Nothing  -> onActivateLeaf item (return ())
+                 Just act -> on item menuItemActivate act
+                 Nothing  -> on item menuItemActivate (return ())
       menuItemNewWithLabelOrMnemonic name
           | elem '_' name = menuItemNewWithMnemonic name
           | otherwise     = menuItemNewWithLabel name
@@ -65,6 +66,6 @@
        set window [ windowTitle := "Demo"
                   , containerChild := menuBar
                   ]
-       onDestroy window mainQuit
+       on window destroyEvent $ liftIO mainQuit >> return True
        widgetShowAll window
        mainGUI
diff --git a/demo/notebook/Notebook.hs b/demo/notebook/Notebook.hs
--- a/demo/notebook/Notebook.hs
+++ b/demo/notebook/Notebook.hs
@@ -5,7 +5,7 @@
 module Main where
 
 import Control.Monad
-import Control.Monad.Trans
+import Control.Monad.IO.Class
 import Data.Maybe
 import Graphics.UI.Gtk
 
@@ -40,7 +40,7 @@
          -- Create text view.
          textView <- textViewNew
          widgetShowAll textView -- must show before add notebook,
-                                -- otherwise notebook won't display child widget 
+                                -- otherwise notebook won't display child widget
                                 -- even have add in notebook.
 
          -- Create notebook tab.
@@ -62,11 +62,11 @@
            index ?>= \i -> notebookRemovePage notebook i
 
          return ()
-        
+
   -- Show window.
   window `containerAdd` notebook
   widgetShowAll window
-  onDestroy window mainQuit
+  on window deleteEvent $ liftIO mainQuit >> return False
   mainGUI
 
 -- | Create notebook tab.
@@ -77,7 +77,7 @@
   box <- hBoxNew False 0
   spinner <- spinnerNew
   label <- labelNew name
-  image <- imageNewFromIcon "gtk-close" iconSize
+  image <- imageNewFromIcon "window-close" iconSize
   closeButton <- toolButtonNew (Just image) Nothing
 
   -- Show.
@@ -89,7 +89,7 @@
 
 -- | Set tab name.
 notebookTabSetName :: NotebookTab -> String -> IO ()
-notebookTabSetName tab = 
+notebookTabSetName tab =
   labelSetText (ntLabel tab)
 
 -- | Start spinner animation.
@@ -108,11 +108,11 @@
   containerTryRemove box spinner
   spinnerStop spinner
 
--- | Create image widget with given icon name and size. 
+-- | Create image widget with given icon name and size.
 imageNewFromIcon :: String -> Int -> IO Image
 imageNewFromIcon iconName size = do
   iconTheme <- iconThemeGetDefault
-  pixbuf <- do 
+  pixbuf <- do
     -- Function 'iconThemeLoadIcon' can scale icon with specified size.
     pixbuf <- iconThemeLoadIcon iconTheme iconName size IconLookupUseBuiltin
     case pixbuf of
@@ -130,12 +130,12 @@
     boxPackStart box widget packing space
     order ?>= boxReorderChild box widget
 
--- | Try to remove child from parent.    
-containerTryRemove :: (ContainerClass parent, WidgetClass child) => parent -> child -> IO ()     
+-- | Try to remove child from parent.
+containerTryRemove :: (ContainerClass parent, WidgetClass child) => parent -> child -> IO ()
 containerTryRemove parent widget = do
   hasParent <- widgetGetParent widget
   unless (isNothing hasParent) $ containerRemove parent widget
 
 -- | Maybe.
-(?>=) :: Monad m => Maybe a -> (a -> m ()) -> m () 
+(?>=) :: Monad m => Maybe a -> (a -> m ()) -> m ()
 m ?>= f = maybe (return ()) f m
diff --git a/demo/statusicon/StatusIcon.hs b/demo/statusicon/StatusIcon.hs
--- a/demo/statusicon/StatusIcon.hs
+++ b/demo/statusicon/StatusIcon.hs
@@ -5,7 +5,7 @@
   initGUI
   icon <- statusIconNewFromStock stockQuit
   statusIconSetVisible icon True
-  statusIconSetTooltip icon "This is a test"
+  statusIconSetTooltipText icon $ Just "This is a test"
   menu <- mkmenu icon
   on icon statusIconPopupMenu $ \b a -> do
          widgetShowAll menu
@@ -17,12 +17,10 @@
 
 mkmenu s = do
   m <- menuNew
-  mapM_ (mkitem m) [("Let's blink!",statusIconSetBlinking s True)
-                   ,("Let's stop blink!",statusIconSetBlinking s False)
-                   ,("Quit",mainQuit)]
+  mapM_ (mkitem m) [("Quit",mainQuit)]
   return m
     where
         mkitem menu (label,act) =
             do i <- menuItemNewWithLabel label
                menuShellAppend menu i
-               on i menuItemActivate act
+               on i menuItemActivated act
diff --git a/demo/treelist/ListDemo.hs b/demo/treelist/ListDemo.hs
--- a/demo/treelist/ListDemo.hs
+++ b/demo/treelist/ListDemo.hs
@@ -1,5 +1,6 @@
 module Main where
 
+import Control.Monad.IO.Class
 import Graphics.UI.Gtk
 import System.Glib.Signals (on)
 import Data.List ( isPrefixOf )
@@ -11,7 +12,7 @@
   initGUI
 
   win <- windowNew
-  onDestroy win mainQuit
+  on win deleteEvent $ liftIO mainQuit >> return False
 
   -- create a new list model
   model <- listStoreNew
diff --git a/demo/treelist/TreeDemo.hs b/demo/treelist/TreeDemo.hs
--- a/demo/treelist/TreeDemo.hs
+++ b/demo/treelist/TreeDemo.hs
@@ -1,5 +1,6 @@
 module Main where
 
+import Control.Monad.IO.Class
 import Graphics.UI.Gtk
 import Graphics.UI.Gtk.ModelView as New
 
@@ -11,7 +12,7 @@
   initGUI
 
   win <- windowNew
-  onDestroy win mainQuit
+  on win deleteEvent $ liftIO mainQuit >> return False
 
   -- create a new tree model
   model <- storeImpl
diff --git a/demo/unicode/Arabic.hs b/demo/unicode/Arabic.hs
--- a/demo/unicode/Arabic.hs
+++ b/demo/unicode/Arabic.hs
@@ -3,6 +3,7 @@
 
 import Data.Char
 import Control.Exception
+import Control.Applicative
 
 main :: IO ()
 main = do
@@ -10,10 +11,10 @@
   dia <- dialogNew
   dialogAddButton dia stockYes ResponseYes
   dialogAddButton dia stockNo ResponseNo
-  contain <- dialogGetUpper dia
+  contain <- castToBox <$> dialogGetContentArea dia
   theText <- labelNew Nothing
   labelSetMarkup theText arabic
-  boxPackStartDefaults contain theText
+  boxPackStart contain theText PackNatural 0
   widgetShowAll dia
   res <- dialogRun dia
   case res of
@@ -34,9 +35,9 @@
 yell = do
   dia <- dialogNew
   dialogAddButton dia stockOk ResponseOk
-  contain <- dialogGetUpper dia
+  contain <- castToBox <$> dialogGetContentArea dia
   msg <- labelNew (Just "This is not an option.")
-  contain `boxPackStartDefaults` msg
+  boxPackStart contain msg PackNatural 0
   widgetShow msg
   dialogRun dia
   return ()
diff --git a/gtk.cabal b/gtk.cabal
--- a/gtk.cabal
+++ b/gtk.cabal
@@ -1,5 +1,5 @@
 Name:           gtk
-Version:        0.12.4
+Version:        0.12.5.0
 License:        LGPL-2.1
 License-file:   COPYING
 Copyright:      (c) 2001-2010 The Gtk2Hs Team
@@ -16,7 +16,7 @@
              for creating graphical user interfaces.
 Category:       Graphics
 Tested-With:    GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.1
-Extra-Source-Files: wingtk.h
+Extra-Source-Files: hsgtk.h
                     Graphics/UI/Gtk/ModelView/Gtk2HsStore.h
                     Graphics/UI/Gtk/General/hsgthread.h
                     template-hsc-gtk2hs.h
@@ -28,7 +28,6 @@
 x-Types-ModName:    Graphics.UI.Gtk.Types
 x-Types-Forward:    *System.Glib.GObject Graphics.UI.Gtk.General.Threading
 x-Types-Destructor: objectUnrefFromMainloop
-x-Types-Hierarchy:  hierarchy.list
 
 Data-Dir:       demo
 Data-Files:     actionMenu/ActionMenu.hs
@@ -111,8 +110,8 @@
                 demos.txt
                 
 Source-Repository head
-  type:         darcs
-  location:     http://code.haskell.org/gtk2hs/
+  type:         git
+  location:     https://github.com/gtk2hs/gtk2hs
   subdir:       gtk
 
 Flag deprecated
@@ -131,16 +130,16 @@
 Library
         build-depends:  base >= 4 && < 5,
                         array, containers, mtl, bytestring,
-                        glib  >= 0.12.0 && < 0.13,
-                        pango >= 0.12.0 && < 0.13,
-                        cairo >= 0.12.0 && < 0.13
+                        glib  >= 0.12.5 && < 0.13,
+                        pango >= 0.12.5 && < 0.13,
+                        cairo >= 0.12.5 && < 0.13
         if flag(have-gio)
-          build-depends: gio >= 0.12.0 && < 0.13
+          build-depends: gio >= 0.12.5 && < 0.13
           cpp-options:    -DHAVE_GIO
         if flag(have-quartz-gtk)
           cpp-options:    -DHAVE_QUARTZ_GTK
 
-        build-tools:    gtk2hsC2hs >= 0.13.5,
+        build-tools:    gtk2hsC2hs >= 0.13.8,
                         gtk2hsHookGenerator, gtk2hsTypeGen
 
         exposed-modules:
@@ -216,6 +215,7 @@
           Graphics.UI.Gtk.General.IconTheme
           Graphics.UI.Gtk.General.RcStyle
           Graphics.UI.Gtk.General.Selection
+          Graphics.UI.Gtk.General.Settings
           Graphics.UI.Gtk.General.StockItems
           Graphics.UI.Gtk.General.Style
           Graphics.UI.Gtk.Layout.Alignment
@@ -355,7 +355,7 @@
 
         extensions:     ForeignFunctionInterface
         c-sources: Graphics/UI/Gtk/ModelView/Gtk2HsStore.c
-                   Graphics/UI/Gtk/General/hsgthread.c
+                   Graphics/UI/Gtk/General/hsgthread.cpp
           -- Due to http://hackage.haskell.org/trac/ghc/ticket/781
         -- we need to compile the hsgthread.c module with -fPIC to ensure that a global
         -- variable in GLib that holds the address for the mutex lock and unlock functions
@@ -375,12 +375,16 @@
         else
           x-Types-Tag:  deprecated 
         if os(windows)
-          x-c2hs-Header:  wingtk.h
           cpp-options:    -DWIN32
           extra-libraries: kernel32
-        else
-          x-c2hs-Header:  gtk/gtk.h
 
-        x-Types-Tag:     default plugNsocket
+        x-c2hs-Header:  hsgtk.h
+        x-Types-Hierarchy:  hierarchy.list
+
+        if os(windows) || flag(have-quartz-gtk)
+          x-Types-Tag: default
+        else
+          x-Types-Tag: default plugNsocket
+          cpp-options: -DHAVE_PLUG_AND_SOCKET
 
         pkgconfig-depends: gthread-2.0, gtk+-2.0
diff --git a/hsgtk.h b/hsgtk.h
new file mode 100644
--- /dev/null
+++ b/hsgtk.h
@@ -0,0 +1,72 @@
+#include <gtk/gtk.h>
+/* these are necessary on Win32 to circumvent the strcuture size check */
+#undef gtk_init_check
+#undef gtk_init
+
+#if GTK_MAJOR_VERSION >= 3
+#include <gtk/gtkx.h>
+#endif
+
+#undef Bool
+#undef True
+#undef False
+#undef Button1 
+#undef Button2
+#undef Button3
+#undef Button4
+#undef Button5
+#undef Button1Mask 
+#undef Button2Mask
+#undef Button3Mask
+#undef Button4Mask
+#undef Button5Mask
+
+#undef ShiftMask
+#undef LockMask
+#undef ControlMask
+#undef Mod1Mask
+#undef Mod2Mask
+#undef Mod3Mask
+#undef Mod4Mask
+#undef Mod5Mask
+
+#undef None
+#undef ParentRelative
+#undef CopyFromParent
+#undef PointerWindow
+#undef InputFocus
+#undef PointerRoot
+#undef AnyPropertyType
+#undef AnyKey
+#undef AnyButton
+#undef AllTemporary
+#undef CurrentTime
+#undef NoSymbol
+
+#undef NoEventMask
+#undef KeyPressMask
+#undef KeyReleaseMask
+#undef ButtonPressMask
+#undef ButtonReleaseMask
+#undef EnterWindowMask
+#undef LeaveWindowMask
+#undef PointerMotionMask
+#undef PointerMotionHintMask
+#undef Button1MotionMask
+#undef Button2MotionMask
+#undef Button3MotionMask
+#undef Button4MotionMask
+#undef Button5MotionMask
+#undef ButtonMotionMask
+#undef KeymapStateMask
+#undef ExposureMask
+#undef VisibilityChangeMask
+#undef StructureNotifyMask
+#undef ResizeRedirectMask
+#undef SubstructureNotifyMask
+#undef SubstructureRedirectMask
+#undef FocusChangeMask
+#undef PropertyChangeMask
+#undef ColormapChangeMask
+#undef OwnerGrabButtonMask
+
diff --git a/wingtk.h b/wingtk.h
deleted file mode 100644
--- a/wingtk.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <gtk/gtk.h>
-/* these are necessary on Win32 to circumvent the strcuture size check */
-#undef gtk_init_check
-#undef gtk_init
-
