-
Notifications
You must be signed in to change notification settings - Fork 2
/
asyncScreenObj.h
executable file
·81 lines (71 loc) · 2.37 KB
/
asyncScreenObj.h
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
#ifndef __ASYNCSCREENOBJ_H__
#define __ASYNCSCREENOBJ_H__ "$Id: asyncScreenObj.h,v 1.1 2006-10-16 22:45:26 ericn Exp $"
/*
* asyncScreenObj.h
*
* This header file declares the asyncScreenObject_t class to
* enforce a standard for updating on-screen objects
* displayed by the SM-501's command-list interpreter.
*
* The general notion is that an on-screen object contains
* three pieces of state:
*
* 1. Its' on-screen state
* 2. The state of its' command in a command-list
* 3. Its' desired state
*
* Updates to 1 and 2 must be synchronized such that the
* command-list interpreter is not running while the command
* list entry is being fixed up.
*
* Updates to number 2 and three must also be synchronized
* so that the desired state is not partially updated during
* the command-list fixup.
*
* In general, the on-screen state is updated by the command
* list interpreter from the vertical-sync signal by sending
* the command-list to the SM-501 driver, and completed is
* signalled through command-list-complete signal. State #2
* is normally updated in the command-list-complete handler.
*
* State #3 is normally set by the application in either main-line
* code or a lower-priority signal handler.
*
*
* Change History :
*
* $Log: asyncScreenObj.h,v $
* Revision 1.1 2006-10-16 22:45:26 ericn
* -Initial import
*
*
*
* Copyright Boundary Devices, Inc. 2006
*/
#include "fbCmdList.h"
class asyncScreenObject_t {
public:
asyncScreenObject_t( fbCommandList_t &cmdList );
virtual ~asyncScreenObject_t();
// This function signals completion of on-screen update
//
// It may be over-ridden by derived classes to copy the
// command-list state to the on-screen state
//
virtual void executed();
// This function must be provided by derived classes
// to actually fix up the command list entry or entries
virtual void updateCommandList() = 0 ;
// This function should be called by updateCommandList() and
// the command list should only be updated if it returns false.
bool valueBeingSet(void) const ;
// Routines to set the desired state should call these
// routines at the beginning and end of update to prevent
// the updateCommandList() routine from updating the data
void setValueStart();
void setValueEnd();
protected:
fbCommandList_t &cmdList_ ;
unsigned setValueFlag_ ;
};
#endif