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-11-14 22:46:20 +03:00
|
|
|
#ifndef APP_SERVER_H
|
|
|
|
#define APP_SERVER_H
|
2005-07-11 01:16:43 +04:00
|
|
|
|
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>
|
2005-10-31 22:35:46 +03:00
|
|
|
#include <ObjectList.h>
|
2005-11-14 22:46:20 +03:00
|
|
|
#include <TokenSpace.h>
|
2005-10-31 22:35:46 +03:00
|
|
|
|
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;
|
2005-10-31 22:35:46 +03:00
|
|
|
class Desktop;
|
2003-01-20 23:38:49 +03:00
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
using BPrivate::BTokenSpace;
|
|
|
|
|
2005-06-15 01:28:56 +04:00
|
|
|
namespace BPrivate {
|
|
|
|
class PortLink;
|
|
|
|
};
|
|
|
|
|
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-06-23 21:40:35 +04:00
|
|
|
|
2005-10-31 22:35:46 +03:00
|
|
|
Desktop* _CreateDesktop(uid_t userID);
|
|
|
|
Desktop* _FindDesktop(uid_t userID);
|
|
|
|
|
|
|
|
void _LaunchInputServer();
|
|
|
|
|
2005-07-26 01:53:48 +04:00
|
|
|
private:
|
2005-07-11 01:16:43 +04:00
|
|
|
port_id fMessagePort;
|
2005-07-01 14:09:11 +04:00
|
|
|
|
2005-10-31 22:35:46 +03:00
|
|
|
BObjectList<Desktop> fDesktops;
|
|
|
|
BLocker fDesktopLock;
|
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-11-14 22:46:20 +03:00
|
|
|
#endif /* APP_SERVER_H */
|