File: Callbacks.hs

package info (click to toggle)
haskell-glut 2.4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,624 kB
  • ctags: 28
  • sloc: haskell: 10,610; ansic: 121; makefile: 2
file content (201 lines) | stat: -rw-r--r-- 5,939 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
{-# LANGUAGE ForeignFunctionInterface #-}
-- #hide
-----------------------------------------------------------------------------
-- |
-- Module      :  Graphics.UI.GLUT.Raw.Callbacks
-- Copyright   :  (c) Sven Panne 2009
-- License     :  BSD-style (see the file LICENSE)
--
-- Maintainer  :  sven.panne@aedion.de
-- Stability   :  stable
-- Portability :  portable
--
-- All GLUT callbacks.
--
-----------------------------------------------------------------------------

module Graphics.UI.GLUT.Raw.Callbacks (
   MenuFunc, makeMenuFunc,
   ButtonBoxFunc, makeButtonBoxFunc,
   CloseFunc, makeCloseFunc,
   DialsFunc, makeDialsFunc,
   DisplayFunc, makeDisplayFunc,
   EntryFunc, makeEntryFunc,
   IdleFunc, makeIdleFunc,
   JoystickFunc, makeJoystickFunc,
   KeyboardFunc, makeKeyboardFunc,
   KeyboardUpFunc, makeKeyboardUpFunc,
   MenuDestroyFunc, makeMenuDestroyFunc,
   MenuStateFunc, makeMenuStateFunc,
   MenuStatusFunc, makeMenuStatusFunc,
   MotionFunc, makeMotionFunc,
   MouseFunc, makeMouseFunc,
   MouseWheelFunc, makeMouseWheelFunc,
   OverlayDisplayFunc, makeOverlayDisplayFunc,
   PassiveMotionFunc, makePassiveMotionFunc,
   ReshapeFunc, makeReshapeFunc,
   SpaceballButtonFunc, makeSpaceballButtonFunc,
   SpaceballMotionFunc, makeSpaceballMotionFunc,
   SpaceballRotateFunc, makeSpaceballRotateFunc,
   SpecialFunc, makeSpecialFunc,
   SpecialUpFunc, makeSpecialUpFunc,
   TabletButtonFunc, makeTabletButtonFunc,
   TabletMotionFunc, makeTabletMotionFunc,
   TimerFunc, makeTimerFunc,
   VisibilityFunc, makeVisibilityFunc,
   WMCloseFunc, makeWMCloseFunc,
   WindowStatusFunc, makeWindowStatusFunc
) where

import Foreign.C.Types
import Foreign.Ptr

type MenuFunc = CInt -> IO ()

foreign import ccall "wrapper"
   makeMenuFunc :: MenuFunc -> IO (FunPtr MenuFunc)

type ButtonBoxFunc = CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeButtonBoxFunc :: ButtonBoxFunc -> IO (FunPtr ButtonBoxFunc)

type CloseFunc = IO ()

foreign import ccall "wrapper"
   makeCloseFunc :: CloseFunc -> IO (FunPtr CloseFunc)

type DialsFunc = CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeDialsFunc :: DialsFunc -> IO (FunPtr DialsFunc)

type DisplayFunc = IO ()

foreign import ccall "wrapper"
   makeDisplayFunc :: DisplayFunc -> IO (FunPtr DisplayFunc)

type EntryFunc = CInt -> IO ()

foreign import ccall "wrapper"
   makeEntryFunc :: EntryFunc -> IO (FunPtr EntryFunc)

type IdleFunc = IO ()

foreign import ccall "wrapper"
   makeIdleFunc :: IdleFunc -> IO (FunPtr IdleFunc)

type JoystickFunc = CUInt -> CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeJoystickFunc :: JoystickFunc -> IO (FunPtr JoystickFunc)

type KeyboardFunc = CUChar -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeKeyboardFunc :: KeyboardFunc -> IO (FunPtr KeyboardFunc)

type KeyboardUpFunc = CUChar -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeKeyboardUpFunc :: KeyboardUpFunc -> IO (FunPtr KeyboardUpFunc)

type MenuDestroyFunc = IO ()

foreign import ccall "wrapper"
   makeMenuDestroyFunc :: MenuDestroyFunc -> IO (FunPtr MenuDestroyFunc)

type MenuStateFunc = CInt -> IO ()

foreign import ccall "wrapper"
   makeMenuStateFunc :: MenuStateFunc -> IO (FunPtr MenuStateFunc)

type MenuStatusFunc = CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeMenuStatusFunc :: MenuStatusFunc -> IO (FunPtr MenuStatusFunc)

type MotionFunc = CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeMotionFunc :: MotionFunc -> IO (FunPtr MotionFunc)

type MouseFunc = CInt -> CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeMouseFunc :: MouseFunc -> IO (FunPtr MouseFunc)

type MouseWheelFunc = CInt -> CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeMouseWheelFunc :: MouseWheelFunc -> IO (FunPtr MouseWheelFunc)

type OverlayDisplayFunc = IO ()

foreign import ccall "wrapper"
   makeOverlayDisplayFunc :: OverlayDisplayFunc -> IO (FunPtr OverlayDisplayFunc)

type PassiveMotionFunc = CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makePassiveMotionFunc :: PassiveMotionFunc -> IO (FunPtr PassiveMotionFunc)

type ReshapeFunc = CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeReshapeFunc :: ReshapeFunc -> IO (FunPtr ReshapeFunc)

type SpaceballButtonFunc = CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeSpaceballButtonFunc :: SpaceballButtonFunc -> IO (FunPtr SpaceballButtonFunc)

type SpaceballMotionFunc = CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeSpaceballMotionFunc :: SpaceballMotionFunc -> IO (FunPtr SpaceballMotionFunc)

type SpaceballRotateFunc = CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeSpaceballRotateFunc :: SpaceballRotateFunc -> IO (FunPtr SpaceballRotateFunc)

type SpecialFunc = CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeSpecialFunc :: SpecialFunc -> IO (FunPtr SpecialFunc)

type SpecialUpFunc = CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeSpecialUpFunc :: SpecialUpFunc -> IO (FunPtr SpecialUpFunc)

type TabletButtonFunc = CInt -> CInt -> CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeTabletButtonFunc :: TabletButtonFunc -> IO (FunPtr TabletButtonFunc)

type TabletMotionFunc = CInt -> CInt -> IO ()

foreign import ccall "wrapper"
   makeTabletMotionFunc :: TabletMotionFunc -> IO (FunPtr TabletMotionFunc)

type TimerFunc = CInt -> IO ()

foreign import ccall "wrapper"
   makeTimerFunc :: TimerFunc -> IO (FunPtr TimerFunc)

type VisibilityFunc = CInt -> IO ()

foreign import ccall "wrapper"
   makeVisibilityFunc :: VisibilityFunc -> IO (FunPtr VisibilityFunc)

type WMCloseFunc = IO ()

foreign import ccall "wrapper"
   makeWMCloseFunc :: WMCloseFunc -> IO (FunPtr WMCloseFunc)

type WindowStatusFunc = CInt -> IO ()

foreign import ccall "wrapper"
   makeWindowStatusFunc :: WindowStatusFunc -> IO (FunPtr WindowStatusFunc)