Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: kfish/scope
base: master
...
head fork: JohnLato/scope
compare: lrw
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 32 additions and 11 deletions.
  1. +8 −5 Scope/Types.hs
  2. +23 −5 scope.cabal
  3. +1 −1  src/GUI.hs
View
13 Scope/Types.hs
@@ -70,7 +70,6 @@ import Data.Iteratee (Enumeratee)
import Data.ZoomCache
import qualified Graphics.Rendering.Cairo as C
-import qualified Graphics.UI.Gtk as G
----------------------------------------------------------------------
@@ -170,9 +169,13 @@ data Scope = Scope
, layers :: [ScopeLayer]
}
+-- temporary
+data DrawingArea = DA
+data Adjustment = A
+
data View = View
- { canvas :: G.DrawingArea
- , adj :: G.Adjustment
+ { canvas :: DrawingArea
+ , adj :: Adjustment
, viewX1 :: DataX
, viewY1 :: Double
, viewX2 :: DataX
@@ -180,13 +183,13 @@ data View = View
, dragDX :: Maybe DataX -- DataX of pointer at drag down
}
-scopeNew :: G.DrawingArea -> G.Adjustment -> Scope
+scopeNew :: DrawingArea -> Adjustment -> Scope
scopeNew c adj = Scope {
view = viewInit c adj
, layers = []
}
-viewInit :: G.DrawingArea -> G.Adjustment -> View
+viewInit :: DrawingArea -> Adjustment -> View
viewInit c adj = View c adj (DataX 0.0) (-1.0) (DataX 1.0) 1.0 Nothing
----------------------------------------------------------------------
View
28 scope.cabal
@@ -54,6 +54,13 @@ Data-Files:
flag splitBase
description: Use the split-up base package.
+flag cocoa
+ description: native cocoa backend
+ default: False
+
+flag gtk
+ description: gtk backend
+
Library
if flag(splitBase)
build-depends:
@@ -62,9 +69,15 @@ Library
build-depends:
base < 3
+ if flag(cocoa)
+ build-depends: lrw-cocoa
+
+ if flag(gtk)
+ build-depends: lrw-gtk
+
Build-Depends:
cairo,
- gtk,
+ lrw,
iteratee >= 0.8.6.0 && < 0.9,
MonadCatchIO-transformers > 0.2 && < 0.3,
mtl >= 2.0.0.0 && < 3,
@@ -74,7 +87,7 @@ Library
Scope.View
Scope.Types
-Executable scope
+Executable scope-lrw
if flag(splitBase)
build-depends:
base >= 3 && < 6
@@ -82,6 +95,12 @@ Executable scope
build-depends:
base < 3
+ if flag(cocoa)
+ build-depends: lrw-cocoa
+
+ if flag(gtk)
+ build-depends: lrw-gtk
+
Main-Is: main.hs
Other-Modules: Children
GUI
@@ -89,8 +108,7 @@ Executable scope
Build-Depends:
cairo,
containers >= 0.2 && < 0.5,
- glib,
- gtk,
+ lrw,
iteratee >= 0.8.6.0 && < 0.9,
MonadCatchIO-transformers > 0.2 && < 0.3,
mtl >= 2.0.0.0 && < 3,
@@ -102,4 +120,4 @@ Executable scope
--
source-repository head
type: git
- location: git://github.com/kfish/scope.git
+ location: git://github.com/JohnLato/scope.git
View
2  src/GUI.hs
@@ -27,7 +27,7 @@ import Data.List (groupBy)
import Data.Maybe
import qualified Data.Iteratee as I
import Data.ZoomCache.Numeric
-import qualified Graphics.UI.Gtk as G
+-- import qualified Graphics.UI.Gtk as G
import qualified Graphics.Rendering.Cairo as C
import Graphics.Rendering.Cairo.Internal (Render(..))
import Graphics.Rendering.Cairo.Types (Cairo)

No commit comments for this range

Something went wrong with that request. Please try again.