6c17d02551
temporary handling code in the app_server. * RootLayer no longer creates the input_server messaging port - this is now the responsibility of the input_server. * Moved AS_CREATE_[OFFSCREEN_]WINDOW from ServerApp::_MessageLooper() to _DispatchMessage(). * The RootLayer thread is now started as soon as the input_server is there. * removed or disabled any input_server stuff in the AppServer class. * removed old message commmands to the app_server. * Removed the R5_CURSOR_COMM and HAIKU_APPSERVER_COMM definitions: the input_server is now automatically built correctly depending on the target. * InputServer::EventLoop() plays now safe and checks for error conditions. * InputServer::EnqueueDeviceMessage() seems to leak memory, added TODO about this. * InputServer event loop messaging uses ports for inner-app communication - why? * The InputServer event loop thread is no longer killed on exit, it just quits when its port is gone. * Minor cleanup in input_server. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14949 a95241bf-73f2-0310-859d-f6bbb57e9c96
63 lines
1.1 KiB
C++
63 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2001-2005, Haiku, Inc.
|
|
* Distributed under the terms of the MIT license.
|
|
*
|
|
* Author: DarkWyrm <bpmagic@columbus.rr.com>
|
|
*/
|
|
#ifndef APP_SERVER_H
|
|
#define APP_SERVER_H
|
|
|
|
|
|
#include <OS.h>
|
|
#include <Locker.h>
|
|
#include <List.h>
|
|
#include <Application.h>
|
|
#include <Window.h>
|
|
#include <String.h>
|
|
#include <ObjectList.h>
|
|
#include <TokenSpace.h>
|
|
|
|
#include "ServerConfig.h"
|
|
#include "MessageLooper.h"
|
|
|
|
class ServerApp;
|
|
class BitmapManager;
|
|
class ColorSet;
|
|
class Desktop;
|
|
|
|
using BPrivate::BTokenSpace;
|
|
|
|
namespace BPrivate {
|
|
class PortLink;
|
|
};
|
|
|
|
|
|
class AppServer : public MessageLooper {
|
|
public:
|
|
AppServer();
|
|
virtual ~AppServer();
|
|
|
|
void RunLooper();
|
|
virtual port_id MessagePort() const { return fMessagePort; }
|
|
|
|
private:
|
|
virtual void _DispatchMessage(int32 code, BPrivate::LinkReceiver& link);
|
|
|
|
Desktop* _CreateDesktop(uid_t userID);
|
|
Desktop* _FindDesktop(uid_t userID);
|
|
|
|
void _LaunchInputServer();
|
|
|
|
private:
|
|
port_id fMessagePort;
|
|
|
|
BObjectList<Desktop> fDesktops;
|
|
BLocker fDesktopLock;
|
|
};
|
|
|
|
extern BitmapManager *gBitmapManager;
|
|
extern ColorSet gGUIColorSet;
|
|
extern port_id gAppServerPort;
|
|
|
|
#endif /* APP_SERVER_H */
|