2005-05-27 17:36:05 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2001-2005, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT license.
|
|
|
|
*
|
|
|
|
* Author: DarkWyrm <bpmagic@columbus.rr.com>
|
|
|
|
*/
|
2005-07-11 01:16:43 +04:00
|
|
|
|
2005-05-27 17:36:05 +04:00
|
|
|
#ifndef _HAIKU_APP_SERVER_H_
|
|
|
|
#define _HAIKU_APP_SERVER_H_
|
2003-01-20 23:38:49 +03:00
|
|
|
|
|
|
|
#include <OS.h>
|
|
|
|
#include <Locker.h>
|
|
|
|
#include <List.h>
|
2003-02-15 18:28:22 +03:00
|
|
|
#include <Application.h>
|
2003-01-20 23:38:49 +03:00
|
|
|
#include <Window.h>
|
2003-10-09 03:18:30 +04:00
|
|
|
#include <String.h>
|
2003-02-15 18:28:22 +03:00
|
|
|
#include "ServerConfig.h"
|
2005-07-26 01:53:48 +04:00
|
|
|
#include "MessageLooper.h"
|
2003-01-20 23:38:49 +03:00
|
|
|
|
|
|
|
class ServerApp;
|
2003-02-20 23:14:57 +03:00
|
|
|
class BitmapManager;
|
2005-06-17 23:10:15 +04:00
|
|
|
class ColorSet;
|
2003-01-20 23:38:49 +03:00
|
|
|
|
2005-06-15 01:28:56 +04:00
|
|
|
namespace BPrivate {
|
|
|
|
class PortLink;
|
|
|
|
};
|
|
|
|
|
2003-01-20 23:38:49 +03:00
|
|
|
/*!
|
|
|
|
\class AppServer AppServer.h
|
|
|
|
\brief main manager object for the app_server
|
|
|
|
|
|
|
|
File for the main app_server thread. This particular thread monitors for
|
|
|
|
application start and quit messages. It also starts the housekeeping threads
|
|
|
|
and initializes most of the server's globals.
|
|
|
|
*/
|
2005-05-27 17:36:05 +04:00
|
|
|
|
2005-07-29 03:48:46 +04:00
|
|
|
class AppServer : public MessageLooper {
|
2005-07-26 01:53:48 +04:00
|
|
|
public:
|
|
|
|
AppServer();
|
|
|
|
virtual ~AppServer();
|
2004-01-13 03:56:36 +03:00
|
|
|
|
2005-07-26 01:53:48 +04:00
|
|
|
void RunLooper();
|
|
|
|
virtual port_id MessagePort() const { return fMessagePort; }
|
2005-06-23 21:40:35 +04:00
|
|
|
|
2005-07-26 01:53:48 +04:00
|
|
|
private:
|
|
|
|
virtual void _DispatchMessage(int32 code, BPrivate::LinkReceiver& link);
|
2005-07-11 01:16:43 +04:00
|
|
|
void LaunchCursorThread();
|
|
|
|
void LaunchInputServer();
|
2005-06-23 21:40:35 +04:00
|
|
|
|
2005-07-26 01:53:48 +04:00
|
|
|
// static int32 PollerThread(void *data);
|
|
|
|
static int32 CursorThread(void *data);
|
|
|
|
|
|
|
|
private:
|
2005-07-11 01:16:43 +04:00
|
|
|
port_id fMessagePort;
|
|
|
|
port_id fServerInputPort;
|
2005-06-23 21:40:35 +04:00
|
|
|
|
2005-07-11 01:16:43 +04:00
|
|
|
thread_id fISThreadID;
|
|
|
|
thread_id fCursorThreadID;
|
|
|
|
sem_id fCursorSem;
|
|
|
|
area_id fCursorArea;
|
|
|
|
uint32 *fCursorAddr;
|
2005-07-01 14:09:11 +04:00
|
|
|
|
2005-07-11 01:16:43 +04:00
|
|
|
port_id fISASPort;
|
|
|
|
port_id fISPort;
|
2003-01-20 23:38:49 +03:00
|
|
|
};
|
|
|
|
|
2005-06-24 07:31:41 +04:00
|
|
|
extern BitmapManager *gBitmapManager;
|
|
|
|
extern ColorSet gGUIColorSet;
|
2005-05-27 17:36:05 +04:00
|
|
|
extern port_id gAppServerPort;
|
2003-02-20 23:14:57 +03:00
|
|
|
|
2005-05-27 17:36:05 +04:00
|
|
|
#endif /* _HAIKU_APP_SERVER_H_ */
|