Debian Codegraph @

source/control.h

raw
1 // ----------------------------------------------------------------------------
2 //
3 // Copyright (C) 2003-2013 Fons Adriaensen <[email protected]>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // ----------------------------------------------------------------------------
19
20
21 #ifndef __CONTROL_H
22 #define __CONTROL_H
23
24
25 #include <clthreads.h>
26 #include <clxclient.h>
27 #include "mainwin.h"
28 #include "captwin.h"
29 #include "filewin.h"
30 #include "sgenwin.h"
31
32
33 class Control : public A_thread, public X_callback
34 {
35 public:
36
37 Control (X_display *display, X_resman *resman);
38 ~Control (void);
39
40 virtual void thr_main (void);
41
42 void stop (void);
43
44 private:
45
46 enum { INIT, TERM };
47
48 virtual void handle_callb (int, X_window *, XEvent *);
49
50 void init (void);
51 void fini (void);
52 void handle_event (int);
53 void handle_mesg (ITC_mesg *);
54 void handle_prog (void);
55 void handle_time (void);
56 void makesess (void);
57
58 X_display *_display;
59 X_resman *_resman;
60 X_handler *_xhandler;
61 X_rootwin *_rootwin;
62 Mainwin *_mainwin;
63 Editwin *_editwin;
64 Captwin *_captwin;
65 Filewin *_filewin;
66 Sgenwin *_sgenwin;
67
68 char _sessiondir [1024];
69 char _sweepfile [1024];
70 char _fcorrfile [1024];
71 };
72
73
74
75 #endif