source: trunk/src/kernel32/console/vio32SharedData.h@ 10010

Last change on this file since 10010 was 5024, checked in by sandervl, 25 years ago

added preliminary console code

File size: 1.4 KB
Line 
1#if !defined (KBD32_SHARED_DATA_H)
2#define KBD32_SHARED_DATA_H
3
4#include "vio32Private.h"
5#include "vio32Utils.h"
6
7
8// this object represents the shared memory
9class kbd32SharedData {
10 // size of the partially used buffer
11 int nOfWindows;
12 // the hwnd client
13 HWND clientWindows[MAX_VIO32];
14 // the hwnd frame
15 HWND frameWindows[MAX_VIO32];
16 // the task to be served
17 ULONG processId[MAX_VIO32];
18 // the task to be served
19 ULONG mode[MAX_VIO32];
20 //
21 VIO32EVENTINFO events[MAX_VIO32*MAX_PRIMARY_Q_LEN];
22 //
23 VIO32EVENTINFO *pos[MAX_VIO32];
24
25public:
26 ///
27 void Init();
28 /// installs a patch for the vio kbd stream for the current task
29 APIRET InstallApplication(ULONG pid,BOOL windowed=TRUE);
30 ///
31 APIRET UninstallApplication(ULONG pid);
32 ///
33 APIRET SetMode(ULONG mode,ULONG pid);
34 ///
35 APIRET GetMode(ULONG &mode,ULONG pid);
36 /// gets a buffer
37 VIO32EVENTINFO *getBuffer(int ix);
38 /// automatically updates the pointer
39 void advanceBuffer(int ix){ pos[ix]++; }
40 ///
41 BOOL searchByHwndClient(HWND hwndClient,HWND &hwndFrame,PID &pid,int &ix);
42 ///
43 BOOL searchByHwndFrame(HWND hwndFrame,HWND &hwndClient,PID &pid,int &ix);
44 ///
45 BOOL searchByPid(PID pid,HWND &hwndClient,HWND &hwndFrame,int &ix);
46 ///
47 ULONG getMode(int ix){ return mode[ix]; }
48};
49
50
51
52
53
54#endif
Note: See TracBrowser for help on using the repository browser.