2002-07-18 05:03:19 +04:00
|
|
|
// TestApp.h
|
|
|
|
|
|
|
|
#ifndef _beos_test_app_h_
|
|
|
|
#define _beos_test_app_h_
|
|
|
|
|
|
|
|
#include <Application.h>
|
|
|
|
#include <MessageQueue.h>
|
|
|
|
|
|
|
|
// TestHandler
|
|
|
|
|
2002-07-24 02:27:43 +04:00
|
|
|
class BTestHandler : public BHandler {
|
2002-07-18 05:03:19 +04:00
|
|
|
public:
|
|
|
|
virtual void MessageReceived(BMessage *message);
|
|
|
|
BMessageQueue &Queue();
|
|
|
|
|
|
|
|
private:
|
|
|
|
BMessageQueue fQueue;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// TestApp
|
|
|
|
|
2002-07-24 02:27:43 +04:00
|
|
|
class BTestApp : public BApplication {
|
2002-07-18 05:03:19 +04:00
|
|
|
public:
|
2002-07-24 02:27:43 +04:00
|
|
|
BTestApp(const char *signature);
|
2002-07-18 05:03:19 +04:00
|
|
|
|
|
|
|
status_t Init();
|
|
|
|
void Terminate();
|
|
|
|
|
|
|
|
virtual void ReadyToRun();
|
|
|
|
|
2002-07-24 02:27:43 +04:00
|
|
|
BTestHandler &Handler();
|
2002-07-18 05:03:19 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
static int32 _AppThreadStart(void *data);
|
|
|
|
|
|
|
|
private:
|
|
|
|
thread_id fAppThread;
|
2002-07-24 02:27:43 +04:00
|
|
|
BTestHandler fHandler;
|
2002-07-18 05:03:19 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _beos_test_app_h_
|