summaryrefslogtreecommitdiff
path: root/comm/TkMultiplexer.h
blob: c1ecded996466284fe0595a06cf192db3a8d52fa (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
/*
 *	The Unix Channel
 *
 *	by Michel Beaudouin-Lafon and Stephane Chatty
 *
 *	Copyright 1990-1993
 *	Laboratoire de Recherche en Informatique (LRI)
 *	Centre d'Etudes de la Navigation Aerienne
 *
 *	Tk-based multiplexers
 *
 *	$Id$
 *	$CurLog$
 */

#ifndef TkMultiplexer_H_
#define TkMultiplexer_H_

#include "Multiplexer.h"
extern "C" {
#include "tk.h"
}

class UchTkMultiplexer : public UchBaseMultiplexer {
private:
static	void	FireSignals (ClientData);
static	void	FireTimers (ClientData);

protected:
	bool	Active [NFILE];
	Tk_TimerToken	TimeOut;

	void	SetMasks (int, IOMODE);
	void	SetTimeOut (Millisecond);
	void	SuppressTimeOut ();
	void	AddSignalHook ();
	MPX_RES	Loop ();

public:
		UchTkMultiplexer ();
		~UchTkMultiplexer ();
};

#endif	/* TkMultiplexer_H_ */