Skip to content

Commit

Permalink
Fix for building leksah with yi on older gdk/gtk
Browse files Browse the repository at this point in the history
  • Loading branch information
jaccokrijnen committed May 31, 2016
1 parent 48ca7dc commit 25e4173
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/IDE/TextEditor/Yi.hs
Expand Up @@ -46,8 +46,10 @@ import GI.Gtk
widgetGrabFocus, toWidget, widgetGetWindow)
import Data.GI.Base.Constructible (Constructible(..))
import GI.Gdk
(eventButtonReadState, rectangleHeight, rectangleWidth, rectangleY,
rectangleX, Rectangle(..))
(eventButtonReadState)
import Graphics.UI.Frame.Rectangle
(rectangleHeight, rectangleWidth, rectangleY,
rectangleX, Rectangle(..), newRectangle)
import Data.GI.Base.Attributes (AttrOp(..))
import GI.Pango (layoutSetFontDescription)
import Yi (nelemsB, readAtB, moveB)
Expand Down Expand Up @@ -214,9 +216,9 @@ instance TextEditor Yi where
bufferToWindowCoords (YiView v) point = return point -- TODO
drawTabs (YiView _) = return () -- TODO
getBuffer (YiView v) = return $ YiBuffer $ Yi.getBuffer v
getWindow (YiView v) = liftIO $ widgetGetWindow (drawArea v)
getWindow (YiView v) = liftIO $ Just <$> widgetGetWindow (drawArea v)
getIterAtLocation (YiView View{viewFBufRef = b}) x y = return $ mkYiIter' b $ Point 0 -- TODO
getIterLocation (YiView v) (YiIter i) = new Rectangle
getIterLocation (YiView v) (YiIter i) = newRectangle
[ rectangleX := 0 -- TODO
, rectangleY := 0
, rectangleWidth := 0
Expand Down

0 comments on commit 25e4173

Please sign in to comment.