~ubuntu-branches/ubuntu/wily/haskell-gtk/wily-proposed

« back to all changes in this revision

Viewing changes to Graphics/UI/Gtk/General/Structs.hsc

  • Committer: Package Import Robot
  • Author(s): Clint Adams
  • Date: 2012-05-05 23:57:40 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120505235740-6cmyircomearaqbq
Tags: 0.12.3-1
* New upstream version.
* Bump to Standards-Version 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
import Graphics.UI.Gtk.General.DNDTypes (InfoId, Atom(Atom) , SelectionTag,
120
120
                                         TargetTag, SelectionTypeTag)
121
121
import Graphics.Rendering.Pango.Structs ( Color(..), Rectangle(..) )
 
122
#if !defined(WIN32) || GTK_CHECK_VERSION(2,14,0)
 
123
#else
 
124
import Unsafe.Coerce
 
125
#endif
122
126
-- | Represents the x and y coordinate of a point.
123
127
--
124
128
type Point = (Int, Int)
605
609
  liftM toNativeWindowId $
606
610
  (\(Drawable drawable) ->
607
611
#if defined(WIN32)
 
612
#if GTK_CHECK_VERSION(2,14,0)
 
613
#else
 
614
     -- GTK-2.12 is a bit sloppy about the distinction between pointers and
 
615
     -- 32-bit ints, so we have to mimic that sloppiness here
 
616
     liftM unsafeCoerce $
 
617
#endif
608
618
     withForeignPtr drawable gdk_win32_drawable_get_handle
609
619
#elif !defined(HAVE_QUARTZ_GTK)
610
620
     withForeignPtr drawable gdk_x11_drawable_get_xid