comparison dstep/coreservices/carboncore/Timer.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
comparison
equal deleted inserted replaced
10:27e00625790b 11:07194b026fa4
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Jul 21, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.coreservices.carboncore.Timer;
8
9 //import dstep.AvailabilityMacros;
10 import dstep.coreservices.carboncore.ConditionalMacros;
11 import dstep.coreservices.carboncore.MacTypes;
12 import dstep.coreservices.carboncore.OSUtils;
13
14 alias TMTask* TMTaskPtr;
15 alias TimerProcPtr TimerUPP;
16
17 extern (C)
18 {
19 alias void function (TMTaskPtr) TimerProcPtr;
20 }
21
22 enum
23 {
24 kTMTaskActive = (1L << 15)
25 }
26
27 struct TMTask
28 {
29 QElemPtr qLink;
30 short qType;
31 TimerUPP tmAddr;
32 int tmCount;
33 int tmWakeUp;
34 int tmReserved;
35 }
36
37 extern (C)
38 {
39 void Microseconds (UnsignedWide* microTickCount);
40 void InsTime (QElemPtr tmTaskPtr);
41 void InsXTime (QElemPtr tmTaskPtr);
42 void PrimeTime (QElemPtr tmTaskPtr, int count);
43 void RmvTime (QElemPtr tmTaskPtr);
44 short InstallTimeTask (QElemPtr tmTaskPtr);
45 short InstallXTimeTask (QElemPtr tmTaskPtr);
46 short PrimeTimeTask (QElemPtr tmTaskPtr, int count);
47 short RemoveTimeTask (QElemPtr tmTaskPtr);
48 TimerUPP NewTimerUPP (TimerProcPtr userRoutine);
49 void DisposeTimerUPP (TimerUPP userUPP);
50 void InvokeTimerUPP (TMTaskPtr tmTaskPtr, TimerUPP userUPP);
51 }