forked from HaikuArchives/sanity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ControlsWindow.h
58 lines (43 loc) · 1.38 KB
/
ControlsWindow.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
#ifndef CONTROLSWINDOW_H
#define CONTROLSWINDOW_H
#include <InterfaceKit.h>
#include "ScannerWindow.h"
class ControlsWindow : public BWindow
{
public:
// Constructors, destructors, operators...
ControlsWindow(ScannerWindow * parent_window);
~ControlsWindow();
typedef BWindow inherited;
// public constantes
enum {
SET_DEVICE_MSG = 'sdev',
DEVICE_LIST_MSG = 'devl',
SCAN_MSG = 'scan'
};
// Virtual function overrides
public:
virtual void MessageReceived(BMessage * msg);
virtual bool QuitRequested(void);
virtual int32 DevicesRosterThread();
virtual int32 ScanThread();
SANE_Handle Device() { return m_device; };
// From here, it's none of your business! ;-)
private:
static int32 _DevicesRosterThread(void * p) { return ((ControlsWindow *) p)->DevicesRosterThread(); }
thread_id m_devices_roster_thread_id;
static int32 _ScanThread(void * p) { return ((ControlsWindow *) p)->ScanThread(); }
thread_id m_scan_thread_id;
volatile bool m_cancel_scan;
SANE_Handle m_device;
const SANE_Device * m_device_info;
ScannerWindow * m_parent_window;
BBox * m_panel;
BMenuField * m_devices_field;
BPopUpMenu * m_devices_menu;
BStatusBar * m_status_bar;
BButton * m_scan_button;
BScrollView * m_options_sv;
BListView * m_options_lv;
};
#endif // ifdef CONTROLSWINDOW_H