File: Types.hs

package info (click to toggle)
threadscope 0.2.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 580 kB
  • sloc: haskell: 5,457; ansic: 10; makefile: 7
file content (37 lines) | stat: -rw-r--r-- 1,171 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module GUI.Timeline.Types (
    TimelineState(..),
    TimeSelection(..),
 ) where


import GUI.Types

import Graphics.UI.Gtk
import Graphics.Rendering.Cairo
import Data.IORef

-----------------------------------------------------------------------------

data TimelineState = TimelineState {
       timelineDrawingArea :: DrawingArea,
       timelineYScaleArea  :: DrawingArea,
       timelineXScaleArea  :: DrawingArea,
       timelineAdj         :: Adjustment,
       timelineVAdj        :: Adjustment,

       timelinePrevView    :: IORef (Maybe (ViewParameters, Surface)),

       -- This scale value is used to map a micro-second value to a pixel unit.
       -- To convert a timestamp value to a pixel value, multiply it by scale.
       -- To convert a pixel value to a micro-second value, divide it by scale.
       scaleIORef          :: IORef Double,

       -- Maximal number of sparks/slice measured after every zoom to fit.
       maxSpkIORef         :: IORef Double
     }


data TimeSelection = PointSelection Timestamp
                   | RangeSelection Timestamp Timestamp

-----------------------------------------------------------------------------