1/*
2	Copyright 2005, Francois Revol.   All Rights Reserved.
3	This file may be used under the terms of the Be Sample Code License.
4*/
5#ifndef _PEN_INPUT_SERVER_METHOD_H
6#define _PEN_INPUT_SERVER_METHOD_H
7
8#include <OS.h>
9#include <Messenger.h>
10#include <add-ons/input_server/InputServerMethod.h>
11
12#if DEBUG
13//#include <File.h>
14class BAlert;
15#endif
16class BList;
17class BMessage;
18class PenInputLooper;
19
20
21extern "C" _EXPORT BInputServerMethod* instantiate_input_method();
22
23class PenInputServerMethod : public BInputServerMethod
24{
25public:
26	PenInputServerMethod();
27	virtual ~PenInputServerMethod();
28	virtual status_t InitCheck();
29	virtual filter_result Filter(BMessage *message, BList *outList);
30	virtual status_t MethodActivated(bool active);
31
32	bool IsEnabled() const { return fEnabled; };
33
34private:
35	friend PenInputLooper;//DEBUG
36	bool fEnabled;
37	//BLocker fLocker;
38	BMessenger fLooper;
39#if DEBUG
40	//BFile fDebugFile;
41	BAlert *fDebugAlert;
42#endif
43};
44
45#endif /* _PEN_INPUT_SERVER_METHOD_H */
46