Move S&T back into the app server.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42501 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-07-26 22:18:55 +00:00
parent 659fefbd43
commit 6a0ed7da53
20 changed files with 26 additions and 88 deletions

View File

@ -588,8 +588,7 @@ AddFilesToHaikuImage system add-ons disk_systems
# decorators
AddDirectoryToHaikuImage home config add-ons decorators ;
AddFilesToHaikuImage home config add-ons decorators :
SATDecorator ;
#AddFilesToHaikuImage home config add-ons decorators : ;
# create directories that will remain empty
AddDirectoryToHaikuImage common bin ;

View File

@ -3,4 +3,3 @@ SubDir HAIKU_TOP src add-ons decorators ;
SubInclude HAIKU_TOP src add-ons decorators BeDecorator ;
SubInclude HAIKU_TOP src add-ons decorators MacDecorator ;
SubInclude HAIKU_TOP src add-ons decorators WinDecorator ;
SubInclude HAIKU_TOP src add-ons decorators SATDecorator ;

View File

@ -1,11 +0,0 @@
resource("be:decor:info") message('deco') {
"name" = "Stack and Tile",
"authors" = "Clemens Zeidler, Ingo Weinhold",
"short_descr" = "Default look with ability to stack & tile windows.",
"long_descr" = "Group windows together and take advantage of those"
" tabs!\n\nTODO: instructions",
"lic_url" = "",
"lic_name" = "MIT",
"support_url" = "http://www.haiku-os.org/",
float "version" = 1.0
};

View File

@ -449,6 +449,8 @@ Desktop::Desktop(uid_t userID, const char* targetScreen)
fLink.SetReceiverPort(fMessagePort);
// register listeners
RegisterListener(&fStackAndTile);
const DesktopListenerList& newListeners
= gDecorManager.GetDesktopListeners();
for (int i = 0; i < newListeners.CountItems(); i++)

View File

@ -31,6 +31,7 @@
#include "Screen.h"
#include "ScreenManager.h"
#include "ServerCursor.h"
#include "StackAndTile.h"
#include "VirtualScreen.h"
#include "WindowList.h"
#include "Workspace.h"
@ -246,6 +247,7 @@ public:
Window* WindowForClientLooperPort(port_id port);
StackAndTile* GetStackAndTile() { return &fStackAndTile; }
private:
WindowList& _Windows(int32 index);
@ -350,6 +352,8 @@ private:
Window* fFocus;
Window* fFront;
Window* fBack;
StackAndTile fStackAndTile;
};
#endif // DESKTOP_H

View File

@ -5,6 +5,7 @@ UsePrivateHeaders app graphics input interface kernel shared storage support ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app StackAndTile ] ;
UseFreeTypeHeaders ;
@ -80,7 +81,8 @@ Server app_server :
:
libtranslation.so libbe.so libbnetapi.so
libasdrawing.a libasremote.a libpainter.a libagg.a libfreetype.so
libtextencoding.so libshared.a $(TARGET_LIBSTDC++)
StackAndTile.a liblinprog.a libtextencoding.so libshared.a
$(TARGET_LIBSTDC++)
: app_server.rdef
;
@ -90,3 +92,4 @@ SEARCH on [ FGristFiles $(font_src) ] = [ FDirName $(HAIKU_TOP) src servers app
SubInclude HAIKU_TOP src servers app drawing ;
SubInclude HAIKU_TOP src servers app StackAndTile ;

View File

@ -1,4 +1,4 @@
SubDir HAIKU_TOP src add-ons decorators SATDecorator ;
SubDir HAIKU_TOP src servers app StackAndTile ;
UseLibraryHeaders agg lp_solve linprog ;
UsePrivateHeaders app graphics interface shared kernel ;
@ -10,20 +10,11 @@ UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ;
UseFreeTypeHeaders ;
AddResources SATDecorator : resources.rdef ;
Addon SATDecorator :
StaticLibrary StackAndTile.a :
SATDecorator.cpp
SATGroup.cpp
SATWindow.cpp
StackAndTile.cpp
Stacking.cpp
Tiling.cpp
# libraries
:
libbe.so
<nogrist>app_server
$(TARGET_LIBSTDC++)
liblpsolve55.so liblinprog.a
;

View File

@ -49,39 +49,6 @@ static const rgb_color kHighlightTabColorShadow = tint_color(kHighlightTabColor,
(B_DARKEN_1_TINT + B_NO_TINT) / 2);
SATDecorAddOn::SATDecorAddOn(image_id id, const char* name)
:
DecorAddOn(id, name)
{
fDesktopListeners.AddItem(&fStackAndTile);
}
status_t
SATDecorAddOn::InitCheck() const
{
if (fDesktopListeners.CountItems() != 1)
return B_ERROR;
return B_OK;
}
WindowBehaviour*
SATDecorAddOn::AllocateWindowBehaviour(Window* window)
{
return new (std::nothrow)SATWindowBehaviour(window, &fStackAndTile);
}
Decorator*
SATDecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect,
window_look look, uint32 flags)
{
return new (std::nothrow)SATDecorator(settings, rect, look, flags);
}
SATDecorator::SATDecorator(DesktopSettings& settings, BRect frame,
window_look look, uint32 flags)
:
@ -175,9 +142,3 @@ SATWindowBehaviour::AlterDeltaForSnap(Window* window, BPoint& delta,
return fMagneticBorder.AlterDeltaForSnap(window->Screen(),
groupFrame, delta, now);
}
extern "C" DecorAddOn* (instantiate_decor_addon)(image_id id, const char* name)
{
return new (std::nothrow)SATDecorAddOn(id, name);
}

View File

@ -15,22 +15,6 @@
#include "StackAndTile.h"
class SATDecorAddOn : public DecorAddOn {
public:
SATDecorAddOn(image_id id, const char* name);
virtual status_t InitCheck() const;
virtual WindowBehaviour* AllocateWindowBehaviour(Window* window);
protected:
virtual Decorator* _AllocateDecorator(DesktopSettings& settings,
BRect rect, window_look look, uint32 flags);
StackAndTile fStackAndTile;
};
class SATDecorator : public DefaultDecorator {
public:
enum {

View File

@ -14,6 +14,8 @@
#include <Debug.h>
#include <Message.h>
#include "Desktop.h"
#include "SATWindow.h"
#include "StackAndTile.h"
#include "Window.h"

View File

@ -13,6 +13,7 @@
#include "StackAndTilePrivate.h"
#include "Desktop.h"
#include "SATGroup.h"
#include "ServerApp.h"
#include "Window.h"

View File

@ -14,9 +14,8 @@
#include <Message.h>
#include <MessageFilter.h>
#include "Desktop.h"
#include "DesktopListener.h"
#include "ObjectList.h"
#include "SATGroup.h"
#include "WindowList.h"
@ -29,8 +28,10 @@
#endif
class SATGroup;
class SATWindow;
class Window;
class WindowArea;
typedef std::map<Window*, SATWindow*> SATWindowMap;
@ -106,7 +107,7 @@ private:
bool fSATKeyPressed;
SATWindowMap fSATWindowMap;
SATWindowList fGrouplessWindows;
BObjectList<SATWindow> fGrouplessWindows;
SATWindow* fCurrentSATWindow;
};

View File

@ -12,6 +12,7 @@
#include "StackAndTilePrivate.h"
#include "Desktop.h"
#include "SATWindow.h"
#include "Window.h"

View File

@ -12,6 +12,7 @@
#include "Decorator.h"
#include "StackAndTile.h"
#include "SATGroup.h"
class SATWindow;

View File

@ -21,11 +21,10 @@
#include <syslog.h>
#include "AppServer.h"
#include "DefaultDecorator.h"
#include "DefaultWindowBehaviour.h"
#include "Desktop.h"
#include "DesktopSettings.h"
#include "ServerConfig.h"
#include "SATDecorator.h"
#include "Window.h"
typedef float get_version(void);
@ -82,7 +81,8 @@ DecorAddOn::AllocateDecorator(Desktop* desktop, DrawingEngine* engine,
WindowBehaviour*
DecorAddOn::AllocateWindowBehaviour(Window* window)
{
return new (std::nothrow)DefaultWindowBehaviour(window);
return new (std::nothrow)SATWindowBehaviour(window,
window->Desktop()->GetStackAndTile());
}
@ -97,7 +97,7 @@ Decorator*
DecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect,
window_look look, uint32 flags)
{
return new (std::nothrow)DefaultDecorator(settings, rect, look, flags);
return new (std::nothrow)SATDecorator(settings, rect, look, flags);
}