Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 3 files changed
  • 0 comments
  • 1 contributor

Showing 3 changed files with 32 additions and 11 deletions. Show diff stats Hide diff stats

  1. +8 5 Scope/Types.hs
  2. +23 5 scope.cabal
  3. +1 1  src/GUI.hs
13 Scope/Types.hs
@@ -70,7 +70,6 @@ import Data.Iteratee (Enumeratee)
70 70 import Data.ZoomCache
71 71
72 72 import qualified Graphics.Rendering.Cairo as C
73   -import qualified Graphics.UI.Gtk as G
74 73
75 74 ----------------------------------------------------------------------
76 75
@@ -170,9 +169,13 @@ data Scope = Scope
170 169 , layers :: [ScopeLayer]
171 170 }
172 171
  172 +-- temporary
  173 +data DrawingArea = DA
  174 +data Adjustment = A
  175 +
173 176 data View = View
174   - { canvas :: G.DrawingArea
175   - , adj :: G.Adjustment
  177 + { canvas :: DrawingArea
  178 + , adj :: Adjustment
176 179 , viewX1 :: DataX
177 180 , viewY1 :: Double
178 181 , viewX2 :: DataX
@@ -180,13 +183,13 @@ data View = View
180 183 , dragDX :: Maybe DataX -- DataX of pointer at drag down
181 184 }
182 185
183   -scopeNew :: G.DrawingArea -> G.Adjustment -> Scope
  186 +scopeNew :: DrawingArea -> Adjustment -> Scope
184 187 scopeNew c adj = Scope {
185 188 view = viewInit c adj
186 189 , layers = []
187 190 }
188 191
189   -viewInit :: G.DrawingArea -> G.Adjustment -> View
  192 +viewInit :: DrawingArea -> Adjustment -> View
190 193 viewInit c adj = View c adj (DataX 0.0) (-1.0) (DataX 1.0) 1.0 Nothing
191 194
192 195 ----------------------------------------------------------------------
28 scope.cabal
@@ -54,6 +54,13 @@ Data-Files:
54 54 flag splitBase
55 55 description: Use the split-up base package.
56 56
  57 +flag cocoa
  58 + description: native cocoa backend
  59 + default: False
  60 +
  61 +flag gtk
  62 + description: gtk backend
  63 +
57 64 Library
58 65 if flag(splitBase)
59 66 build-depends:
@@ -62,9 +69,15 @@ Library
62 69 build-depends:
63 70 base < 3
64 71
  72 + if flag(cocoa)
  73 + build-depends: lrw-cocoa
  74 +
  75 + if flag(gtk)
  76 + build-depends: lrw-gtk
  77 +
65 78 Build-Depends:
66 79 cairo,
67   - gtk,
  80 + lrw,
68 81 iteratee >= 0.8.6.0 && < 0.9,
69 82 MonadCatchIO-transformers > 0.2 && < 0.3,
70 83 mtl >= 2.0.0.0 && < 3,
@@ -74,7 +87,7 @@ Library
74 87 Scope.View
75 88 Scope.Types
76 89
77   -Executable scope
  90 +Executable scope-lrw
78 91 if flag(splitBase)
79 92 build-depends:
80 93 base >= 3 && < 6
@@ -82,6 +95,12 @@ Executable scope
82 95 build-depends:
83 96 base < 3
84 97
  98 + if flag(cocoa)
  99 + build-depends: lrw-cocoa
  100 +
  101 + if flag(gtk)
  102 + build-depends: lrw-gtk
  103 +
85 104 Main-Is: main.hs
86 105 Other-Modules: Children
87 106 GUI
@@ -89,8 +108,7 @@ Executable scope
89 108 Build-Depends:
90 109 cairo,
91 110 containers >= 0.2 && < 0.5,
92   - glib,
93   - gtk,
  111 + lrw,
94 112 iteratee >= 0.8.6.0 && < 0.9,
95 113 MonadCatchIO-transformers > 0.2 && < 0.3,
96 114 mtl >= 2.0.0.0 && < 3,
@@ -102,4 +120,4 @@ Executable scope
102 120 --
103 121 source-repository head
104 122 type: git
105   - location: git://github.com/kfish/scope.git
  123 + location: git://github.com/JohnLato/scope.git
2  src/GUI.hs
@@ -27,7 +27,7 @@ import Data.List (groupBy)
27 27 import Data.Maybe
28 28 import qualified Data.Iteratee as I
29 29 import Data.ZoomCache.Numeric
30   -import qualified Graphics.UI.Gtk as G
  30 +-- import qualified Graphics.UI.Gtk as G
31 31 import qualified Graphics.Rendering.Cairo as C
32 32 import Graphics.Rendering.Cairo.Internal (Render(..))
33 33 import Graphics.Rendering.Cairo.Types (Cairo)

No commit comments for this range

Something went wrong with that request. Please try again.