Author: pulkomandy Date: 2009-12-22 22:06:58 +0100 (Tue, 22 Dec 2009) New Revision: 34749 Changeset: http://dev.haiku-os.org/changeset/34749/haiku Modified: haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.cpp haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.h haiku/trunk/src/add-ons/decorators/BeDecorator/Jamfile haiku/trunk/src/add-ons/decorators/MacDecorator/Jamfile haiku/trunk/src/add-ons/decorators/WinDecorator/Jamfile haiku/trunk/src/servers/app/DecorManager.cpp Log: -Bring BeDecorator back at a compilable state -Some updates to the DecoratorManager to try to make it working. The add-on is not identified properly but I can't find out why... Modified: haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.cpp =================================================================== --- haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.cpp 2009-12-22 16:53:28 UTC (rev 34748) +++ haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.cpp 2009-12-22 21:06:58 UTC (rev 34749) @@ -166,7 +166,8 @@ font.SetFlags(B_FORCE_ANTIALIASING); font.SetSpacing(B_STRING_SPACING); - SetFont(&font); + // TODO Make this work... + // SetFont(&font); Decorator::SetLook(settings, look, updateRegion); _DoLayout(); @@ -639,8 +640,9 @@ fMinTabSize += offset + size; // fMaxTabSize contains fMinWidth + the width required for the title - fMaxTabSize = fDrawingEngine ? ceilf(fDrawingEngine->StringWidth(Title(), strlen(Title()), - &fDrawState)) : 0.0; + // TODO : check what escapement_delta is supposed to do + fMaxTabSize = fDrawingEngine ? ceilf(fDrawingEngine->StringWidth(Title(), strlen(Title())/*, + &fDrawState*/)) : 0.0; if (fMaxTabSize > 0.0) fMaxTabSize += fTextOffset; fMaxTabSize += fMinTabSize; @@ -985,7 +987,7 @@ : fTabRect.bottom - fTextOffset; } - fDrawingEngine->DrawString(fTruncatedTitle.String(), fTruncatedTitleLength, titlePos, &fDrawState); + fDrawingEngine->DrawString(fTruncatedTitle.String(), fTruncatedTitleLength, titlePos/*, &fDrawState*/); } // _DrawZoom Modified: haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.h =================================================================== --- haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.h 2009-12-22 16:53:28 UTC (rev 34748) +++ haiku/trunk/src/add-ons/decorators/BeDecorator/BeDecorator.h 2009-12-22 21:06:58 UTC (rev 34749) @@ -12,6 +12,7 @@ #include "Decorator.h" #include <Region.h> +#include "RGBColor.h" class Desktop; Modified: haiku/trunk/src/add-ons/decorators/BeDecorator/Jamfile =================================================================== --- haiku/trunk/src/add-ons/decorators/BeDecorator/Jamfile 2009-12-22 16:53:28 UTC (rev 34748) +++ haiku/trunk/src/add-ons/decorators/BeDecorator/Jamfile 2009-12-22 21:06:58 UTC (rev 34749) @@ -3,9 +3,11 @@ UseFreeTypeHeaders ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app ] ; UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing ] ; +UseHeaders [ FDirName $(HAIKU_TOP) src servers app drawing Painter ] ; UsePrivateHeaders app shared interface graphics ; +UseLibraryHeaders agg ; Addon ClassicBe : BeDecorator.cpp - : be <nogrist>app_server + : be <nogrist>app_server $(TARGET_LIBSTDC++) $(TARGET_LIBSUPC++) ; Modified: haiku/trunk/src/add-ons/decorators/MacDecorator/Jamfile =================================================================== --- haiku/trunk/src/add-ons/decorators/MacDecorator/Jamfile 2009-12-22 16:53:28 UTC (rev 34748) +++ haiku/trunk/src/add-ons/decorators/MacDecorator/Jamfile 2009-12-22 21:06:58 UTC (rev 34749) @@ -1,10 +1,11 @@ SubDir HAIKU_TOP src add-ons decorators MacDecorator ; UseFreeTypeHeaders ; -UseHeaders [ FDirName $(HAIKU_TOP) src servers app server ] ; +UseHeaders [ FDirName $(HAIKU_TOP) src servers app ] ; UsePrivateHeaders [ FDirName servers app ] ; Addon MacDecorator : MacDecorator.cpp - : be libappserver.so + : be <nogrist>app_server +# libappserver.so ; Modified: haiku/trunk/src/add-ons/decorators/WinDecorator/Jamfile =================================================================== --- haiku/trunk/src/add-ons/decorators/WinDecorator/Jamfile 2009-12-22 16:53:28 UTC (rev 34748) +++ haiku/trunk/src/add-ons/decorators/WinDecorator/Jamfile 2009-12-22 21:06:58 UTC (rev 34749) @@ -1,7 +1,7 @@ SubDir HAIKU_TOP src add-ons decorators WinDecorator ; UseFreeTypeHeaders ; -UseHeaders [ FDirName $(HAIKU_TOP) src servers app server ] ; +UseHeaders [ FDirName $(HAIKU_TOP) src servers app ] ; UsePrivateHeaders [ FDirName servers app ] ; Addon WinDecorator : Modified: haiku/trunk/src/servers/app/DecorManager.cpp =================================================================== --- haiku/trunk/src/servers/app/DecorManager.cpp 2009-12-22 16:53:28 UTC (rev 34748) +++ haiku/trunk/src/servers/app/DecorManager.cpp 2009-12-22 21:06:58 UTC (rev 34749) @@ -13,6 +13,8 @@ #include <Path.h> #include <Rect.h> +#include <syslog.h> + #include "AppServer.h" #include "DefaultDecorator.h" #include "Desktop.h" @@ -115,9 +117,9 @@ DecorInfo *defaultDecor = new DecorInfo(-1, "Default", NULL); fDecorList.AddItem(defaultDecor); -#if 0 // Add any on disk RescanDecorators(); +#if 0 // Find out which one should be the active one BDirectory dir; @@ -171,7 +173,7 @@ continue; image_id image = load_add_on(path.Path()); - if (image != B_OK) + if (image < 0) continue; // As of now, we do nothing with decorator versions, but the possibility @@ -182,6 +184,7 @@ create_decorator* createFunc; // Get the instantiation function + // TODO : this is not working for some reason status_t status = get_image_symbol(image, "instantiate_decorator", B_SYMBOL_TYPE_TEXT, (void**)&createFunc); if (status != B_OK) {