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
+1 -2
View File
@@ -588,8 +588,7 @@ AddFilesToHaikuImage system add-ons disk_systems
# decorators # decorators
AddDirectoryToHaikuImage home config add-ons decorators ; AddDirectoryToHaikuImage home config add-ons decorators ;
AddFilesToHaikuImage home config add-ons decorators : #AddFilesToHaikuImage home config add-ons decorators : ;
SATDecorator ;
# create directories that will remain empty # create directories that will remain empty
AddDirectoryToHaikuImage common bin ; AddDirectoryToHaikuImage common bin ;
-1
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 BeDecorator ;
SubInclude HAIKU_TOP src add-ons decorators MacDecorator ; SubInclude HAIKU_TOP src add-ons decorators MacDecorator ;
SubInclude HAIKU_TOP src add-ons decorators WinDecorator ; SubInclude HAIKU_TOP src add-ons decorators WinDecorator ;
SubInclude HAIKU_TOP src add-ons decorators SATDecorator ;
@@ -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
};
+2
View File
@@ -449,6 +449,8 @@ Desktop::Desktop(uid_t userID, const char* targetScreen)
fLink.SetReceiverPort(fMessagePort); fLink.SetReceiverPort(fMessagePort);
// register listeners // register listeners
RegisterListener(&fStackAndTile);
const DesktopListenerList& newListeners const DesktopListenerList& newListeners
= gDecorManager.GetDesktopListeners(); = gDecorManager.GetDesktopListeners();
for (int i = 0; i < newListeners.CountItems(); i++) for (int i = 0; i < newListeners.CountItems(); i++)
+4
View File
@@ -31,6 +31,7 @@
#include "Screen.h" #include "Screen.h"
#include "ScreenManager.h" #include "ScreenManager.h"
#include "ServerCursor.h" #include "ServerCursor.h"
#include "StackAndTile.h"
#include "VirtualScreen.h" #include "VirtualScreen.h"
#include "WindowList.h" #include "WindowList.h"
#include "Workspace.h" #include "Workspace.h"
@@ -246,6 +247,7 @@ public:
Window* WindowForClientLooperPort(port_id port); Window* WindowForClientLooperPort(port_id port);
StackAndTile* GetStackAndTile() { return &fStackAndTile; }
private: private:
WindowList& _Windows(int32 index); WindowList& _Windows(int32 index);
@@ -350,6 +352,8 @@ private:
Window* fFocus; Window* fFocus;
Window* fFront; Window* fFront;
Window* fBack; Window* fBack;
StackAndTile fStackAndTile;
}; };
#endif // DESKTOP_H #endif // DESKTOP_H
+4 -1
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 ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ;
UseHeaders [ FDirName $(HAIKU_TOP) src servers app StackAndTile ] ;
UseFreeTypeHeaders ; UseFreeTypeHeaders ;
@@ -80,7 +81,8 @@ Server app_server :
: :
libtranslation.so libbe.so libbnetapi.so libtranslation.so libbe.so libbnetapi.so
libasdrawing.a libasremote.a libpainter.a libagg.a libfreetype.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 : 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 drawing ;
SubInclude HAIKU_TOP src servers app StackAndTile ;
@@ -1,4 +1,4 @@
SubDir HAIKU_TOP src add-ons decorators SATDecorator ; SubDir HAIKU_TOP src servers app StackAndTile ;
UseLibraryHeaders agg lp_solve linprog ; UseLibraryHeaders agg lp_solve linprog ;
UsePrivateHeaders app graphics interface shared kernel ; 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 ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ;
UseFreeTypeHeaders ; UseFreeTypeHeaders ;
AddResources SATDecorator : resources.rdef ; StaticLibrary StackAndTile.a :
Addon SATDecorator :
SATDecorator.cpp SATDecorator.cpp
SATGroup.cpp SATGroup.cpp
SATWindow.cpp SATWindow.cpp
StackAndTile.cpp StackAndTile.cpp
Stacking.cpp Stacking.cpp
Tiling.cpp Tiling.cpp
# libraries
:
libbe.so
<nogrist>app_server
$(TARGET_LIBSTDC++)
liblpsolve55.so liblinprog.a
; ;
@@ -49,39 +49,6 @@ static const rgb_color kHighlightTabColorShadow = tint_color(kHighlightTabColor,
(B_DARKEN_1_TINT + B_NO_TINT) / 2); (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, SATDecorator::SATDecorator(DesktopSettings& settings, BRect frame,
window_look look, uint32 flags) window_look look, uint32 flags)
: :
@@ -175,9 +142,3 @@ SATWindowBehaviour::AlterDeltaForSnap(Window* window, BPoint& delta,
return fMagneticBorder.AlterDeltaForSnap(window->Screen(), return fMagneticBorder.AlterDeltaForSnap(window->Screen(),
groupFrame, delta, now); groupFrame, delta, now);
} }
extern "C" DecorAddOn* (instantiate_decor_addon)(image_id id, const char* name)
{
return new (std::nothrow)SATDecorAddOn(id, name);
}
@@ -15,22 +15,6 @@
#include "StackAndTile.h" #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 { class SATDecorator : public DefaultDecorator {
public: public:
enum { enum {
@@ -14,6 +14,8 @@
#include <Debug.h> #include <Debug.h>
#include <Message.h> #include <Message.h>
#include "Desktop.h"
#include "SATWindow.h" #include "SATWindow.h"
#include "StackAndTile.h" #include "StackAndTile.h"
#include "Window.h" #include "Window.h"
@@ -13,6 +13,7 @@
#include "StackAndTilePrivate.h" #include "StackAndTilePrivate.h"
#include "Desktop.h"
#include "SATGroup.h" #include "SATGroup.h"
#include "ServerApp.h" #include "ServerApp.h"
#include "Window.h" #include "Window.h"
@@ -14,9 +14,8 @@
#include <Message.h> #include <Message.h>
#include <MessageFilter.h> #include <MessageFilter.h>
#include "Desktop.h" #include "DesktopListener.h"
#include "ObjectList.h" #include "ObjectList.h"
#include "SATGroup.h"
#include "WindowList.h" #include "WindowList.h"
@@ -29,8 +28,10 @@
#endif #endif
class SATGroup;
class SATWindow; class SATWindow;
class Window; class Window;
class WindowArea;
typedef std::map<Window*, SATWindow*> SATWindowMap; typedef std::map<Window*, SATWindow*> SATWindowMap;
@@ -106,7 +107,7 @@ private:
bool fSATKeyPressed; bool fSATKeyPressed;
SATWindowMap fSATWindowMap; SATWindowMap fSATWindowMap;
SATWindowList fGrouplessWindows; BObjectList<SATWindow> fGrouplessWindows;
SATWindow* fCurrentSATWindow; SATWindow* fCurrentSATWindow;
}; };
@@ -12,6 +12,7 @@
#include "StackAndTilePrivate.h" #include "StackAndTilePrivate.h"
#include "Desktop.h"
#include "SATWindow.h" #include "SATWindow.h"
#include "Window.h" #include "Window.h"
@@ -12,6 +12,7 @@
#include "Decorator.h" #include "Decorator.h"
#include "StackAndTile.h" #include "StackAndTile.h"
#include "SATGroup.h"
class SATWindow; class SATWindow;
+4 -4
View File
@@ -21,11 +21,10 @@
#include <syslog.h> #include <syslog.h>
#include "AppServer.h" #include "AppServer.h"
#include "DefaultDecorator.h"
#include "DefaultWindowBehaviour.h"
#include "Desktop.h" #include "Desktop.h"
#include "DesktopSettings.h" #include "DesktopSettings.h"
#include "ServerConfig.h" #include "ServerConfig.h"
#include "SATDecorator.h"
#include "Window.h" #include "Window.h"
typedef float get_version(void); typedef float get_version(void);
@@ -82,7 +81,8 @@ DecorAddOn::AllocateDecorator(Desktop* desktop, DrawingEngine* engine,
WindowBehaviour* WindowBehaviour*
DecorAddOn::AllocateWindowBehaviour(Window* window) 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, DecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect,
window_look look, uint32 flags) window_look look, uint32 flags)
{ {
return new (std::nothrow)DefaultDecorator(settings, rect, look, flags); return new (std::nothrow)SATDecorator(settings, rect, look, flags);
} }