2 * Copyright (c) 2001-2005, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
6 * DarkWyrm <bpmagic@columbus.rr.com>
7 * Clemens Zeidler <haiku@clemens-zeidler.de>
8 * Joseph Groover <looncraz@satx.rr.com>
10 #ifndef DECOR_MANAGER_H
11 #define DECOR_MANAGER_H
17 #include <ObjectList.h>
19 #include <DecorInfo.h>
21 #include "Decorator.h"
24 class DesktopListener
;
27 class WindowBehaviour
;
30 typedef BObjectList
<DesktopListener
> DesktopListenerList
;
33 // special name to test for use of non-fs-tied default decorator
34 // this just keeps things clean and simple is all
38 DecorAddOn(image_id id
, const char* name
);
39 virtual ~DecorAddOn();
41 virtual status_t
InitCheck() const;
43 image_id
ImageID() const { return fImageID
; }
45 Decorator
* AllocateDecorator(Desktop
* desktop
,
46 DrawingEngine
* engine
, BRect rect
,
47 const char* title
, window_look look
,
50 virtual WindowBehaviour
* AllocateWindowBehaviour(Window
* window
);
52 virtual const DesktopListenerList
& GetDesktopListeners();
55 virtual Decorator
* _AllocateDecorator(DesktopSettings
& settings
,
56 BRect rect
, Desktop
* desktop
);
58 DesktopListenerList fDesktopListeners
;
71 Decorator
* AllocateDecorator(Window
*window
);
72 WindowBehaviour
* AllocateWindowBehaviour(Window
*window
);
73 void CleanupForWindow(Window
*window
);
75 status_t
PreviewDecorator(BString path
, Window
*window
);
77 const DesktopListenerList
& GetDesktopListeners();
79 BString
GetCurrentDecorator() const;
80 status_t
SetDecorator(BString path
, Desktop
*desktop
);
83 DecorAddOn
* _LoadDecor(BString path
, status_t
&error
);
84 bool _LoadSettingsFromDisk();
85 bool _SaveSettingsToDisk();
88 DecorAddOn fDefaultDecor
;
89 DecorAddOn
* fCurrentDecor
;
90 DecorAddOn
* fPreviewDecor
;
92 Window
* fPreviewWindow
;
93 BString fCurrentDecorPath
;
96 extern DecorManager gDecorManager
;
98 #endif /* DECOR_MANAGER_H */