summaryrefslogtreecommitdiff
path: root/tvision/include/tv/eventqu.h
blob: b25bf351b80123064bacd86296041f6a20972b55 (plain)
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
/*
 *      Turbo Vision - Version 2.0
 *
 *      Copyright (c) 1994 by Borland International
 *      All Rights Reserved.
 *

Modified by Robert H”hne to be used for RHIDE.

 *
 *
 */

#if defined( Uses_TEventQueue ) && !defined( __TEventQueue )
#define __TEventQueue

class CLY_EXPORT TEventQueue
{
public:
    TEventQueue();
    ~TEventQueue();

    static void getMouseEvent( TEvent& );
    static void suspend();
    static void resume();

    friend class TView;
    friend void genRefs();
    friend class TProgram;
    static ushort doubleDelay;
    static Boolean mouseReverse;

private:

    static TMouse *mouse;
    static void getMouseState( TEvent& );
    static void mouseInt();

    static void setLast( TEvent& );

    static MouseEventType lastMouse;
public:
    static MouseEventType curMouse;
private:
    static MouseEventType downMouse;
    static ushort downTicks;

    static ushort * Ticks;
    static TEvent eventQueue[ eventQSize ];
    static TEvent * eventQHead;
    static TEvent * eventQTail;
    static Boolean mouseIntFlag;
    static ushort eventCount;

    static Boolean mouseEvents;

    static ushort repeatDelay;
    static ushort autoTicks;
    static ushort autoDelay;

    friend class THWMouse;
    friend class THWMouseDOS;
};

inline void TEvent::getMouseEvent()
{
    TEventQueue::getMouseEvent( *this );
}

#endif  // Uses_TEventQueue